[CentOS] remote ssh to machine how display firefox

Fri Dec 7 02:50:54 UTC 2007
Amos Shapira <amos.shapira at gmail.com>

On 07/12/2007, Jerry Geis <geisj at pagestation.com> wrote:
>
>
>  Jerry Geis wrote:
> > I can ssh into a remote machine.
> > I can start X on that machine with startx
> >
> > How do I then start firefox on that machine (from the ssh prompt) and
> > have it display on my machine in my office.
> >
> > So I want to be using firefox on the remote machine but displaying the
> > screen output from firefox in my office.
> > Both boxes are running centos 5.
>
> don't startx on the REMOTE machine, have it running on the LOCAL machine.
>
> local$ ssh -X remote
> ...authenticate...
> remote$ firefox &
>
> and firefox should open on the local...
>
>  I tried the above (without the &) and firefox just returns.
>
>  I looked at /etc/ssh/sshd_config and X11Forwarding is yes.

First - make sure you have "xauth" installed on the remote machine.
With CenttOS 5 it comes in xorg-x11-xauth. Ssh needs it to pass over
the x11 authentication cookies (e.g. I don't install X environment on
my servers so I have to remember to install this package separately).

Secondly - when you login through SSH, type "echo $DISPLAY" and see if
you get anything - if not then X11 isn't being forwarded yet.

Also I hope you start ssh after having X11 environment started on your
local machine and from a shell which has $DISPLAY set correctly
*locally*.

When all these tests are passed I usually try to run a basic X11
program like "xlogo" but you might not have it so just try to run
firefox again and see what happens.

--Amos