You are not logged in.
My session menu in openbox (oblogout) is currently not working. The issue is that loginctl lists all the users that used to be logged in. So if I log in with user #1, then log out #1, now log in with #2, then the session menu has no shutdown option anymore. This is because loginctl still lists user #1 even though that user is not logged in (anymore).
I think this is unexpected behavior as loginctl should list all users currently logged in, not those which used to be logged in.
Anyway, does anybody have an idea on how to fix oblogout? Basically, I would need a command that shuts down without root privileges (even if loginctl still lists old logins).
Last edited by Antunes (2012-11-13 11:39:02)
Offline
I've never used oblogout but have this in my menu.xml to reboot and shutdown
<item label="Reboot">
<action name="Execute">
<command>systemctl reboot</command>
</action>
</item>
<item label="Shutdown">
<action name="Execute">
<command>systemctl poweroff</command>
</action>
</item>Perhaps you can edit your oblogout to use something similair or /sbin/reboot, /sbin/poweroff are symlinked to the same commands so should still work.
Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz
Offline
Thanks for your response. Those commands do not work without root privileges if "loginctl" thinks that other users are still logged in.
My problem is that "loginctl" lists not just the currently logged in users, but also those users that used to be logged in.
Last edited by Antunes (2012-11-09 18:49:25)
Offline
I can confirm what you're saying as I just logged off as myself and logged in as my wife and loginctl still shows myself in a session. I did notice that awhile back she was complaining that she couldn't shutdown the computer anymore and I just assumed it was something to do with systemd not being setup properly. Now that you mention this, it's probably been loginctl all along. Just to get her to be able to shutdown, I put her back in /etc/sudoers to be able to execute /sbin/poweroff without a password. I have been seeing a few posts about missing shutdown, reboot, etc buttons--especially in lxde--without a real solution yet. The sudoers thing is probably considered a hack by some, but it works here. BTW, can you post your .xinitrc as some people have been having problems there as well but mostly for mounting permissions.
Just saw this, maybe relevant? https://bbs.archlinux.org/viewtopic.php?pid=1186738
Last edited by bgc1954 (2012-11-09 19:17:08)
Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz
Offline
The session will remain until all of it's processes etc. have terminated. You will need to find out what's hanging and why. I have seen at least one other thread about this.
All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.
Offline
I just found out that in my particular case the problem is xdm hanging and not closing out the session so it's behaving like slim in the post I referenced above. Are these bugs in xdm and slim or something else?
@Antunes: what dm are you using?
Edit2: As it turns out, it wasn't xdm's fault. I use a hybridized--should say bastardized--version of arch-xdm from the AUR and the Xreset command wasn't setup properly. Would have been working properly if I used xdm-archlinux from the community repo as I just tried but I like the looks of mine a little better so adjusted to suit. BTW, not trying to hijack this thread. ![]()
Last edited by bgc1954 (2012-11-09 20:44:00)
Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz
Offline
I use slim as dm. My xinitrc is just "exec dbus-launch openbox-session".
I agree with what you are saying, the sudo stuff is just a hack. I also had somebody propose modifying the polkit rules in /usr/share/polkit-1/actions/org.freedesktop.login1.policy but that seems to be a hack as well. I currently see no good way to configure oblogout so that it works satisfactory with two users on the same system.
EDIT: and as for the incomplete logout, I have a lot of daemons from the older session still active. Maybe there is a way to kill them when logging out, but some devs actually told me that this behavior is the intended one: see e.g. https://bugs.archlinux.org/task/32544
Last edited by Antunes (2012-11-09 21:56:22)
Offline
Well, now that I've read your bug report, I don't think using sudo to be able to shutdown is such a hack. I've actually used it for years on another machine I have. Your other option is to use xdm as I can confirm that once I fixed up my messed up custom xdm setup, I no longer had multiple sessions showing. I used to use slim quite awhile back and it seems to have a propensity to quit working properly quite often so I switched to xdm and haven't looked back. And they're both lightweight dm's.
Also, I'm wondering why you're still using a dbus-launch command? General concensus around here is that it is not necessary and can cause other problems. To autolaunch a dbus-session copy /etc/skel/.xinitrc to your .xinitrc as 65kid mentioned in some other post I read.
Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz
Offline
Hello, thanks a lot for your suggestions.
As for my dbus commands, I think that the "dbus-launch" command does basically the same as the /etc/skel/.xinitrc (which starts everything in "/etc/X11/xinit/xinitrc.d"). Is there really a difference between the two?
And for xdm, I tried it but it's mostly broken in arch. It is currently still configured for ConsoleKit. Maybe one can configure, but the default xdm installation on Arch does not even start a session for me (login screen comes up, but typing name and password throws me back to the login screen).
Last edited by Antunes (2012-11-11 17:02:45)
Offline
I think you might need to read the xdm wiki more, as you're probably missing the executable .xsession for xdm to work. I have been using xdm for years and it works fine now without consolekit. For a nicer looking theme install xdm-archlinux from the community repo.
Also the /etc/skel/.xinitrc is recommended in the xdm wiki but I don't know if it's better practice or not.
edit: the wiki needs updating as well since it refers to consolekit but works fine without.
Last edited by bgc1954 (2012-11-11 17:09:59)
Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz
Offline
Actually, I tried again with a full .xsession file and it doesn't start.
My log is
xdm info (pid 303): executing session /etc/X11/xdm/Xsession
xdm info (pid 275): sourcing /etc/X11/xdm/TakeConsole
xdm info (pid 256): Starting X server on :0
5 XSELINUXs still allocated at reset
SCREEN: 0 objects of 344 bytes = 0 total bytes 0 private allocs
DEVICE: 0 objects of 96 bytes = 0 total bytes 0 private allocs
CLIENT: 0 objects of 208 bytes = 0 total bytes 0 private allocs
WINDOW: 0 objects of 56 bytes = 0 total bytes 0 private allocs
PIXMAP: 1 objects of 32 bytes = 32 total bytes 0 private allocs
GC: 4 objects of 16 bytes = 64 total bytes 0 private allocs
CURSOR: 0 objects of 8 bytes = 0 total bytes 0 private allocs
DBE_WINDOW: 0 objects of 24 bytes = 0 total bytes 0 private allocs
GLYPH: 0 objects of 8 bytes = 0 total bytes 0 private allocs
TOTAL: 5 objects, 96 bytes, 0 allocs
1 PIXMAPs still allocated at reset
PIXMAP: 1 objects of 32 bytes = 32 total bytes 0 private allocs
GC: 4 objects of 16 bytes = 64 total bytes 0 private allocs
CURSOR: 0 objects of 8 bytes = 0 total bytes 0 private allocs
DBE_WINDOW: 0 objects of 24 bytes = 0 total bytes 0 private allocs
GLYPH: 0 objects of 8 bytes = 0 total bytes 0 private allocs
TOTAL: 5 objects, 96 bytes, 0 allocs
4 GCs still allocated at reset
GC: 4 objects of 16 bytes = 64 total bytes 0 private allocs
CURSOR: 0 objects of 8 bytes = 0 total bytes 0 private allocs
DBE_WINDOW: 0 objects of 24 bytes = 0 total bytes 0 private allocs
GLYPH: 0 objects of 8 bytes = 0 total bytes 0 private allocs
TOTAL: 4 objects, 64 bytes, 0 allocs
Warning: translation table syntax error: Unknown modifier name: CtrlR
Warning: ... found while parsing 'CtrlR:abort-display()'
Warning: String to TranslationTable conversion encountered errors
xdm info (pid 312): sourcing /etc/X11/xdm/archlinux/Xsetup
Warning: Cannot convert string "auto" to type ScrollMode
Warning: Cannot convert string "-xos4-terminus-medium-r-normal--32-320-72-72-c-160-iso10646-1" to type FontStruct
Warning: Cannot convert string "-xos4-terminus-medium-r-normal--32-320-72-72-c-160-iso10646-1" to type FontStruct
xdm info (pid 256): Shutting down
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
after 90 requests (85 known processed) with 0 events remaining.
xdm info (pid 256): display :0 is being disabled
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
after 324 requests (59 known processed) with 0 events remaining.
Server terminated successfully (0). Closing log file.
xdm info (pid 256): ExitingAre you claiming that xdm would kill all processes on logout (which would solve my problem)? If it doesn't then I would not gain anything from switching to xdm. I am otherwise quite happy with slim.
EDIT: I had to make .xsession executable, that was my problem. You are right that xdm usually kills all processes on logout. It seems to work better, fingers crossed.
Last edited by Antunes (2012-11-11 17:55:57)
Offline
So is this solved or not? If it is please mark your original post as [Solved]. Thx.
Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz
Offline
Oh, sorry I forgot. I will mark as solved, but the behavior of slim seems to be unexpected indeed in that it keeps user processes running in the background even after logout.
Offline