The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Special Forums > UNIX Desktop for Dummies Questions & Answers
.
google unix.com



UNIX Desktop for Dummies Questions & Answers Discuss UNIX and Linux user interfaces like GNOME, KDE, CDE, and Open Office here. All UNIX and Linux Newbies Welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to enter if-then condition on command prompt/line ? mpc8250 Shell Programming and Scripting 3 02-10-2008 12:27 PM
prompt line sobnc AIX 0 01-19-2008 05:50 PM
inconsistent ls command display at the command prompt & running as a cron job rajranibl SuSE 5 07-30-2007 08:26 AM
Path in prompt line? Leitwolf UNIX for Dummies Questions & Answers 4 04-02-2007 03:25 PM
2 line prompt Kelam_Magnus UNIX for Dummies Questions & Answers 7 06-13-2002 10:23 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-17-2009
mraghunandanan mraghunandanan is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 38
Website-Command Line Prompt

Hello guys...

I am having a doubt. Please try to rectify it. I would really appreciate it.

The thing is that is it possible to open any website say for example,google from the command line prompt(terminal) if you are working in Linux-fedora...
I am very new to Unix.

regards,

Mahesh...
  #2 (permalink)  
Old 02-17-2009
wempy's Avatar
wempy wempy is offline
Registered User
  
 

Join Date: Jun 2006
Location: Harpenden, UK
Posts: 205
The code below uses firefox (or mozilla if you swap the commented lines around) to open the url in an already running copy, or open a new instance if it is not already running.
Debian has a www-browser object which normally points to firefox, dunno if fedora has a similiar setuo.
Code:
#!/bin/bash
#
# mozilla=/usr/bin/mozilla
mozilla=/usr/bin/firefox
if ( $mozilla -remote "ping()" &> /dev/null );then
 $mozilla -remote "openurl(http://www.google.com, new-tab)" &
else
    $mozilla http://www.google.com &
fi
  #3 (permalink)  
Old 02-17-2009
mraghunandanan mraghunandanan is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 38
Thanks a ton wempy...
Its really working fine for me.

I will send more doubts in future.. expecting your mutual coperation...
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 04:49 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0