You are not logged in.

#1 2015-09-10 15:09:24

PootisBird
Member
Registered: 2014-04-16
Posts: 125

[Solved]Auto select proper session per user preference.

Is there a way to tell sddm that Bob likes kde while Steve likes i3 ?
I've got multiuser setup, I'd like to use lxqt for my account, if I set it on sddm window then it will remember it forever, which will make all users login to lxqt. It's not a good way.
I wanted to override it with .xsession but nowadays it's ignored.
Any suggestions ?

Last edited by PootisBird (2015-09-11 14:42:31)

Offline

#2 2015-09-10 19:37:47

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [Solved]Auto select proper session per user preference.

PootisBird wrote:

Is there a way to tell sddm that Bob likes kde while Steve likes i3 ?

Not yet: https://github.com/sddm/sddm/issues/481

I wanted to override it with .xsession but nowadays it's ignored.

What did you try exactly? Seems like it could work. Otherwise you can also hack something into sddm's Xsession script.

Any suggestions ?

If overriding doesn't work, use another DM for now (for example: https://wiki.archlinux.org/index.php/Li … t_session).

Last edited by Raynman (2015-09-10 19:38:08)

Offline

#3 2015-09-11 11:13:58

PootisBird
Member
Registered: 2014-04-16
Posts: 125

Re: [Solved]Auto select proper session per user preference.

Thanks for replying, at first I tried to run "killall -u user && startx" which may induce few facepalms. It was killing session before it had chances to register another.
After some sleep an idea came to my mind.

So I wrote little script which is run by .xprofile.

## Test function
if [ $XDG_RUNTIME_DIR = "/run/user/1000" ]; then
    echo "Loading session for user 1000"
    exec lxqt-session
    else echo "Not user 1000"
fi

However, it does not start lxqt session directly, what starts looks like plasma with lxqt decorations and some lxqt settings.
I've tried lightdm by inserting this script to /etc/lightdm/Xsession with same results.
What am I doing wrong ? I am beginner at scripting as might be seen above.

Offline

#4 2015-09-11 12:07:03

qwerty12
Member
From: London
Registered: 2011-06-20
Posts: 34

Re: [Solved]Auto select proper session per user preference.

Using a DM that obeys the /home/$USER/.dmrc file, like LightDM, may be better in the long run.

Last edited by qwerty12 (2015-09-11 12:08:20)

Offline

#5 2015-09-11 13:57:22

PootisBird
Member
Registered: 2014-04-16
Posts: 125

Re: [Solved]Auto select proper session per user preference.

Lightdm does not obey .dmrc contents. From my initial tests though.

.dmrc

[Desktop]
Session=openbox
Language=pl_PL.utf8

This file starts plasma anyway. Lightdm.

Edit. I've changed .dmrc permissions and it's fine now. Now I need to find nice lightdm theme

Last edited by PootisBird (2015-09-11 14:42:15)

Offline

#6 2015-09-21 13:27:40

PootisBird
Member
Registered: 2014-04-16
Posts: 125

Re: [Solved]Auto select proper session per user preference.

Today an idea came to my mind. What if I just inject some bash magic to /usr/share/xsessions/plasma.desktop ?
It worked like a charm, it's a nice feeling.

So for starters, I have used sddm though I'm sure that any DM will do.


I have changed one line in /usr/share/xsessions/plasma.desktop
From

Exec=/usr/bin/startkde

to

Exec=/usr/share/test.sh

Contents of /usr/share/test.sh

if [ $XDG_RUNTIME_DIR = "/run/user/1000" ]; then
    echo "Launching custom session for user 1000"
    exec startlxqt
    else exec /usr/bin/startkde
fi

Offline

Board footer

Powered by FluxBB