LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   No logout dialog in Xfce (http://www.linuxquestions.org/questions/slackware-14/no-logout-dialog-in-xfce-4175435434/)

Lennie 11-03-2012 05:16 AM

No logout dialog in Xfce
 
I have just installed Slackware 14, 64-bit, with Xfce. I boot up to console, log in, and then type startx to start xfce.

When I click on logout in the menu, I immediately gets back to console, still logged in as my user. I want the logout dialog where to choose shutdown, reboot and so on. How to get that?

powerball 11-03-2012 06:10 AM

Hi Lennie, I wrote this in my Xfce notes: log in as root.
Code:

visudo
Then add this line:
Code:

%users ALL = NOPASSWD:/usr/libexec/xfsm-shutdown-helper
Hope that helps, later. :)

Lennie 11-03-2012 06:28 AM

I don't have that file /usr/libexec/xfsm-shutdown-helper ...

When I installed Slackware I installed the recommended package groups except from kde and games. So I guess I should have everything important installed...

Is there a way to find out which command is run when I click logout in menu? Like a way to change what's in the menu?

kikinovak 11-03-2012 06:55 AM

Quote:

Originally Posted by Lennie (Post 4821293)
I have just installed Slackware 14, 64-bit, with Xfce. I boot up to console, log in, and then type startx to start xfce.

When I click on logout in the menu, I immediately gets back to console, still logged in as my user. I want the logout dialog where to choose shutdown, reboot and so on. How to get that?

Edit /etc/inittab and set the value for initdefault from 3 to 4. Reboot to your graphical login manager (XDM, KDM, whatever), launch your Xfce session from there, and you'll see all your options.

BTW, when using Xfce, I recommend SLiM. It's not included officially, but you'll find it on SBo. I wrote a little HOWTO about it here:

http://docs.slackware.com/howtos:window_managers:slim

Lennie 11-03-2012 08:04 AM

Still no success. I changed to runlevel 4, I login with xdm, and I still didn't get the logout options. Then I also couldn't open geany as root, neither with sudo nor if I used 'su -' first.

Code:

sudo geany /etc/inittab
Password:
No protocol specified
Geany: cannot open display

I logged out, switched to another tty and login, and run startx, and now I can open geany with sudo.


I find it also strange I can't run 'shutdown' or 'reboot' with sudo, I need to use 'su -', otherwise I get
'sudo: reboot: command not found'. I have this in sudoers:

Code:

%wheel ALL=(ALL) ALL
lena slack=NOPASSWD: /sbin/shutdown, /sbin/reboot

Code:

bash-4.2$ hostname
slack

bash-4.2$ groups lena
lena : users lp wheel audio video cdrom plugdev power netdev scanner


xflow7 11-03-2012 08:26 AM

I believe the sudo behavior is because sudo inherits the calling user's environment (which does not include /sbin, /usr/sbin, etc. in the path by default) whereas su -c gets the root user's environment.

So if you did:

Code:

sudo /sbin/reboot
it should work.

As for the Logout entry in the menu, if you right click on the Applications Menu button on the panel and select Properties, is Use the default menu selected under Menu File, or is it set to a custom menu file?

Lennie 11-03-2012 08:49 AM

I added 'PATH=$PATH:/sbin:/usr/sbin' to my .bash_profile and now I can use 'sudo reboot' with no password.

But still no options for logout from menu...

In the panel I also have 'Action Buttons', for shutdown, reboot... I saw there were both 'Log Out...' and 'Log Out' If I use 'Log Out...' It behaves just as if I click 'Log Out' in the menu, i.e. get me back to console but still logged in. The other alternatives gives me a question if I really want to shutdown/reboot/logout, and they work.

So the most important thing of course is that it works, and I can shutdown/reboot/logout with a few easy clicks. But I still would prefer to have it from the menu, and not need to have that extra item in panel.

Anyone know how to find out which commands it uses, so that I can try it in terminal and see what error I get? Where is the config file for the menu? I don't find it in my home, so I guess it should be somewhere in /etc ...

'Use the default menu' is selected for the menu.

xflow7 11-03-2012 09:21 AM

On my system, the menu is defined in /etc/xdg/menus/xfce-applications.menu

In this file, there is an entry:

Code:

<Filename>xfce4-session-logout.desktop</Filename>
The .desktop file above is located here:

Code:

/usr/share/applications/xfce4-session-logout.desktop
and it refers to the executable with the line:

Code:

Exec=xfce4-session-logout
If I run xfce4-session-logout from a terminal window, it presents the dialog you are looking for. So see if yours is configured the same way and then try running that executable.

Lennie 11-03-2012 10:04 AM

Thanks for finding those files for me. When I ran xfce4-session-logout from terminal I was thrown out to console again. I could see that the terminal gave back the prompt before that, so that command had finnished running. No errors. /usr/bin/xfce4-session-logout is a binary, so not so easy to find out what it does...

This is strange... I want to find out also because I don't like unsolved mysteries, in addition to that I want to use this feature. I guess this means checking out the source code. (I don't know C, but I will try anyway, and see if I can understand anything of it.)

If someone knows what's causing this problem, please let me know.

xflow7 11-03-2012 10:13 AM

I just searched over at the xfce.org forum. You may want to check out this thread - it seems germane:

http://forum.xfce.org/viewtopic.php?id=6898

That user seems to report the same behavior and it turned out to be some kind of interaction with the acpi daemon.

Hope that helps.

Lennie 11-03-2012 11:11 AM

I tried the solution from that thread, but it didn't help. I stopped the daemon ( /etc/rc.d/rc.acpid stop ), and I also did 'chmod -x' on it and rebooted, but I still get thrown out of X when I click logout in menu.

Lennie 11-03-2012 01:25 PM

Now I feel stupid... It was so simple that I had unmarked "Prompt on logout" in Settings - Session and Startup. I thougt it was about 'prompt about saving the session', which it now wants to do if I don't unmark it in the logout-dialog every time.

I will mark the thread as solved (if/when I find out how to do that).


All times are GMT -5. The time now is 10:21 PM.