Running lightdm on read-only file system.

Asked by Jason Cipriani on 2013-10-16

I am in a situation where the root filesystem is mounted read-only (I can temporarily mount it as read-write to make changes but in production it is read-only).

When it is mounted as ro, lightdm fails to start. The output of /var/log/lightdm/lightdm.log is less than informative, but I am quite sure it's a result of the file system being read-only, as it works fine when mounted read-write:

[+3024.00s] DEBUG: Greeter start authentication for gumstix
[+3024.00s] DEBUG: Started session 1984 with service 'lightdm', username 'gumstix'
[+3024.18s] DEBUG: Session 1984 got 1 message(s) from PAM
[+3024.18s] DEBUG: Prompt greeter with 1 message(s)
[+3025.89s] DEBUG: Continue authentication
[+3026.46s] DEBUG: Session 1984 authentication complete with return value 0: Success
[+3026.46s] DEBUG: Authenticate result for user gumstix: Success
[+3026.53s] DEBUG: User gumstix authorized
[+3026.56s] DEBUG: Greeter requests session openbox
[+3026.56s] DEBUG: Using session openbox
[+3026.56s] DEBUG: Stopping greeter
[+3026.56s] DEBUG: Session 1952: Sending SIGTERM
[+3028.56s] DEBUG: Greeter closed communication channel
[+3028.56s] DEBUG: Session 1952 exited with return value 0
[+3028.56s] DEBUG: Greeter quit
[+3028.66s] DEBUG: Dropping privileges to uid 1000
[+3028.66s] DEBUG: Restoring privileges
[+3028.72s] DEBUG: Dropping privileges to uid 1000
[+3028.72s] DEBUG: Writing /home/gumstix/.dmrc
[+3032.24s] DEBUG: Restoring privileges
[+3033.17s] DEBUG: Starting session openbox as user gumstix
[+3033.17s] DEBUG: Session 1984 running command /usr/sbin/lightdm-session /usr/bin/openbox-session
[+3033.51s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session1
[+3343.09s] DEBUG: Got signal 15 from process 1
[+3343.09s] DEBUG: Caught Terminated signal, shutting down
[+3343.09s] DEBUG: Stopping display manager
[+3343.09s] DEBUG: Stopping seat
[+3343.09s] DEBUG: Stopping display
[+3343.09s] DEBUG: Session 1984: Sending SIGTERM

How can I run lightdm on a read-only file system? If I can't (although I can't really conceive of a reason why this wouldn't be possible), can you recommend another dm? I know I at least have lxdm available, I'm not sure what other ones I have.

Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu lightdm Edit question
Assignee:
No assignee Edit question
Solved by:
Jason Cipriani
Solved:
2013-10-16
Last query:
2013-10-16
Last reply:
2013-10-16
Manfred Hampl (m-hampl) said : #1

Are the /home and /tmp directories readonly or read-write?

There is e.g. a log entry [+3028.72s] DEBUG: Writing /home/gumstix/.dmrc

I could imagine that a display manager crashes if it cannot create its config files or temp files.

Thanks

/home is read-only.
/tmp is read-write.

> I could imagine that a display manager crashes if it cannot create its config files or temp files.

If you think this through, that is irrational for at least a handful reasons I can think of off the top of my head, not the least of which are: At minimum it should fail gracefully, if it has the information to write its own config file then it doesn't need to write it, temp files should not go in ~, and it presumably didn't care about a failed write as it reported no errors and moved on its way.

The contents of .dmrc are:
[Desktop]
Session=openbox

If this is meant to preserve this user's most recent choice, I can't see it failing. If this is meant to communicate this data to some other program, it should go in the environent or /var.

I feel that .dmrc is a red herring here.

Is there a more detailed log output? Some more detailed trace information? Anything I can use to get more specific info about what's happening?

I found /var/lib was read-only. I created a read-write partition and moved /var/lib/lightdm there and made some progress -- lightdm was starting but the window manager was not.

However, all I need it to do is autologin a specific user and start openbox. I scrapped lightdm and just switched to nodm instead, problem solved.