Firefox in CentOS from CLI

General support questions including new installations
sandy12
Posts: 5
Joined: 2010/11/22 14:54:49

Firefox in CentOS from CLI

Post by sandy12 » 2010/11/22 16:47:16

Hi, I have installed CentOS from a CD and it does not have a GUI envirnment, I would like to lauunch Firefox from the termimnal. How do I do it? pls help.

User avatar
toracat
Forum Moderator
Posts: 7297
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Firefox in CentOS from CLI

Post by toracat » 2010/11/22 22:26:22

Browsers like firefox require GUI. If you'd like to run a text-based browser, try lynx.

User avatar
TrevorH
Forum Moderator
Posts: 23451
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Firefox in CentOS from CLI

Post by TrevorH » 2010/11/23 00:09:28

It is possible to use a local X server and use X11 forwarding over ssh to display GUI apps like this. Possible but not desirable :-) But if you have a web page that needs a GUI browser on that system then sometimes you have no choice.

sandy12
Posts: 5
Joined: 2010/11/22 14:54:49

Re: Firefox in CentOS from CLI

Post by sandy12 » 2010/11/24 14:29:36

@toracat thanks for the reply.. I have tried lynx, but I need a gui browser.. any help on how to get to that?

@TrevorH Thanks. ..I have a web page that needs a GUI browser could you please walk me through the procedure you mention ( X server x11 SSH ???@##$^& for me :(

User avatar
TrevorH
Forum Moderator
Posts: 23451
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Firefox in CentOS from CLI

Post by TrevorH » 2010/11/24 16:28:24

Method varies depending on what o/s you run on your own machine. If it's Windows then you need to install an X server first - Cygwin has a free one and once installed you just open a cygwin bash command prompt and type `startx` which gets it running. Then you need to enable X11 forwarding on whatever ssh client you are using - for putty it's a setting in Connection -> SSH -> X11 and you need to check the box that says "Eanble X11 forwarding" then make a new connection with that setting active. Once you connect to the remote server, make sure that it's ready to run by running

[code]
$ echo $DISPLAY
localhost:10.0
[/code]

If it does not say something like localhost:x:0 then you probably don't have the necessary software installed on your Centos system - try running `yum install xorg-x11-xauth` then disconnect and reconnect and retry the echo. Once the echo works you just run

[code]
firefox &
[/code]

and sit back and wait - possibly for a very long time. Running it like this is [b]s l o w[/b] but usually gets there in the end.

If your own machine is already running Linux with a GUI then you can skip the cygwin step and just make sure that when you ssh to the remote machine you use `ssh -X remote-machine` when you make the connection. Everything else is much the same.

sandy12
Posts: 5
Joined: 2010/11/22 14:54:49

Re: Firefox in CentOS from CLI

Post by sandy12 » 2010/11/24 17:18:24

@trevorH

Thank you so much for your patience, my yum install xorg-x11-auth did not work, it said no package available, nothing to do.

I am using a CentOS 5 version version., I am trying to build an asterisk now on this system, I installed the asterisk now ( centos + asterisk + freepbx) aftyer insatllation it takes me to the command line and in order to configure my freepbx modules , it asks me to point the browser to a certain IP address, when I use lynx its too basic and not very user friendly.. i need a GUI browser for this purpose say like firefox, now will you be able to suggest an easier means , also being a newbie i havent much understood the SSH part, also I tried to set up a gnome desktop, which i was able to install but do not know how to launch

Any help would be highly appreciated.

User avatar
TrevorH
Forum Moderator
Posts: 23451
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Firefox in CentOS from CLI

Post by TrevorH » 2010/11/24 20:48:14

It's xorg-x11-xauth not xorg-x11-auth.

helikaon
Posts: 55
Joined: 2008/12/10 14:30:04

Re: Firefox in CentOS from CLI

Post by helikaon » 2010/11/27 14:14:18

Sandy,
why havent you install Desktop environment?

I suggest you to:

yum groupinstall "GNOME Desktop Environment"
yum install firefox

done.

Then you can run firefox from app menu or from shell by typin 'firefox'

Also, if you dont want X to run on machine,
vi /etc/inittab and make sure you boot to runlevel 3

gl&hf

sandy12
Posts: 5
Joined: 2010/11/22 14:54:49

Re: Firefox in CentOS from CLI

Post by sandy12 » 2010/11/29 14:09:09

@trevorh : Thanks a lot!
@helikaon: I Installed the desktop environment and also firefox using the commands u mentioned, also i changed the run level to 3.

but when i try to type in firefox in the terminal it says
Error:no display specified

what could be the problem

Also please tell me how to launch the desktop environment , when i start my computer it only goes to the the terminal.

Thanks.

hansolo
Posts: 231
Joined: 2010/01/13 11:17:42
Location: SI

Re: Firefox in CentOS from CLI

Post by hansolo » 2010/11/30 12:59:30

Hi,

I'm sorry I can't give you solution (as myself can not do it either - I have same problem as you )
but googling takes me to something about '[b]vnc-server[/b] and [url=https://www.centos.org/modules/newbb/viewtopic.php?topic_id=28442&forum=38&post_id=117455]here[/url] and [url=https://www.centos.org/modules/newbb/viewtopic.php?topic_id=28531&forum=39&post_id=117884]here[/url]

How to do it it's still mystery to me :-?

Post Reply