Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-17-2009, 03:49 AM   #1
LQ Newbie
Registered: Aug 2008
Posts: 2

Rep: Reputation: 0
Can we open a browser (firefox/IE) & enter URL in it via shell/PERL script.

I have read the similar threads related to my question.

All I could understand is we cannot do it via shell or perl.

Can some one please assist me telling how to do it via some other way.

Thank you ..
Old 02-17-2009, 03:56 AM   #2
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,629

Rep: Reputation: Disabled
What do you want to do? And why do you want to write a script that will open firefox and do nothing?
You can open firefox from script. But you will need X running.
But you cant ask it to open website from script. Could you explain your need behind?
Old 02-17-2009, 03:58 AM   #3
Registered: Mar 2008
Distribution: Gentoo, CentOS, Fedora, Arch
Posts: 231
Blog Entries: 1

Rep: Reputation: 42

From what I see you can simply specify the URL as an argument.

firefox -url

Last edited by Maligree; 02-17-2009 at 04:02 AM. Reason: checked.
Old 02-17-2009, 10:25 AM   #4
LQ Newbie
Registered: Feb 2009
Location: St Paul, Minnesota, USA
Distribution: Redhat Fedora 10; someday planet CCRMA
Posts: 11

Rep: Reputation: 0
Yes. Browsers do not browse only the web, they can browse local files too. I use this functionality in Windows by associating *.htm and *.html files with Internet Explorer, or with Opera, or whatever. When looking around in my file system I look at html files by double clicking on them, or by right clicking and choosing Open or Open-With... from the popup menu. This opens the [registered or selected] application passing as argument the name of the file I clicked on.
Old 02-17-2009, 11:02 AM   #5
Registered: Feb 2005
Location: London, UK
Distribution: Gentoo
Posts: 568

Rep: Reputation: 37
On my Gentoo (Gnome) box I can also righ-click on a web address printed out in the terminal window and open that link in my web browser...

Old 02-18-2009, 03:57 AM   #6
LQ Newbie
Registered: Aug 2008
Posts: 2

Original Poster
Rep: Reputation: 0
hello Maligree,

That worked for me...
The command:-
firefox url https://IP address//
It opened the url in firefox browser.

Hello linuxlover.chaitanya,

I actually was thinking of automating some actions of web testing.I want to write my own test scripts for the manual testing on my project application which has a GUI.

In short, I want to learn what exactly the web testing tools do. To name a few - imacros, sahi, selenium etc. So, was just trying to get working the initial steps.after openeing the url -- I want to login and carry out few steps. For this,I want to write scripts.

Also, got to know how to open a IE on windows via command line.
--Go to the dir which has IE (say crogram files)
--Run the .exe of IE
--This opens a new IE instance.

Thank you all of you once again.
Old 02-18-2009, 06:21 AM   #7
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,954

Rep: Reputation: 2634Reputation: 2634Reputation: 2634Reputation: 2634Reputation: 2634Reputation: 2634Reputation: 2634Reputation: 2634Reputation: 2634Reputation: 2634Reputation: 2634
If you want to be able to drive an interactive/CGI page from a program ie fill in fields, do a submit etc, try and friends from Perl.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL Updates With Null When Perl Script Run From Shell Script ThisGuyIKnow Programming 6 08-12-2008 10:56 AM
How to enter a URL in to the "exceptions" box in Firefox royeo Linux - General 1 12-15-2006 06:03 PM
Since I installed fireFox and made it my default browser I can't enter the IE. michael! Linux - General 1 10-12-2006 03:55 AM
Open an URL in the default browser guasqui Programming 2 03-22-2006 12:54 PM
open a URL from shell plisken Linux - General 3 11-10-2005 02:43 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:17 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration