minimal squeeze install, no shutdown option in logout menu

Please post all general support questions for LXDE here.
Locked
quotaholic
Posts: 6
Joined: Mon Apr 13, 2009 10:16 pm

minimal squeeze install, no shutdown option in logout menu

Post by quotaholic »

Hi All,

I have a minimal install set up on a webdt366 webtablet. http://www.webdt.org for more info on the hardware.

It only has a 512mb ssd for a hard drive. I started with a minimal install from the LXDE/XFCE debian squeeze cd, base system only. Then added x with a:

Code: Select all

sudo aptitude install -R --without-recommends xorg-xserver-video-geode xinit xauth xfonts-base x11-utils xterm


And a:

Code: Select all

sudo aptitude install -R --without-recommends lxde
with a usb cdrom drive attached.

Brought in wicd and blueman package by package. As I dont have enough room on the ssd for apt to grab a package list this was time consuming however I have polkit and hal in there from the requirements on these packages.

My problem is that I am not running a display manager. Would rather script the starting of x in ~/.bash_profile. As a result I do not have options for shutdown, suspend or anything beyond logout or cancel in the shutdown menu.

Can anyone provide advice on how to establish these items in the shutdown menu without installing a display manager?

Thank you in advance,
quotaholic
quotaholic
Posts: 6
Joined: Mon Apr 13, 2009 10:16 pm

Re: minimal squeeze install, no shutdown option in logout me

Post by quotaholic »

Sorry for the triple post. I had an inactive account and needed to change my email. The forum froze on me upon posting and I did not mean to triple post. Mods, please remove my other two posts.

Thank you
quotaholic
LXNevermind
Posts: 34
Joined: Sat Sep 10, 2011 11:31 am

Re: minimal squeeze install, no shutdown option in logout me

Post by LXNevermind »

I can give you just a small hint (sorry) ;)

In /etc/sudoers file write (use visudo command to edit):

Code: Select all

user   ALL=NOPASSWD:/sbin/shutdown
That should give you permissions to shutdown computer by using shutdown command without root password. Then just write a script (find it in the internet, there is plenty of them) or use

Code: Select all

shutdown -h now
from the terminal.
If you write a script I think there is a way to put it in the main manu, by simly editing menu config.
quotaholic
Posts: 6
Joined: Mon Apr 13, 2009 10:16 pm

Re: minimal squeeze install, no shutdown option in logout me

Post by quotaholic »

I will look in to that, thank you for the workaround. I have to take this tablet to an interview on Tuesday as a resume item for a position with in a new product development position within a kiosk manufacturer. Would be nice to get all items working. I use acpi for suspend so I see two scripts coming. I am concerned that polkit is blocking me from gaining anything beyond logout within the shutdown menu. I have added the user to powerdev as per the LXDE debian wiki. No joy on that change. Tried come exec ck launch-session scripts in my autostartx config in ~/bash_profile also to no joy. Actually x would not start when using such a config.

Thanks again, I will try your suggestion.

quotaholic
quotaholic
Posts: 6
Joined: Mon Apr 13, 2009 10:16 pm

Re: minimal squeeze install, no shutdown option in logout me

Post by quotaholic »

Interesting,

following the path you suggested I hopped in to .config/openbox/lxde-rc.xml and saw an exec to /usr/share/lxde/openbox/menu.xml and saw lxde-logout as the executable that calls the shutdown menu.

A slew of "dbus-interface.c:75 The name org.freedesktop.Hal was not provided by any .service files" flew by.

I tried adding sudo just to see if it would go through okay and I got a "LXSession is not running" reply.

typing in lxsession in the terminal yielded a "Only one lxsession can be executed at a time" returned.

Looks like lxsession is running but hal does not see it. Any ideas?

quotaholic
quotaholic
Posts: 6
Joined: Mon Apr 13, 2009 10:16 pm

Re: minimal squeeze install, no shutdown option in logout me

Post by quotaholic »

Need to slap my own head and correct myself. I thought I saw hal install with pcmanfm but I was mistaken. After installing hal and some required packages I am up and going. everything shows up in the lxde-logout menu.

Sorry for the needless post.

quotaholic
LXNevermind
Posts: 34
Joined: Sat Sep 10, 2011 11:31 am

Re: minimal squeeze install, no shutdown option in logout me

Post by LXNevermind »

OK, try this.

1) make sure that user (not root!) can execute shutdown -h now and reboot command from the command line with sudo but without root password (like I said before). If he can try step2.
2) in ~/.config/lxpanel/LXDE/config change logout line to this:

Code: Select all

Logout=lxterminal -e sudo shutdown -h now
This will (or should) make logout button to automaticly close system.

If you want reboot position in menu, you'll have to edit ~/.config/lxpanel/LXDE/config add line

Code: Select all

reboot=lxterminal -e sudo reboot
...

Then edit ~/.config/lxpanel/LXDE/panel/panel and add the"reboot" position in menu, like this.

Code: Select all

separator{
}
item{
command=reboot
}
This way you wont have pop-up menu to close or reboot system. It will execute command straight from the lxpanel.


EDIT: Heh I'm glad you solve your problem :D
Locked