Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
    
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

2 Answers 2

up vote 3 down vote accepted
+50

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.

share|improve 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
    
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.

share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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