Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
second X session with another .xinitrc, please
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
kamagurka
Veteran
Veteran


Joined: 25 Jan 2004
Posts: 1026
Location: /germany/munich

PostPosted: Sat Sep 18, 2004 6:05 pm    Post subject: second X session with another .xinitrc, please Reply with quote

i sometimes start a second X session, for gaming and the likes.
my normal X session is started via "startx", which means my .xinitrc is kinda full; i would like to know if there is a startx-parameter i can use to define an alternate config file? like "startx -- :2 --config .xinit2", only right.
thanks in advance.
_________________
If you loved me, you'd all kill yourselves today.
--Spider Jerusalem, the Word
Back to top
View user's profile Send private message
Hauser
l33t
l33t


Joined: 27 Dec 2003
Posts: 650
Location: 4-dimensional hyperplane

PostPosted: Sat Sep 18, 2004 6:29 pm    Post subject: Reply with quote

Write a script like this:
Code:
#!/bin/bash
cp ~/.xinitrc-2 ~/.xinitrc
startx -- :1

Call it x2 or something like that, make it executable and put it in, say, /usr/local/bin, then you should be able to start a second xsession by executing 'x2' in another terminal. Of course, you should also do similar things to your normal .xinitrc by using a 'x1'(or whatever you would like to call it) script:
Code:
#!/bin/bash
cp ~/.xinitrc-1 ~/.xinitrc
startx

_________________
AMD Athlon XP 2600+; 512M RAM;
nVidia FX5700LE; Hitachi 120Gb
2.6.9-nitro4, reiser4, linux26-headers+nptl

Do I like to compile everything?
Positive definite!
Back to top
View user's profile Send private message
kamagurka
Veteran
Veteran


Joined: 25 Jan 2004
Posts: 1026
Location: /germany/munich

PostPosted: Sat Sep 18, 2004 7:03 pm    Post subject: Reply with quote

thank you, but that is
1. a hack.
2. nothing i didn't already think of.
_________________
If you loved me, you'd all kill yourselves today.
--Spider Jerusalem, the Word
Back to top
View user's profile Send private message
Irom
Tux's lil' helper
Tux's lil' helper


Joined: 07 Oct 2003
Posts: 95
Location: am arsch..

PostPosted: Sat Sep 18, 2004 7:03 pm    Post subject: Reply with quote

I use this script

Code:

#!/bin/bash
sexe="wine /public/spiele/Starcraft/starcraft.exe"

export DISPLAY=:1
X -ac -config xorg-starcraft.conf -depth 16 :1 & xpid=$!
wterm +sb -sh -background black -foreground lightgray -ls -pr &
$sexe
kill $xpid

xorg-starcraft.conf is the configfile for a 640x480 X-server (located in /etc/X11). I also start a terminal in case I forgot to mount the CD. The X-Server exits with the game.
No need to copy .xinitrc around.
_________________
http://ftp.fukt.bsnet.se/pub/movies/stallman/ (Please watch this before you form an opinion about GNU)
https://apfelboymchen.net/gnu/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum