Click to See Complete Forum and Search --> : X session forwarding -- remote session
Tjoh311
09-26-2008, 12:52 AM
Hello,
What I'm trying to do seems pretty simple, but I'm really not 100% familiar with the nuts and bolts of the xserver. Basically I have machine "A" which is my main machine. I'm running Ubuntu 8.04. my only keyboard and mouse and monitor is plugged into this computer. On the other end of my network I have machine "B" which is running Debian "etch".
I normally use xtightvncviewer, but recently I've noticed that if machine "B" is not logged in, I can't view the desktop. So I'm wondering if anyone knows how to either start the desktop through ssh or possibly forward the Xsession to a virtual terminal on machine "A"?
Thank you in advance
Troy
furrycat
09-26-2008, 05:45 AM
There are two common ways of exporting an X11 desktop via VNC. Either you run a program like x11vnc which reads the display and exports it via the RFB protocol or the server itself speaks RFB. Xorg does indeed support a built-in VNC server which will work at the display manager and beyond. If you can't connect when no one is logged on it sounds as though this is not set up.
If it's supported on whichever version of Xorg ships with Etch you can enable it by adding lines to the Modules and Screen sections of xorg.conf:Section "Modules"
Load "vnc"
EndSection
Section "Screen"
Option "PasswordFile" "/etc/X11/vncauth"
EndSectionThe /etc/X11/vncauth file would be created usingvncpasswd /etc/X11/vncauthto set the password needed to connect.
If this doesn't work you can indeed open a display remotely by running startx. If you put the machine into runlevel 3 you can run startx with no arguments and it will work. If you stick to runlevel 5 the initial display will be in use by the display manager and you will have to request a new display:startx -- :1
Tjoh311
09-27-2008, 01:29 AM
Ok, so I added the lines to my xorg.conf file on my machine "B" (which I think would be the server) when I run
vncpasswd /etc/X11/vncauth
It says command not found.
In your second example, could you possibly put that into context for me?
I'm not sure which machine to run that on or whether I need to add ip information etc....
happybunny
09-27-2008, 01:09 PM
also, you know you can ssh -X from machine A to B and forward just certain apps'? A little more practical in my point of view.
also you can try "X -broadcast :1" and use xdmcp, too
Tjoh311
09-27-2008, 04:22 PM
When I tried to start another screen on my second machine, I got this:
(EE) Failed to load module "vnc" (module does not exist, 0)
Also, When you forward only certain apps through ssh, can you do that on one of the virtual terminals? (tty1)