LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   xinit :2 gives error "Server already active for display 0" (https://www.linuxquestions.org/questions/linux-newbie-8/xinit-2-gives-error-server-already-active-for-display-0-a-4175554962/)

wingman358 10-01-2015 12:04 AM

xinit :2 gives error "Server already active for display 0"
 
I have a script:

Code:

$ cat /bin/starcraft
xinit /usr/bin/wine /home/me/StarCraft/starcraft.exe :2 -xorg.conf xorg.conf-starcraft

which I was hoping would start a new x server, :2, with the special xorg.conf-starcraft which has only one display mode, 640x480, to force my screen into that resolution. Running gives:

Code:

$ starcraft

(EE)
Fatal server error:
(EE) Server is already active for display 0
        If this server is no longer running, remove /tmp/.X0-lock
        and start again.
(EE)
(EE)
Please consult the The X.Org Foundation support
        at http://wiki.x.org
 for help.

(EE)

X connection to :0 broken (explicit kill or server shutdown).

Why is it giving me an error for display 0 if I am issuing a command to start up a new x server ":2"???

wingman358 10-01-2015 12:26 AM

OK well I decided to simplify!

Rather than trying to start up a new x server and switch displays etc etc, I decided to just go straight for what I was trying to do - set the display to 640x480, then start starcraft.exe. This works:

Code:

xrandr -s 640x480
wait
wine /home/me/StarCraft/StarCraft.exe
wait
xrandr -s 1920x1080

and resets the resolution when I exit SC!


All times are GMT -5. The time now is 07:12 PM.