You are not logged in.
So I have upgraded the latest point release to Sid and for some reason oblogout will no longer work properly. I can click on any one of the options (logout, hibernate, reboot, shutdown), but they all simply post a message stating "<insert action here> standing by....." I can still reboot, logout, or shutdown via the terminal, but I'd like to get my oblogout functionality back. Any idea on how this can be accomplished?
"It is vain for the coward to flee; death follows close behind; it is only by defying it that the brave escape." - Voltaire
Offline
This is thanks to slim and the missing dbus/consolekit actions, which the user has to add manually and pray
this can be fixed in two ways
- replace slim with lightdm (HOT recommend!)
- create a file named ~/.xinitrc
#!/bin/sh
exec ck-launch-session dbus-launch openbox-sessionI really really really recommend lightdm (apt-get install lightdm) and remove slim or dpkg-reconfigure lightdm and choose it as default.
slim causes troubles, is not maintained anymore, and not that much slimmer.
Last edited by machinebacon (2011-12-02 03:08:18)
Start Distrohopping here! -> Break your own...
VSIDO
LinuxCNC
Frugalware <- It's all just a kernel.
Offline
Thank you kindly good sir. If SLiM is no longer maintained, then I suppose there is no point in keeping it. I shall proceed with installing lightdm. Any tips on how to theme it, or can you point me in the right direction?
"It is vain for the coward to flee; death follows close behind; it is only by defying it that the brave escape." - Voltaire
Offline
I haven't themed mine, as I use 'automatic logins' anyway. LightDM is a comparably young application, but I guess the Ubuntu or Mint (LMDE)-people have some resources.
Start Distrohopping here! -> Break your own...
VSIDO
LinuxCNC
Frugalware <- It's all just a kernel.
Offline
Hmmm...sorry to be a bother, but how to enable autologin? Additionally, for some reason, oblogout still does not work, after following your instructions. 
"It is vain for the coward to flee; death follows close behind; it is only by defying it that the brave escape." - Voltaire
Offline
Edit /etc/lightdm/lightdm.conf. The line containing
autologin-usershould be uncommented (remove the # sign) and the stuff to the right of the equals sign should be changed to your username.
Check out Musik - an easy-to-use text-to-music converter!
Join SpiderOak using this link and get an extra 1 GB free: https://spideroak.com/download/referral … 660e787ff1
Offline
the configuration file for LightDM is in /etc/lightdm/lightdm.conf
In the Seat defaults, search for autologin-user= and uncomment the line, adding your username
By the way, the oblogout should be cb-exit, if you use the new release. The whole thing about dbus->consolekit->(hal) was implemented because one needs to have sudo/root access toinitiate the command 'shutdown -h now'. Some people simply edit the sudoers file (allowing their user to call /sbin/shutdown, /sbin/reboot, /sbin/halt without password)
Start Distrohopping here! -> Break your own...
VSIDO
LinuxCNC
Frugalware <- It's all just a kernel.
Offline
Additionally, for some reason, oblogout still does not work, after following your instructions.
The reason is that your user is still logged, probably - you can check with ck-list-sessions
Either reboot by logging out (Ctrl-Alt-F1 -> as root: reboot) , or:
1) go to tty1, for example (Ctl-Alt-F1)
2) as root: /etc/init.d/slim stop
3) killall slim
4) apt-get install lightdm
5) /etc/init.d/lightdm start
6) exit
7) startx
IIRC 
Last edited by machinebacon (2011-12-02 03:42:00)
Start Distrohopping here! -> Break your own...
VSIDO
LinuxCNC
Frugalware <- It's all just a kernel.
Offline
I am sorry to report that nothing worked. Changing more lines in the lightdm.conf file to further attempt to enable autologin did not help either (something I picked up from an IRC user). As such, I decided to simply have my session login automatically without use of a login manager. I did so as follows:
Purge any installed login manager
sudo apt-get purge <packagename>Edit the rc.local file
sudo nano /etc/rc.localInsert the following before the line that reads "exit 0"
su - <username> -c startxSave and quit the file, and reboot the system. Your system should automatically be taken right to your desktop. 
Last edited by corvo (2011-12-02 07:00:05)
"It is vain for the coward to flee; death follows close behind; it is only by defying it that the brave escape." - Voltaire
Offline
Strange that it didn't work. I reproduced both ways (using slim with ck-launch / using lightdm with edited .conf file) on two systems (Sid-Statler/netinstall+statler) and both ways are fine.
But good that you found the direct way (that's the best choice if you anyway just have one user and one DE/WM)
Start Distrohopping here! -> Break your own...
VSIDO
LinuxCNC
Frugalware <- It's all just a kernel.
Offline
As for the cb-exit not working, that was a failure on my part to notice that the package had been removed. For some strange reason, I was no longer able to reinstall it either. Rather than go through the hassle of installing a logout manager, I added two obmenu entries. One for reboot and one for shutdown. I accomplished this by adding:
<item label="Reboot">
<action name="Execute"> <execute>sudo 'shutdown -r now'</execute> </action> </item>
<item label="Shut down">
<action name="Execute"> <execute>sudo 'shutdown -h now'</execute> </action> </item>First, I had to give my user the right to shut down and reboot with administrative priveleges:
sudo visudoThen, add the following at the bottom of the page of the sudoers file:
ALL ALL=NOPASSWD:/sbin/shutdownDone deal. 
Last edited by corvo (2011-12-02 07:09:12)
"It is vain for the coward to flee; death follows close behind; it is only by defying it that the brave escape." - Voltaire
Offline
Strange that it didn't work. I reproduced both ways (using slim with ck-launch / using lightdm with edited .conf file) on two systems (Sid-Statler/netinstall+statler) and both ways are fine.
But good that you found the direct way (that's the best choice if you anyway just have one user and one DE/WM)
I also found it rather odd. I could have, of course, missed something but I don't know what the something could have been. In any case, the direct way is actually a good fit since I am the only user of my laptop and only use the one DE/WM. 
"It is vain for the coward to flee; death follows close behind; it is only by defying it that the brave escape." - Voltaire
Offline
@#11: Yes-yes, that's it
And/or assign these commands as keybinds (for example Ctrl-Alt-F11/12) in rc.xml
I probably add this as alternative to the HowTo sometime, if slim proves to be an issue for some.
Last edited by machinebacon (2011-12-02 07:18:16)
Start Distrohopping here! -> Break your own...
VSIDO
LinuxCNC
Frugalware <- It's all just a kernel.
Offline
As for the cb-exit not working, that was a failure on my part to notice that the package had been removed. For some strange reason, I was no longer able to reinstall it either. Rather than go through the hassle of installing a logout manager, I added two obmenu entries. One for reboot and one for shutdown. I accomplished this by adding:
<item label="Reboot"> <action name="Execute"> <execute>sudo 'shutdown -r now'</execute> </action> </item> <item label="Shut down"> <action name="Execute"> <execute>sudo 'shutdown -h now'</execute> </action> </item>First, I had to give my user the right to shut down and reboot with administrative priveleges:
sudo visudoThen, add the following at the bottom of the page of the sudoers file:
ALL ALL=NOPASSWD:/sbin/shutdownDone deal.
In case you were not aware you can achieve a similar outcome by using ConsoleKit without the needing to change of user permissions and using sudo (assuming of course that ck is working properly now).
I have the following in OpenBox's menu.xml
<menu id="session-menu" label="Session">
<item label="Logout"><action name="Exit"><prompt>no</prompt></action></item>
<item label="Suspend"><action name="Execute"><execute>
dbus-send --system --print-reply --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Suspend
</execute></action></item>
<item label="Hibernate"><action name="Execute"><execute>
dbus-send --system --print-reply --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Hibernate
</execute></action></item>
<item label="Poweroff"><action name="Execute"><execute>
dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
</execute></action></item>
<item label="Restart"><action name="Execute"><execute>
dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart
</execute></action></item>
</menu>I have the same dbus-send commands as bash aliases if I need them from the shell as my normal user.
Offline
Hello jelloir,
it's interesting to compare it with cb-exit, for example the shutdown button:
os.system("dbus-send --print-reply --system --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPower$When slim is started with ck-session-launch dbus-launch, both versions (calling CK or HAL) should work, shouldn't they?
Start Distrohopping here! -> Break your own...
VSIDO
LinuxCNC
Frugalware <- It's all just a kernel.
Offline
Hey machinebacon,
I can't vouch for HAL as I stopped using it a long time ago and don't use a Session Manager like slim, but I did just install HAL now as a test and it worked - I assume the excerpt you posted from from cb-exit is incomplete? I used this in a shell to reboot.
dbus-send --print-reply --system --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.RebootWhat would be interesting is getting corvo to run both the HAL and CK dbus-send commands from a shell and see what happens and what the output is.
Offline
Oh yes, I haven't copied the whole line, sorry.
Would be interesting to see what corvo can tell us.
Start Distrohopping here! -> Break your own...
VSIDO
LinuxCNC
Frugalware <- It's all just a kernel.
Offline
@machinebacon
I seem to be having the same kind of problems as corvo with this cb-exit script. Hibernate, reboot, shutdown seem to fail on on me.
~crunchy aptosid with lightdm.
Last edited by sunfizz98 (2011-12-02 17:37:42)
Offline
I think you may need to re-install hal
Offline
I just installed hal and that didn't do the trick 
*UPDATE* Problem fixed
Aptosid does not rely on hal (it's not even installed!) but on consolekit! Therefore, I used Jelloir's code and it works marvellously from the menu.
Thanks Jelloir!
Last edited by sunfizz98 (2011-12-02 19:07:56)
Offline
HAL was also removed from my system, but I did add your code, Jelloir, to my menu.xml file. However, I think I must have made some type of mistake, as when I reboot I get the following:
One or more XML syntax errors were found while parsing the Openbox configuration files. See stdout for more information. The last error seen was in file "/home/corvo/.config/openbox/menu.xml" line 496, with message premature end of data tag at </openbox_menu>
Here's my menu.xml, maybe someone can point out my mistake:
</menu>
<!--<menu id="help" label="Help" execute="cb-help-pipemenu" />-->
<menu id="session-menu" label="Session">
<item label="Suspend"><action name="Execute"><execute>
dbus-send --system --print-reply --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Suspend
</execute></action></item>
<item label="Hibernate"><action name="Execute"><execute>
dbus-send --system --print-reply --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Hibernate
</execute></action></item>
<item label="Poweroff"><action name="Execute"><execute>
dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
</execute></action></item>
<item label="Restart"><action name="Execute"><execute>
dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart
</execute></action></item>
</menu>
</openbox_menu>That's the last portion of the menu. Line 496 is blank, so I'm thrown off by the error upon reboot. Confusing. 
"It is vain for the coward to flee; death follows close behind; it is only by defying it that the brave escape." - Voltaire
Offline
One or more XML syntax errors were found while parsing the Openbox configuration files. See stdout for more information. The last error seen was in file "/home/corvo/.config/openbox/menu.xml" line 496, with message premature end of data tag at </openbox_menu>
corvo, my guess is you are missing a closing </menu> at the end of your config file. The session menu is usually nested.
Post your full menu.xml if you still cannot figure it out or try obmenu as sunfizz98 suggests.
Offline
Or open the file up in a programmers editor which should do syntax highlighting for you - something like Geany might well do the trick ? I would suggest my fave Emacs, but then would have to explain how to configure it etc eeek
Offline
Happy to report that using obmenu fixed the issue. Thanks sunfizz! Thank you jelloir and enochroot for your help as well. 
"It is vain for the coward to flee; death follows close behind; it is only by defying it that the brave escape." - Voltaire
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.