SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2015-01-07 04:12:37

hhh
Cityspeak
Registered: 2010-08-04
Posts: 3,253

[SOLVED] Trying to understand LightDM's default session

In /usr/share/xsessions there is a desktop file name Default Session (lightdm-xsession.desktop). The exec line there is Exec=default. So in the greeter screen, the list of sessions is Default Session and then whatever other session desktop files have been created. In my case, that launches Xfce's desktop file (xfce.desktop). What is telling LightDM that that's the default session and not another desktop file in /usr/share/xsessions?

I know that LightDM will log me into the last session I've used if I don't select a new session in the greeter, and I realize I could change the Exec=default line to something else, but I'm curious as to what is actually happening. LightDM's documentation and the web are not helping me.

Last edited by hhh (2015-01-07 18:00:11)


bunsenlabs     8)     forum mod squad

Offline

Help fund CrunchBang, donate to the project!

#2 2015-01-07 05:02:46

machinebacon
#! unstable
From: China
Registered: 2009-07-02
Posts: 6,826
Website

Re: [SOLVED] Trying to understand LightDM's default session

If I remember correctly (don't trust me though), there will be a file named ~/.dmrc written in which the session is actually defined.


Sweaty lads picking up the soap | I love the new "Ignore user" button

Offline

#3 2015-01-07 05:59:24

hhh
Cityspeak
Registered: 2010-08-04
Posts: 3,253

Re: [SOLVED] Trying to understand LightDM's default session

Right, and I thought that's the file that stores the last session I was in. Right now I have 3 desktop files in xsessions... lightdm-xsession.desktop (Name=Default Xsession), xfce.desktop (Name=Xfce Session) and fusilli.desktop (Name=Fusilli Session), the last one I created. So lightdm-gtk-greeter has 3 session entries, Default Session, Fusilli Session and Xfce Session. If I choose Xfce, .dmrc has the content...

[Desktop]
Session=xfce
Language=en_US.utf8

... so it's reading xfce.desktop. This is the part I don't get at all... if I choose Default Session or Fusilli Session the content of .dmrc is...

[Desktop]
Session=lightdm-xsession
Language=en_US.utf8

So how the hell does LightDM know to reload Fusilli, which it does just fine? I can't see any change to /usr/share/lightdm/lightdm.conf.d/01_debian.conf, it's content stays the same...

# Debian specific defaults
#
# - use lightdm-greeter session greeter, points to the etc-alternatives managed
# greeter
# - hide users list by default, we don't want to expose them
# - use Debian specific session wrapper, to gain support for
# /etc/X11/Xsession.d scripts

[SeatDefaults]
greeter-session=lightdm-greeter
greeter-hide-users=true
session-wrapper=/etc/X11/Xsession

As far as I can tell /etc/X11/Xsession stays constant as well.

Mind_Blown_thumb1.gif


bunsenlabs     8)     forum mod squad

Offline

#4 2015-01-07 07:21:28

machinebacon
#! unstable
From: China
Registered: 2009-07-02
Posts: 6,826
Website

Re: [SOLVED] Trying to understand LightDM's default session

Yeah it's confusing - I think that LightDM simply takes the x-window-manager/x-session-manager  that is set with highest priorities in update-alternatives. They are (or should be) also listed in /usr/share/xsessions. If there is no default set there (which might happen when an upgrade failed), it would fall back to the xsession defined in /etc/X11 (which is usually just x-terminal-emulator without anything else), so that the user can fix the problem.

That's the fun part when 'desktop standards' (freedesktop.org, xdg, exo, etc etc) push themselves into the 'user-friendliness' zone. They'd rather just make a dotfile and a safety copy, but no. smile


Sweaty lads picking up the soap | I love the new "Ignore user" button

Offline

#5 2015-01-07 07:32:48

hhh
Cityspeak
Registered: 2010-08-04
Posts: 3,253

Re: [SOLVED] Trying to understand LightDM's default session

There used to be a script, lightdm-set-defaults, that wrote a *.conf file to /usr/share/lightdm/lightdm.conf.d/ but that's been removed in the latest LightDM. That folder now contains one file, 01_debian.conf, it appears also to be static...

# Debian specific defaults
#
# - use lightdm-greeter session greeter, points to the etc-alternatives managed
# greeter
# - hide users list by default, we don't want to expose them
# - use Debian specific session wrapper, to gain support for
# /etc/X11/Xsession.d scripts

[SeatDefaults]
greeter-session=lightdm-greeter
greeter-hide-users=true
session-wrapper=/etc/X11/Xsession

man lightdm shows nothing about configuring the default session. The Ubuntu Wiki says to add user-session=fusilli (for instance) to the file in /usr/share/lightdm/lightdm.conf.d/ but that does nothing AFAICT. I guess the way to go is to edit lightdm-xsession.desktop. So I'm clueless as to what Exec=default calls in that file.

Thanks for the replies! See you at the BBQ.

-edit- I'll try update-alternatives --config x-window-manager first. Thanks for that!

Last edited by hhh (2015-01-07 07:34:23)


bunsenlabs     8)     forum mod squad

Offline

#6 2015-01-07 08:06:08

hhh
Cityspeak
Registered: 2010-08-04
Posts: 3,253

Re: [SOLVED] Trying to understand LightDM's default session

sudo update-alternatives --config x-window-manager
There is only one alternative in link group x-window-manager (providing /usr/bin/x-window-manager): /usr/bin/xfwm4

But I'm starting to understand, after taking a look at man update-alternatives (not an easy read!) A set of symlinks to libraries. So in my case, just testing a window manager in heavy development, letting lightdm do it's thing is the way to go. Now if I could even begin to understand how it knows to load fusilli.desktop if .dmrc only contains Exec=lightdm-xsession and lightdm-xsession.desktop only says Exec=default.  tongue


bunsenlabs     8)     forum mod squad

Offline

#7 2015-01-07 08:32:29

machinebacon
#! unstable
From: China
Registered: 2009-07-02
Posts: 6,826
Website

Re: [SOLVED] Trying to understand LightDM's default session

Maybe this helps: https://lists.debian.org/debian-user/20 … 02242.html

The more I read the less logical it gets smile


Sweaty lads picking up the soap | I love the new "Ignore user" button

Offline

#8 2015-01-07 11:09:19

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2012-03-22
Posts: 1,026
Website

Re: [SOLVED] Trying to understand LightDM's default session

I don't know if this will help, but isn't there also a config file /etc/lightdm.conf or /etc/lightdm/lightdm.conf or /etc/lightdm.d/* (at the moment I don't have access to lightdm-installed system)? Perhaps, there are some important config stuff ...

BTW, are you talking about systemd or init OS?


Postpone all your duties; if you die, you won't have to do them ..
--> The very new BL forum! <--

Offline

#9 2015-01-07 16:14:23

PackRat
#! Die Hard
From: USA
Registered: 2011-03-03
Posts: 1,572

Re: [SOLVED] Trying to understand LightDM's default session

iMBeCil wrote:

I don't know if this will help, but isn't there also a config file /etc/lightdm.conf or /etc/lightdm/lightdm.conf or /etc/lightdm.d/* (at the moment I don't have access to lightdm-installed system)? Perhaps, there are some important config stuff ...

BTW, are you talking about systemd or init OS?

in /etc/lightdm/lightdm.conf

user-session=default   <---  uses the /usr/share/xsessions/

relates to what is set in /etc/alternatives and can be set to another *.desktop file in /usr/share/xsessions.

If you have a ~/.xsession file, lightdm will read that first before the default listed in the lightdm.conf file.

Last edited by PackRat (2015-01-07 16:32:08)


"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe

Offline

#10 2015-01-07 17:59:33

hhh
Cityspeak
Registered: 2010-08-04
Posts: 3,253

Re: [SOLVED] Trying to understand LightDM's default session

@iMBeCil, systemd.

@PackRat, I should have mentioned that I tried that, as well as what's under Configuration at freedesktop.org/wiki/Software/LightDM/.  I also had tried adding user-session=true in 01_debian.conf in addition to user-session=fusilli in lightdm.conf. Reboot, still the Default session is Xfce.

(As an aside, .dmrc is one weird beast. If I renamed lightdm-xsession.desktop to .desktop.bak, rebooted and logged in to Fusilli Session, .dmrc would read Session=fusilli. Restore lightdm-xsession.desktop, boot to Default Session, logout, login to Fusilli Session, it would read Session=lightdm-xsession. ?!)

I was stumped, but also sure that MacBac (<--I need to trademark this, also) was on the right track, namely update-alternatives. Then I found this info on update-alternatives...
https://www.debian.org/doc/manuals/debi … ng.en.html

11.10 wrote:

... if you use a window manager from /usr/local directory, the selections on screen won't contain your preferred entry. You can update the link through command line options, like this:

     update-alternatives --install /usr/bin/x-window-manager \
       x-window-manager /usr/local/bin/wmaker-cvs 50

The first argument to `--install' option is the symlink that points to /etc/alternatives/NAME, where NAME is the second argument. The third argument is the program to which /etc/alternatives/NAME should point to, and the fourth argument is the priority (larger value means the alternative will more probably get picked automatically).

To remove an alternative you added, simply run:

     update-alternatives --remove x-window-manager /usr/local/bin/wmaker-cvs

OK, so just change x-window-manager with x-session-manager and use my WM...

# update-alternatives --install /usr/bin/x-session-manager \
       x-session-manager /usr/local/bin/fusilli 50

Then run # update-alternatives --config x-session-manager... and there's Fusilli, and the appropriate alternatives symlinks have been created.

And now, instead of just editing or deleting lightdm-xsession.desktop, I've learned about alternatives and Xsession.options and I have a greater understanding of Debian and Linux. And now to go shoot myself...

Cheers gents, thanks for the responses.

PS @PackRat: after all that, I found this page. This is you and VastOne, of course. Right?
http://vsido.org/index.php?topic=852.10;wap2

tl;dr Marking this SOLVED.

Last edited by hhh (2015-01-11 01:46:54)


bunsenlabs     8)     forum mod squad

Offline

#11 2015-01-07 18:32:11

PackRat
#! Die Hard
From: USA
Registered: 2011-03-03
Posts: 1,572

Re: [SOLVED] Trying to understand LightDM's default session

Yes it is.

We went through these same hoops a while back.

I don't know if you read through all of that, but there was a legacy .xsession file in the /etc/skel of VSIDO that was messing me up. Once I got rid of that updating the /etc/alternatives worked.

I didn't link that thread here because I wasn't sure that an actual fix or just a work around.

Did that thread actually come up in an internet search, or were you just looking at other Debian sites?

Last edited by PackRat (2015-01-07 18:39:04)


"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe

Offline

#12 2015-01-07 20:42:11

hhh
Cityspeak
Registered: 2010-08-04
Posts: 3,253

Re: [SOLVED] Trying to understand LightDM's default session

It's currently the second Google result for lightdm update alternatives /usr/local.  smile


bunsenlabs     8)     forum mod squad

Offline

#13 2015-01-09 20:41:25

PackRat
#! Die Hard
From: USA
Registered: 2011-03-03
Posts: 1,572

Re: [SOLVED] Trying to understand LightDM's default session

Well then, I hope we did it right over there.


"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe

Offline

#14 2015-03-28 22:49:45

bAjdA
New Member
From: Dnipropetrovsk, Ukraine
Registered: 2015-03-27
Posts: 1

Re: [SOLVED] Trying to understand LightDM's default session

hhh wrote:

And now, instead of just editing or deleting lightdm-xsession.desktop, I've learned about alternatives and Xsession.options and I have a greater understanding of Debian and Linux. And now to go shoot myself...

@hhh, so may be you able to help me? )
I can't change language during lightdm screen (tried switch lightdm-webkit to lightdm-gtk, but got same result), there is only ru_ua (system locale) and no other options, so I can't to enter password. Where should I search for solution?

Last edited by bAjdA (2015-03-28 22:53:20)

Offline

#15 2015-03-31 17:29:27

hhh
Cityspeak
Registered: 2010-08-04
Posts: 3,253

Re: [SOLVED] Trying to understand LightDM's default session

Lightdm-webkit? What, are you on Ubuntu, or you installed it from GitHub?

Anyway, do you mean the panel language setting? You have to have other languages installed via locales, I believe. In a terminal, run...

sudo dpkg-reconfigure locales

... and use your arrow keys and the space bar to select languages, and Tab to switch to "Cancel" or "OK", then Enter. Do NOT choose "All locales"...
https://wiki.debian.org/Locale

Log out and your languages should be available in lightdm-gtk-greeter. Otherwise, maybe this will help...
https://bbs.archlinux.org/viewtopic.php?id=165381

BTW, your question is off topic. Next time open a new thread (this would have gone in one of the Help and Support forums, depending on what OS you're running). No harm no foul, it will just give you a quicker response. Cheers.

-edit- Although, by posting here you did get to see that awesome "mind blown" gif.  tongue

Last edited by hhh (2015-03-31 17:30:34)


bunsenlabs     8)     forum mod squad

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo