I have a linux box in my office. I left a firefox window open there and came to home. I'd like to access the firefox window over ssh from my home. Is it possible?
You'd need to start
vino-server in that X session, port forward connections to that VNC server and attach to that.
For instance, with
$pid the pid of firefox:
ssh -Y host vino-preferences
Enable sharing without prompt and set a VNC password.
On the remote shell, run:
xargs -0a "/proc/$pid/environ" sh -c ' exec env "$@" /usr/lib/vino/vino-server --tube' sh
Note which port the vnc server is on.
~C to bring the ssh prompt, run (here if VNC is on port 2)
to setup the port forward.
Then one the ssh client, connect to that VNC server with:
(use a different port than 5900/:0 above if the VNC port is already in use on the local machine).
It's a bit simpler with
vncpasswd on the remote host to set a VNC password and:
xargs -0a "/proc/$pid/environ" sh -c ' exec env "$@" x11vnc' sh
And proceed as above for the port forward and connecting to the VNC server.
By default, no. Your running firefox instance is talking to the X server on your desktop.
Depending on your desktop it may have built in "desktop sharing", which is typically a built-in VNC server. You could connect to that and access your whole desktop remotely.
Alternatively there are solutions such as XPRA ( http://xpra.org/ ) which are "screen for X11"; you run the XPRA server, which creates an X server. Inside that you can run your firefox, xterm, whatever. And then attach to that server remotely. But this requires pre-planning.