You are not logged in.

#1 2015-06-20 07:33:46

fazky
Member
Registered: 2012-01-25
Posts: 34

[Solved] LightDM Log File

Hello,

I am using `lightdm` with `lightdm-gtk-greeter` to start my window manager, and programs.

The script, that is executed by `lightdm` is `~/.xinitrc`.  I have various log messages in this script (`echo ThisIsHappening`). However, I cannot find these log messages anywhere.  Places that I have looked at, so far:
- /var/log/lightdm
- /var/cache/lightdm
- /run/lightdm
- journalctl -b

Do you have an idea, where stdout is redirected to when using lightdm?  I could redirect all my output to a specific log file, however, I would prefer to know, where the logs really go...

Thanks,
Dominik

community/lightdm 1:1.14.0-3
community/lightdm-gtk-greeter 1:2.0.1-2

Last edited by fazky (2015-06-22 11:56:15)

Offline

#2 2015-06-20 08:00:56

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [Solved] LightDM Log File

What makes you think that LightDM is parsing your ~/.xinitrc file in the first place?

The .xinitrc file is only used by the startx command, DM's don't even look at it.

Edit - Ignore this post, it looks loke LightDM does source the .xinitrc file after all instead of just .xprofile as I previously thought, sorry.

Last edited by Slithery (2015-06-20 08:05:00)


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2015-06-20 08:52:44

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: [Solved] LightDM Log File

Have you tried to look in ~/.xsession-errors (if you have it)?

--edit[0]:

slithery wrote:

Edit - Ignore this post, it looks loke LightDM does source the .xinitrc file after all instead of just .xprofile as I previously thought, sorry.

Is that so? Looking at the file /etc/lightdm/Xsession it seem that LightDM sources the system wide xinitrc configuration files in /etc/X11/xinit/xinitrc.d. The user configuration files sourced seems to be only .xprofile, .Xresources, .Xkbmap and .Xmodmap.

PS: Beated by Raynman tongue

Last edited by mauritiusdadd (2015-06-20 15:30:50)


About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

#4 2015-06-20 08:58:48

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

Re: [Solved] LightDM Log File

I'll repeat the question (and I'm wondering what prompted the edit):

slithery wrote:

What makes you think that LightDM is parsing your ~/.xinitrc file in the first place?

The .xinitrc file is only used by the startx command, DM's don't even look at it.

Edit - Ignore this post, it looks loke LightDM does source the .xinitrc file after all instead of just .xprofile as I previously thought, sorry.

The package (by default) uses this script to set up your X session and it does not use ~/.xinitrc. It execs the command line that it receives as arguments and that should be an Exec= line from a .desktop file in the xsessions directory (these are the options in the session selection widget in the greeter).

Offline

#5 2015-06-20 09:25:31

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [Solved] LightDM Log File

The edit was prompted by reading the Xprofile page which seemed to suggest that the xinitrc files were sourced by LightDM, although I never believed this to be the case hence my first post.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#6 2015-06-22 08:55:36

fazky
Member
Registered: 2012-01-25
Posts: 34

Re: [Solved] LightDM Log File

Hello,

I am not sure why it sources my `.xinitrc`.  However, I am sure that it does indeed happen ;-)!  I also can see this in the lightdm debug file `/var/log/lightdm/lightdm.log`:

[+234715.91s] DEBUG: Session pid=630: Running command /etc/lightdm/Xsession /home/dominik/.xinitrc

No messages pop up in `.xsession-errors`.

Thanks for your responses!

Cheers,
Dominik

Edit:  Oh, I know now, why it sources my `.xinitrc`.  I state this in my xsession file that is started by `/etc/lightdm/Xsession`.

Last edited by fazky (2015-06-22 09:08:17)

Offline

#7 2015-06-22 11:51:03

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: [Solved] LightDM Log File

I don't use LightDM so I have no other idea, but are you sure that LightDM redirects the stdout/stderr to the log file? Have you tried to write the messages to the stderr? Perhaps it is simpler if you just write  your messages to a log file

echo "ThisIsHappening" > $logfile

About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

#8 2015-06-22 11:55:49

fazky
Member
Registered: 2012-01-25
Posts: 34

Re: [Solved] LightDM Log File

Yea, I mean this would be a solution, but it makes me a little uneasy, that all my messages are just lost somewhere.  Also, `journalctl _PID=630` (Xsession had PID 630 in my case) does not show any log messages...

I will use this solution for now though, thank you,
Dominik

Offline

Board footer

Powered by FluxBB