I would like to run two X server instances at the same time.
One would be an interactive session using the mouse and keyboard attached to the computer. The other would be a 'virtual' session that I could then connect to and use over a network.
In other words, I want something like telnet/ssh that allows me to log in to my Ubuntu machine from somewhere else. However, I would like at least a basic graphics display when I log in.
If you are running an X session under Ubuntu on machine A it will appear on screen:0 (Ctrl+Alt+F7) on A.
You want to run a remote X Session from machine B (on your Lan) without interrupting your current session on A.
Go to the first console screen (Ctrl+Alt+F1) login at the console and then ask Machine B to send an X session to screen: on A - like this
X
asks for an X session,:1
says to put it on screen 1,-query
asks for the session from in this case IP address of BYou will find the new session on screen :1 (Ctrl+Alt+F8).
This is not secure (no ssh) but is quick and easy for a home network when sound is not required over the connection.
You can use nomachine's nxclient/server which is fine but runs in your current session on A screen :0 in its own window. It provides support for local sound and local printing - last time I looked Firefox would not start up if sound was enabled.
ssh -X
The first and easiest option would certainly be "ssh -X", but this will only work when the system you connect from is already running an X server. So suppose you are running an Ubuntu machine and want to connect to another Ubuntu machine, you can type "ssh -X ipaddress" in the console. This will leave you with a console, but when you start any application that uses X from that console, it will be shown in your current X session.
XMing
If you would be running windows and want to start an X session on a remote Ubuntu machine, you can use XMing. XMing is basically an X server to run on windows. It is available on sourceforge.
To use XMing, XDMCP must be enabled on your Ubuntu machine. This was easily done in Ubuntu before 10.04. Nowadays, you have to update /etc/gdm/custom.conf as follows. Make sure to make a backup first! You don't want to mess up GDM with this ;)
Not quite an answer to your question, but...
You can run X-programs over ssh, I often use this to give me access to protected/restricted services on my LAN when i'm out. Basicly what it does is connect a pipe from you machine to an ssh-server ans forward the display from the server to the client, but the application is running on the server. By default the SSH client isn't setup for this but it can be enabled by using the
-X
option. Ex:Actually this is how LTSP works these days. You might be able to find more information on how LTSP is doing when remotely using a whole session instead of just a single app.
I actually discovered another way to achieve this: with xrdp .
xrdp
is a Remote Desktop server for Linux that creates a separate login session (with X) that can be accessed with Windows' Remote Desktop tool or with other RDP compatible applications.FreeNX will also serve your purpose.
From Ubuntu Wiki:
https://help.ubuntu.com/community/FreeNX
Sounds like you might be looking for a VNC server package. There are two kinds of VNC server packages-- the ones that share your existing X display, and the ones that manage a separate X desktop for remote use. The latter is the kind you seem to want. Examples include vnc4server and tightvncserver/tigervncserver.
Those packages allow you to start additional X displays in the background. To see them, you use a VNC viewer/client. There are multiple clients available for Ubuntu and Windows, not to mention Android, PalmOS, etc.