I'd like to have 2 VT's running, one on VT7 with the standard lightdm + unity interface and another on VT8 running a custom script which will launch a virtual machine in full screen.

At the moment I've tried writing an init.d script with no luck and I can't find any details on a configuration file which will allow me to start 2 servers.

I suppose my ideal answer would be one which points me to a config file I can edit to start up an additional server.

Edit - I forgot to mention in the text that I already know how to start another X session: I'd like this to start automatically at boot.

  • startx -- :n will start another X server on VTn. – Samik Jun 23 '12 at 12:52
  • Actually that doesn't, it starts a display with number n. To start on VTn, you need to run startx -- :1 VTn – jackweirdy Jun 23 '12 at 13:06
  • The classic answer is to modify a line in /etc/ttys but this file appears to have been supplanted in non-ancient versions of Ubuntu (by /etc/console-setup). Maybe an equivalent would be to edit /etc/init/tty6.conf and add your X incantation? I don't have time to explore this and provide a detailed answer. – Alex Hirzel Jun 25 '12 at 15:30
  • @AlexHirzel Not tried it yet but from memory that's what I'm looking for. I'll give it a shot in a moment. – jackweirdy Jun 25 '12 at 15:58
  • Any word on this? Just curious because I have become interested in the same setup! – Alex Hirzel Jun 27 '12 at 4:00

Yes, it is possible. I do it for games.

xinit session -- :1 -xf86config config.conf

Where session should be replaced by the session you'd like to start in the new Xorg display, and config.conf is the configuration file.

For starting it automatically, take a look at this answer.

  • I've already tried the rc.d method with no luck :/ – jackweirdy Jun 25 '12 at 15:15
  • @jackweirdy Doesn't it work when you put the script in /etc/init.d/? Don't forget to make it executable. – RobinJ Jun 25 '12 at 15:17
  • Tried that before. The main X instance wouldn't start and my PC kept rebooting. I'll paste the script in a bit, but it worked fine when executed post-login. – jackweirdy Jun 25 '12 at 15:18
  • 2
    @jackweirdy Does this work? askubuntu.com/questions/74189/run-a-startup-script-with-lightdm – RobinJ Jun 25 '12 at 15:19
  • 1
    That solved it, thanks :D If you could change your answer to include a link to that it'll probably help anyone who comes to view this question at a later date :D – jackweirdy Jun 29 '12 at 16:40

I am not sure about a config file that you can edit, but I do know how to start another X server. Assuming n is the TTY number that you want to start the X server on, the command is

startx -display :2 -- :2 vtn &

You will then get a small white terminal window on that TTY that you can move your mouse in. From there, you need to run the command to start a window manager (e.g. gnome-session) from that TTY.

  • I've discovered this much so far, the problem is I'd like to automate it, IE have it start up by default as opposed to running a script each time – jackweirdy Jun 23 '12 at 13:30
  • unrecognized option vtn, what is vtn? – Arnold Roa Jul 18 '17 at 15:18

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.