How to Run Two X Sessions Simultaneously on Ubuntu

displaysessionxorg

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.

Best Answer

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

u@A:~$  X :1 -query IP-of-B

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 B

You 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.