LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-09-2017, 01:25 PM   #1
selfprogrammed
Member
 
Registered: Jan 2010
Location: Minnesota, USA
Distribution: Slackware 13.37, 14.2
Posts: 414

Rep: Reputation: 88
Unhappy XFCE shutdown


New install of Slackware 14.2.
Could not get XFCE to allow a user to shutdown the computer.

Been through the forums, found many suggestions.
Tried some of them.

Discovered lately that using "startx" to startup XFCE will enable the shutdown buttons.
Starting with "startxfce4" leaves the buttons greyed out.

On my Linux 2.6, "startxfce4" works completely fine.
There trying to use "startx" will give me KDE instead.

Does anyone know a reasoning or can make sense of this new twist?

I suspect this is the ConsoleKit again. I really am tempted to rewrite parts of it to disable most of what it, as I am a single user on a machine that is not even connected to the internet.
Any better suggestions?
 
Old 03-09-2017, 02:11 PM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952

Rep: Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148
give user sudo rights that has always worked for me. Because it is a root only thing. or mod the sudoers file, set it up to a group to able to shut down system only then add whatever users you want to that group so they can reboot, shut down, etc...

to change wm/dt for startx

xwmconfig

on the cli before startx or term cli afterwords.

read this - it should help with a few more things too. longin runlevel 4 to give you a choice before loging in

http://docs.slackware.com/slackware:beginners_guide

Last edited by BW-userx; 03-09-2017 at 02:15 PM.
 
Old 03-09-2017, 09:58 PM   #3
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
On Fedora 25 Xfce, I use a panel applet "Action Buttons", which when selected offers buttons to suspend/restart/shutdown/log out
 
Old 03-10-2017, 04:49 AM   #4
elcore
Member
 
Registered: Sep 2014
Distribution: Slackware
Posts: 888

Rep: Reputation: Disabled
Quote:
Originally Posted by selfprogrammed View Post
I suspect this is the ConsoleKit again.
You are right, this is ConsoleKit specific.

I recommend to add /usr/share/applications/*.desktop files to your xfce-applications.menu like this:

Code:
<Filename>xfce4-session-reboot.desktop</Filename>
<Filename>xfce4-session-shutdown.desktop</Filename>
Code:
[Desktop Entry]
Version=1.0
Type=Application
Name=Reboot
Exec=dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart
Icon=system-reboot
StartupNotify=false
Terminal=false
Categories=System;X-XFCE;X-Xfce-Toplevel;
OnlyShowIn=XFCE;
X-XFCE-CommandsWithParameter=dbus-send "--system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart"
X-XFCE-Commands=dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart
Code:
[Desktop Entry]
Version=1.0
Type=Application
Name=Shutdown
Exec=dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
Icon=system-shutdown
StartupNotify=false
Terminal=false
Categories=System;X-XFCE;X-Xfce-Toplevel;
OnlyShowIn=XFCE;
X-XFCE-CommandsWithParameter=dbus-send "--system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop"
X-XFCE-Commands=dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
Quote:
Originally Posted by BW-userx View Post
give user sudo rights
I'd prefer not to do that.

Quote:
Originally Posted by BW-userx View Post
Because it is a root only thing.
No, it isn't a root only thing.

Last edited by elcore; 03-10-2017 at 04:51 AM.
 
Old 03-10-2017, 07:10 AM   #5
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952

Rep: Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148
It is too a root user only thing - if their are other config files that need to be modified to get it to work it still has to go through root privileges. Because that is what falls under admin duties. So not just anyone can shutdown the 'server' because that is what Linux is. It is designed as a server. Unix based OS. think about it.


GO look at this link it shows how to set it up like I said via sudoers

http://unix.stackexchange.com/questi...as-normal-user
 
Old 03-10-2017, 07:17 AM   #6
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952

Rep: Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148
here is another one on that topic
Code:
 to actually invoke the assorted shutdown
commands provided in linux. Run visudo and add the
following lines %shutdown ALL=(root) ... which let
you shutdown the computer without having to be root,
among other things.
notice the use of the word root.

https://ubuntuforums.org/showthread.php?t=134968
 
Old 03-10-2017, 10:43 AM   #7
elcore
Member
 
Registered: Sep 2014
Distribution: Slackware
Posts: 888

Rep: Reputation: Disabled
Quote:
Originally Posted by BW-userx View Post
It is too a root user only thing - if their are other config files that need to be modified to get it to work it still has to go through root privileges. Because that is what falls under admin duties. So not just anyone can shutdown the 'server' because that is what Linux is. It is designed as a server. Unix based OS. think about it.
That's interesting, but you don't need to be root or have sudo privilege to shutdown or reboot a machine.

Quote:
Originally Posted by BW-userx View Post
GO look at this link it shows how to set it up like I said via sudoers
GO read ConsoleKit2 and dbus documentation (because this is what XFCE is currently using)
 
Old 03-10-2017, 11:15 AM   #8
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952

Rep: Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148
Quote:
Originally Posted by elcore View Post
That's interesting, but you don't need to be root or have sudo privilege to shutdown or reboot a machine.


GO read ConsoleKit2 and dbus documentation (because this is what XFCE is currently using)
one: that is not giving someone sudo it is only allowing them the root privileges via sudo to reboot halt system/

like I said any config file needed to be used to do this . It still has to go though root privileges. that is what they are doing. dig into it. I am not going to.

https://wiki.archlinux.org/index.php/ConsoleKit
 
Old 03-11-2017, 04:55 PM   #9
selfprogrammed
Member
 
Registered: Jan 2010
Location: Minnesota, USA
Distribution: Slackware 13.37, 14.2
Posts: 414

Original Poster
Rep: Reputation: 88
I can shutdown the system with CNTL-ALT-DEL anytime I want. I can console switch to another console, login as ROOT, and issue halt. What I want is to make work the XFCE dropdown menu that offers the shutdown buttons, and fix why they are greyed out. They work fine on my Linux 2.6 system.

ConsoleKit is the main problem. There are Linux systems that are servers, some are used with dumb terminals away from the mainframe, and there are alot of PC's with single users.

SUDO was made for the dump terminal users, as they have one terminal.
Anyone with a single user PC should disable SUDO as it is a security risk with internet connections. Much safer to just console switch and log in as root to do the odd install as root.

ConsoleKit ought to offer a managers control to set who has the admin rights, and who can shutdown. But they wrote it only to serve one set of business needs.

Shutting down as a normal user should not require the user to anything ROOT privilege based.
They can reach down and hit the POWER button anytime. They can do a CNTL-ALT-DEL anytime.
But using the clean shutdown from the XFCE menus, that is blocked.

Thank You, for the files. I will see if I dare use them, it is simpler but less satisfying than gutting the ConsoleKit.
I actually did install the source of ConsoleKit with intention of doing that, but never found the time to dive into it.

For now, I can just always start XFCE using "startx", but I still do not know why
"startxfce4" has now failed to work, or what needs to be fixed to make it work.
I do not like having one system that requires "startxfce4", and one that requires "startx".

Thank You.

Last edited by selfprogrammed; 03-11-2017 at 05:00 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] XFCE 4.6 Cannot shutdown, reboot or suspend system from XFCE lpallard Slackware 17 11-04-2012 06:17 PM
[SOLVED] xfce shutdown problem qrange Linux - Software 2 11-09-2011 01:57 PM
KDM does not allow xfce to shutdown trryhend Slackware 7 09-25-2011 07:37 PM
logout before shutdown with shutdown button in XFCE ta0kira Ubuntu 2 06-25-2011 04:57 AM
xfce shutdown sethgeekx86 Slackware 2 04-22-2004 02:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration