I know that Ubuntu has multiple virtual consoles run by Getty which you can switch between using CTRL + ALT + F1-F8

I also know that X server runs on the F7 instance and X server runs a GUI like Gnome.

I want to run X sessions on the other virtual consoles (at the same time) so that I can run a different GUI in each all at the same time.

1) Is this possible?

and if yes

2) Does each virtual terminal need a separate X session instance for this to work

3) How do i do it?

  • 1
    Which release are you using? some things differ on allowing everyone access to the Xserver, elg dpkg-reconfigure x11-common no longer works to allow everone access in 16.04. – ubfan1 Jul 3 '16 at 0:19
  • I think i am using 12.xx (I dont have access to the machine which runs ubuntu right now) – megaman Jul 3 '16 at 1:31
  • Why not to run multiple virtual machines using VirtualBox? – Nano Jul 3 '16 at 2:42

Well on 12.xx all the old mechanisms work (not 16.04).

  1. Add the user to the video group (not sure this is needed, but...)

    sudo adduser username video

  2. Authorize users to start the X server (wont work 16.04) Now you could run with sudo, but that will leave all sorts of root owned files in your home directory, and will eventually mess up your login (go to a virtual term to fix things).

    sudo dpkg-reconfigure x11-common Maybe just edit the /etc/X11/Xwrapper.config to put allowed_users=console or everyone That file does not exist in 16.04.

  3. Start an xterm on the new display. The existing display is :0, so just grab the next number :1 etc. and put it on virtual term 8

    xinit /usr/bin/xterm -- :1 vt8

  4. Switch to the new screen on virtual term 8 (crtl alt f8) and in the xterm, start the window manager you want (maybe not unity though). You might need to change the DISPLAY variable to :1 if things open back on the original vt7 screen. You can start things on the display you select with a -display :1 & from the main :0 display.

I took a quick look at 16.04 and didn't see how to authorize users to start X, things have changed since the last time I did this.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.