Maintaining a persistent session for use over network.

And I want to be able to log in and log out from either linux or windows.

So far I have a simple VNC server, that starts xfce and if I needed it, some other programs.
I’ve found how to autologin so the vncserver can be started automatically.

Not to worry, while the machine firewall is disabled it is behind a router that only will have ftp and http ports opened to this computer. I need this setup because one program I need to use requires the X server running and to turn this computer into a headless one that I can manage within the internal network.

I’ve tried to use XDMCP from the X server, but all it does is login into a new session, and when I close it, the session gets destroyed killing this program I need.
I’m interested in using some kind of program (either XDMCP or NX for example) that interfaces with the X server directly or that feels more responsive since I will be using the machine trough the internal lan and I have bandwith to spare, not so cpu (computer is a fanless Via C3 at 800 mhz)

The VNC server is fine, though, I have one problem.
The connection randomly disconnects (sometimes when I click, others with no apparent reason). It’s not that much of a problem since the server is intact, and all I would have to do is reconnect to continue using it. But it’s annoying as it happens very often.

Log, just in case:

04/03/2009 19:07:57 Got VNC connection from client 192.168.1.102
04/03/2009 19:07:57 Using protocol version 3.4
04/03/2009 19:07:57 Non-standard protocol version 3.4, using 3.3 instead
04/03/2009 19:08:02 Full-control authentication passed by 192.168.1.102
04/03/2009 19:08:02 Pixel format for client 192.168.1.102:
04/03/2009 19:08:02   32 bpp, depth 24, little endian
04/03/2009 19:08:02   true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0
04/03/2009 19:08:02   no translation needed
04/03/2009 19:08:02 Using hextile encoding for client 192.168.1.102
04/03/2009 19:08:02 rfbProcessClientNormalMessage: ignoring unknown encoding 17
04/03/2009 19:08:02 rfbProcessClientNormalMessage: ignoring unknown encoding 16
04/03/2009 19:08:02 rfbProcessClientNormalMessage: ignoring unknown encoding 9
04/03/2009 19:08:02 rfbProcessClientNormalMessage: ignoring unknown encoding 8
04/03/2009 19:08:02 Using copyrect encoding for client 192.168.1.102
04/03/2009 19:08:02 Using compression level 6 for client 192.168.1.102
04/03/2009 19:08:02 Enabling X-style cursor updates for client 192.168.1.102
04/03/2009 19:08:02 Enabling cursor position updates for client 192.168.1.102
04/03/2009 19:08:02 Using image quality level 6 for client 192.168.1.102
04/03/2009 19:08:02 rfbProcessClientNormalMessage: ignoring unknown encoding -65530
04/03/2009 19:08:02 Enabling LastRect protocol extension for client 192.168.1.102
04/03/2009 19:08:02 rfbProcessClientNormalMessage: ignoring unknown encoding -223
04/03/2009 19:08:02 rfbProcessClientNormalMessage: ignoring unknown encoding -32768
04/03/2009 19:08:02 rfbProcessClientNormalMessage: ignoring unknown encoding -32767
04/03/2009 19:08:02 rfbProcessClientNormalMessage: ignoring unknown encoding -32766
04/03/2009 19:08:13 WriteExact: select: Interrupted system call
04/03/2009 19:08:13 rfbSendUpdateBuf: write: Interrupted system call
04/03/2009 19:08:13 rfbClientConnectionGone
04/03/2009 19:08:13 VNC Client 192.168.1.102 gone
04/03/2009 19:08:13 Statistics:
04/03/2009 19:08:13   key events received 0, pointer events 254
04/03/2009 19:08:13   framebuffer updates 38, rectangles 357, bytes 1052091
04/03/2009 19:08:13     cursor shape updates 11, bytes 1782
04/03/2009 19:08:13     cursor position updates 1, bytes 12
04/03/2009 19:08:13     hextile rectangles 345, bytes 1050297
04/03/2009 19:08:13   raw bytes equivalent 6141092, compression ratio 5.847005
04/03/2009 19:08:13 GenerateVncDisconnectedEvent

Note this time it took 11 secons to die. Normally I use UltraVNC viewer for the job, but TightVNC and RealVNC viewer dies like this as well.

I know how to move on linux but since this is the first time I’m doing this and I’m not that expert, I will be working on a virtual machine (VirtualBox) so I can test everything before, so, any suggestion (about the VNC server, XDMCP or even how to login or start stuff ) will be welcome.

Thanks for the time.

I’m having trouble understanding how VNC can run as a server on the headless machine if the only access available to it is ftp and http. I would thik it’s necessary to enable port forwarding on the router and to forward the port that VNC is set (by you) to use (probably 5901, but check). I would think yo uneed to forward that port as TCP to destination 192.168.1.102.

Maybe you’ve got that set anyway?
The client connection is failing by the look of the log report.
Can’t say why UltraVNC client would fail. I get good results from TightVNC and wrote the method/s up here:
TightVNC (VNC Xvnc) on openSUSE as Client or Server (Remote Desktop Connections)

The, running vncserver as a service will come in handy (so I can remove the passwordless autologin), thanks for the link.

As for accessing the computer, I meant inside the lan, my house internal network, not from the internet.

Any firewall on any computer inside the lan network is disabled (including the headless one), since the router already acts as a firewall for the internet.
Because I’m inside the lan network, I can access any port on the headless machine.

TightVNC viewer also dies but here tells me “socket error while writing”.
I’ve remembered that sometimes VirtualBox lan connections acts up and disrupts connections (making downloads fail, for example, forcing me to restart the download), so perhaps it’s problem of VirtualBox.

If I keep having the same problem once I have set up the actual machine, I’ll come back.

As for XDMCP, is not possible “joining” into an existing session?

You could also set up terminal services (Xrdp) on the Linux server and log in all sorts of ways from a client using rdesktop [you can get to a console or to Gnome, KDE (yuk), TWM, ICEWM and so on]. That’s also win/Linux cross compatible and the remote desktop persists if the client drops off and waits for the client to reconnect. But I’m not recommending learning new tricks, suggest first to get bug out of VBox net connection.

I’m having the same problem. The vncviewer always disconnects when I close some of the windows or switching between desktops. openSUSE 11.1. Both realvnc viewer and tightvnc viewer from windows xp platform have the same results.

“let remote server deal with mouse cursor” mentioned in the following thread worked for me.

VNC Broken in 11.1 KDE and GNOME - Page 3 - openSUSE Forums

Thanks for pointing that out for me. Now the viewer lasts longer but not an indefinite amount of time and it still can crash almost instantly.
Still, it’s long enough to do some more work.