How do I add a new session for X?
I added a new file to /usr/share/xsessions and the choice now shows in KDM but where do I put the init script?
How do I add a new session for X?
I added a new file to /usr/share/xsessions and the choice now shows in KDM but where do I put the init script?
silenuz wrote:
> How do I add a new session for X?
>
> I added a new file to /usr/share/xsessions and the choice now shows in
> KDM but where do I put the init script?
is it your plan to run two different X sessions on one machine, at the
same time?
what is it you are trying to achieve? two different users at the same
time, or two different displays running two different application…or
just what is your goal?
or, are you just trying to add another window manager/display
environment ???
are you following a how-to? which/where?
–
goldie
Just trying to set up a new session, or I guess you phrased it "display environment’
Basically I want to set up a session that launches a certain window manager and other applications. Back in the day you edited the files in /etc/X11/xsession where each session would have an init script.
Hi
Why not use Xnest? eg;
Xnest :2 -ac&
twm -display :2
–
Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.25-0.1-default
up 1 day 1:03, 2 users, load average: 0.31, 0.15, 0.10
GPU GeForce 8600 GTS Silent - Driver Version: 190.18
Sorry may have been unclear. xnest i snot what I need.
I want to be able to start the session from kdm/gdm. I already added the file to make it show up as a session in the session menu in kdm/gdm, but where do put the script that starts the windowmanager and whatever applications I want to start?
For example say I was in run level 3, if I wanted to create a session I would create a .xinitrc file in my home directory that would execute a window manager and whatever applications I wanted to open when I type startx.
STOP! as far as i can tell, you are trying to do something very retro…
TODAY it is so very easy…if you are normally launching and working
in KDE4 and wish to work (take a look at, etc) at Gnome (or KDE3, or
Xvfc or or or or) just use YaST to install the other desired display
environments…then, while in (say) KDE4 just right click the
desktop, choose “Switch user” then when you get to the log in screen
just look in “Sessions” (down in the bottom left of the screen) and
PICK whatever you wanna go to (KDE3, Gnome, etc etc) then log in as
yourself again and you are THERE…
no need to worry about setting up a “second X” or hand type any config
files…
your granddaddy’s linux = difficult
today’s linux = easy
however, if you wanna do it the back in the day way i guess all the
files are there to hand manage…but, WHY?
on the other hand: the result of your attempts to do it manually MAY
have upset the apple cart and not allow the easy use of log out >
pick session > log in > smile
ymmv
–
goldie
CAVEAT: The author of this posting does not warrant the accuracy,
completeness, legality, or usefulness of its content and is not
responsible for consequences resulting from its use.
TODAY it is so very easy…if you are normally launching and working
in KDE4 and wish to work (take a look at, etc) at Gnome (or KDE3, or
Xvfc or or or or) just use YaST to install the other desired display
environments…then, while in (say) KDE4 just right click the
desktop, choose “Switch user” then when you get to the log in screen
just look in “Sessions” (down in the bottom left of the screen) and
PICK whatever you wanna go to (KDE3, Gnome, etc etc) then log in as
yourself again and you are THERE…
Right, and to add a session to that list of sessions on the bottom left you add a file to /usr/share/xsessions. I’m not asking how to add something to the session list, I’m asking how to have something auto executed for a given session.
For example say I wanted to define a session that uses XFCE as the window manager and launches a term at 0:0 and say thunderbird.
then maybe I might want another session say that still uses xfce as the windowmanager but launches firefox and some other apps lets say.
So I’m asking where to put the init script that would go with a given session?
I’m not sure it can be done using kdm, the KDE display manager. As far as I know, KDE only allows one session per user to be saved.
I think you’re on the right track with separate .xinitrc files. Boot into runlevel 3, a linux shell, login and start the xserver session with a script using either “startx” or “xinit” pointing to the desired .xinitrc file. The man pages for xinit and startx are one place to start looking for howto information.
I just tried the following. With my Opensuse installation, using startx from the bash prompt brings up KDE. Using the xinit command brings up a a plain xsession with a single xterm. That’s as far as I’ve explored.
> So I’m asking where to put the init script that would go with a given
> session?
can’t help more…you are past my level of knowledge…good luck…
–
goldie
Start one session as user1, from there start a new session as user2. Ctrl-Alt-F7/F8 switches between sessions. Like any session you can configure them through Systemsettings - Advanced - Session management. KDM ‘remembers’ what kind of session the user* started on previous login.
If you would do this by adding lines in a file in /usr/share the changes would get lost on an update.
Please let go of the idea that all has to be configured ‘by hand’ on linux systems. You still can, but why, if there are nice solutions, that ‘think’ about everything?
Thank you, Knurpht. I was just thinking to myself that .xinitrc was not the way to go and you come up with the elegant solution.
I don’t know if this is relevant to the question of the op.
I am using xfce but I can change my windowmanager using a luncher in the xfce panel. I created two windowmanager luncher in the panel (xfwm4 and kwin) and just click it with mouse whenever I want to change from one wm to the other. In case this is relevant for the op’s quest the command input for the luncher is kwin --replace for kwin or xfwm4 --replace for xfwm4.
Thanks to everyone who replied.
I didn’t figure out where the session file would go, but managed to get it working how I wanted. What I ended up doing was put a script in /etc/X11/xinit/xinitrc.d that tested the $DESKTOP_SESSION variable, and depending on the name of the variable it opens certain applications.
Cheers mate. Hope you found what you’re looking for.