Click to See Complete Forum and Search --> : Graphical remote access


BarDock
06-17-2008, 01:33 PM
Hi,

I'm trying to get some sort of graphical remote access for linux working. I've tried a VNC server but that only starts once the user has logged into gnome so that won't do.

I've also tried XDMCP but that I spent days on that and it STILL doesn't work so I've given up on it.

Any other ways of seeing Linux graphically? Or is there a way to start VNC right at the login prompt instead of as a autostart program when Gnome starts? With XDMCP I could get the broadcast but when I logged in all I got was the X cursor and the gray background but nothing on it.

I'm using XUbuntu as the server and I've tried XMing, Exceed, XWin as my clients. They're on the same network and I've forwarded ALL the ports to and from the xubuntu box.

Any ideas?

paj12
06-17-2008, 01:56 PM
You can use an SSH connection as a "tunnel" to forward your X session.

More info here:
http://www.linux-tip.net/cms/content/view/302/26/

BarDock
06-17-2008, 02:14 PM
I'm getting the following when I try to launch xclock using the guide you linked to.

X connection to localhost:12.0 broken (explicit kill or server shutdown).

ph34r
06-17-2008, 02:25 PM
ssh -CY username@remotehost /path/to/app/to/launch

Assuming you have an X server running on your local machine, this will send the display of whatever app back to your local X server via the SSH tunnel. The cygwin project has a great Win32 X server if that is what you need... if it is, you'll need to tell Putty to allow X forwarding in the settings for your connection.

For XDMCP, you need to edit your gdm.conf to allow it, and to specify the port (177 is default, its a few lines after enabling XDMCP in gdm.conf), and then your firewall has to allow it. Once all that is done, going to a new virtual console (ctrl+alt+f2, etc), log in as your user (or just start a terminal with gygwin-x), and run

X :2 -query ip.of.xdmcp.server

And you should get a login prompt... change the :2 to a :1 if you are in Windows and using cygwin-x

BarDock
06-17-2008, 02:44 PM
For the XDMCP, I did all that and all I'm getting is a large grey screen.

The SSH thing seems to work but doing startx for gnome doesn't seem to work well.

bwkaz
06-17-2008, 06:54 PM
That's because you can't startx from anywhere except at the local machine. (The startx program fires up the X server and a set of clients; the server tries to use a console on the machine that startx is run from. Since that's not your machine, it won't work right.) You have to use the X server that's already running on the machine that made the ssh connection. :) What you can do, though, is start up any X-using program (say, gvim or firefox), and it should connect to the X server that's already running on the machine that made the ssh connection.

But XDMCP is probably better, if you can get it working. I'm just not sure what the problem is there, since I've never set up XDMCP...

Are you sure your X server works with the -query option? It sounds like you might be starting up an X server that doesn't do XDMCP, and doesn't support -query (or doesn't support it correctly), so it's just starting up the default server. The default server just shows a black-and-white stipple pattern and an X-shaped mouse cursor. Ctrl-Alt-Backspace is probably the only thing that'll kill it.

BarDock
06-17-2008, 07:00 PM
My user ended up only using 2 graphical applications and SSH so simple X11 forwarding through SSH and the windows XMing program turns out to be the best solution for us. Ming can make multiple windows, one for each program forwarded, its very slick. Kinda like the reverse of the seamlessRDP and rdesktop.

Thanks for all the ideas,
Nick