SEARCH

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

You are not logged in.

#1 2011-12-02 02:50:47

corvo
Member
From: Clovis, California, USA
Registered: 2011-11-29
Posts: 43

Upgrade to Sid impacts oblogout

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

Be excellent to each other!

#2 2011-12-02 03:07:52

machinebacon
#! unstable
From: PRC
Registered: 2009-07-02
Posts: 6,212
Website

Re: Upgrade to Sid impacts oblogout

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-session

I 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... cool  VSIDO  cool LinuxCNC  kiss Frugalware <- It's all just a kernel.

Offline

#3 2011-12-02 03:13:08

corvo
Member
From: Clovis, California, USA
Registered: 2011-11-29
Posts: 43

Re: Upgrade to Sid impacts oblogout

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

#4 2011-12-02 03:17:30

machinebacon
#! unstable
From: PRC
Registered: 2009-07-02
Posts: 6,212
Website

Re: Upgrade to Sid impacts oblogout

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... cool  VSIDO  cool LinuxCNC  kiss Frugalware <- It's all just a kernel.

Offline

#5 2011-12-02 03:21:44

corvo
Member
From: Clovis, California, USA
Registered: 2011-11-29
Posts: 43

Re: Upgrade to Sid impacts oblogout

Hmmm...sorry to be a bother, but how to enable autologin? Additionally, for some reason, oblogout still does not work, after following your instructions. sad


"It is vain for the coward to flee; death follows close behind; it is only by defying it that the brave escape." - Voltaire

Offline

#6 2011-12-02 03:36:02

chaanakya
#! Die Hard
Registered: 2010-12-30
Posts: 940

Re: Upgrade to Sid impacts oblogout

Edit /etc/lightdm/lightdm.conf.  The line containing

autologin-user

should 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

#7 2011-12-02 03:36:27

machinebacon
#! unstable
From: PRC
Registered: 2009-07-02
Posts: 6,212
Website

Re: Upgrade to Sid impacts oblogout

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... cool  VSIDO  cool LinuxCNC  kiss Frugalware <- It's all just a kernel.

Offline

#8 2011-12-02 03:41:02

machinebacon
#! unstable
From: PRC
Registered: 2009-07-02
Posts: 6,212
Website

Re: Upgrade to Sid impacts oblogout

corvo wrote:

Additionally, for some reason, oblogout still does not work, after following your instructions. sad

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 smile

Last edited by machinebacon (2011-12-02 03:42:00)


Start Distrohopping here! -> Break your own... cool  VSIDO  cool LinuxCNC  kiss Frugalware <- It's all just a kernel.

Offline

#9 2011-12-02 06:59:16

corvo
Member
From: Clovis, California, USA
Registered: 2011-11-29
Posts: 43

Re: Upgrade to Sid impacts oblogout

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.local

Insert the following before the line that reads "exit 0"

su - <username> -c startx

Save and quit the file, and reboot the system. Your system should automatically be taken right to your desktop. smile

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

#10 2011-12-02 07:04:31

machinebacon
#! unstable
From: PRC
Registered: 2009-07-02
Posts: 6,212
Website

Re: Upgrade to Sid impacts oblogout

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... cool  VSIDO  cool LinuxCNC  kiss Frugalware <- It's all just a kernel.

Offline

#11 2011-12-02 07:07:18

corvo
Member
From: Clovis, California, USA
Registered: 2011-11-29
Posts: 43

Re: Upgrade to Sid impacts oblogout

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 visudo

Then, add the following at the bottom of the page of the sudoers file:

ALL   ALL=NOPASSWD:/sbin/shutdown

Done deal. wink

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

#12 2011-12-02 07:11:23

corvo
Member
From: Clovis, California, USA
Registered: 2011-11-29
Posts: 43

Re: Upgrade to Sid impacts oblogout

machinebacon wrote:

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. smile


"It is vain for the coward to flee; death follows close behind; it is only by defying it that the brave escape." - Voltaire

Offline

#13 2011-12-02 07:17:20

machinebacon
#! unstable
From: PRC
Registered: 2009-07-02
Posts: 6,212
Website

Re: Upgrade to Sid impacts oblogout

@#11: Yes-yes, that's it big_smile 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... cool  VSIDO  cool LinuxCNC  kiss Frugalware <- It's all just a kernel.

Offline

#14 2011-12-02 07:32:13

jelloir
#! CrunchBanger
From: Outside the garden wall
Registered: 2009-08-21
Posts: 210

Re: Upgrade to Sid impacts oblogout

corvo wrote:

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 visudo

Then, add the following at the bottom of the page of the sudoers file:

ALL   ALL=NOPASSWD:/sbin/shutdown

Done deal. wink

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

#15 2011-12-02 07:43:45

machinebacon
#! unstable
From: PRC
Registered: 2009-07-02
Posts: 6,212
Website

Re: Upgrade to Sid impacts oblogout

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... cool  VSIDO  cool LinuxCNC  kiss Frugalware <- It's all just a kernel.

Offline

#16 2011-12-02 09:59:24

jelloir
#! CrunchBanger
From: Outside the garden wall
Registered: 2009-08-21
Posts: 210

Re: Upgrade to Sid impacts oblogout

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.Reboot

What 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

#17 2011-12-02 14:21:55

machinebacon
#! unstable
From: PRC
Registered: 2009-07-02
Posts: 6,212
Website

Re: Upgrade to Sid impacts oblogout

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... cool  VSIDO  cool LinuxCNC  kiss Frugalware <- It's all just a kernel.

Offline

#18 2011-12-02 17:07:34

sunfizz98
Carbonated Orange Juice
From: su terminal
Registered: 2011-05-12
Posts: 1,871
Website

Re: Upgrade to Sid impacts oblogout

@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)


WP | G+ | Bear no grudges for they tax the mind and body.

Offline

#19 2011-12-02 17:59:33

Sergio17771
#! Member
Registered: 2009-06-21
Posts: 87

Re: Upgrade to Sid impacts oblogout

I think you may need to re-install hal

Offline

#20 2011-12-02 18:26:33

sunfizz98
Carbonated Orange Juice
From: su terminal
Registered: 2011-05-12
Posts: 1,871
Website

Re: Upgrade to Sid impacts oblogout

I just installed hal and that didn't do the trick sad

*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)


WP | G+ | Bear no grudges for they tax the mind and body.

Offline

#21 2011-12-02 21:00:36

corvo
Member
From: Clovis, California, USA
Registered: 2011-11-29
Posts: 43

Re: Upgrade to Sid impacts oblogout

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. hmm


"It is vain for the coward to flee; death follows close behind; it is only by defying it that the brave escape." - Voltaire

Offline

#22 2011-12-02 21:28:47

sunfizz98
Carbonated Orange Juice
From: su terminal
Registered: 2011-05-12
Posts: 1,871
Website

Re: Upgrade to Sid impacts oblogout

^I added the actions manually via obmenu.  Cut and pasting will mess up your menu.xml bad.


WP | G+ | Bear no grudges for they tax the mind and body.

Offline

#23 2011-12-02 22:30:50

jelloir
#! CrunchBanger
From: Outside the garden wall
Registered: 2009-08-21
Posts: 210

Re: Upgrade to Sid impacts oblogout

corvo wrote:

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

#24 2011-12-02 22:45:52

EnochRoot
#! Junkie
From: London, UK
Registered: 2011-10-15
Posts: 253
Website

Re: Upgrade to Sid impacts oblogout

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

Be excellent to each other!

#25 2011-12-05 01:46:05

corvo
Member
From: Clovis, California, USA
Registered: 2011-11-29
Posts: 43

Re: Upgrade to Sid impacts oblogout

Happy to report that using obmenu fixed the issue. Thanks sunfizz! Thank you jelloir and enochroot for your help as well. smile


"It is vain for the coward to flee; death follows close behind; it is only by defying it that the brave escape." - Voltaire

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.

Debian Logo