I decided to try building my own antiX variant using antiX13-Core and the experiment has gone pretty well. Core installed with no difficulty at all. Repositories were changed to Debian sid. The kernel is liquorix. I used a combination of Masinick's tutorial and smxi to install Xfce. All seemed to go quite well.
So at this point I have a nice working system save for some quirks I do not know how to fix.
My regular user cannot shutdown the system until I submit my password. Is this a groups/permission problem? How do I fix it?
AntiX-13 full, which I also have running, will suspend and resume with no problem at all using the GUI. My core will suspend if as Root I do:
echo -n mem > /ys/power/state
What I cannot do is get to this from any GUI at all with my regular or Root user. Rot can GUI to shut down the system but the suspend/hibernate choices still are not on the Xfce GUI Logout menu.
The Xfce4 power manager, data and plugins all are installed.
The act that I can do thse things as root causes me to think that my regular uses needs some group memberships it does not have, but which ones?
I am stumped. Can anybody suggest a strategy for empowering my regular user to shutdown or suspend the system?
topic title: [solved] antiX-Core no shutdown or suspend
8 posts
• Page 1 of 1
-
Posts: 29
- Joined: 06 Sep 2009
#1
Last edited by julian516 on 14 Aug 2013, 13:05, edited 1 time in total.
-
Posts: 1,308
- Joined: 31 Aug 2009
#2
On the core system, as root I do"cat /etc/sudoers.d/antixers" and, among other things I see:So"sudo /sbin/halt" and"sudo /sbin/reboot" should shutdown and reboot the system as a normal user without requiring a password.
BTW: I always add /sbin and /usr/sbin to the PATH of my normal user so I get command completion for those directories. I'm not sure if this is needed to enable you to use the shortcuts"sudo halt" and"sudo reboot" as a normal user but it won't hurt.
What command are you using to shutdown the system?julian516 wrote:My regular user cannot shutdown the system until I submit my password. Is this a groups/permission problem? How do I fix it?
On the core system, as root I do"cat /etc/sudoers.d/antixers" and, among other things I see:
Code: Select all
%users ALL=(root) NOPASSWD: /sbin/halt
%users ALL=(root) NOPASSWD: /sbin/reboot
BTW: I always add /sbin and /usr/sbin to the PATH of my normal user so I get command completion for those directories. I'm not sure if this is needed to enable you to use the shortcuts"sudo halt" and"sudo reboot" as a normal user but it won't hurt.
The code for this is in /usr/local/bin/exitantix.sh Try using that from within Xfce. If it doesn't work out of the gate, it should contain many clues for what you need to do. I don't know if Xfce needs something extra or not.AntiX-13 full, which I also have running, will suspend and resume with no problem at all using the GUI.
-
Posts: 29
- Joined: 06 Sep 2009
#3
BitJam thanks a bunch for a very helpful post. To answer your question about the shutown command:
As Root I do
Your information regarding sudo was very helpful. I do not normally use sudo so I learned something."sudo /sbin/halt" does work, for example.
I decided I would add /sbin and /usr/sbin to my PATH which does not contain them. Immediate problem, I do not seem to have a .bash_profile in the home irectory of my user, which is the hidden file referenced in materials I have as the hidden file containing the PATH statement.
Well, echo $PATH will print the PATH satement so it has to be somewhere! So now I have to find that critter so I know where it is.
BTW I do not have exitantix.sh in /usr/local/bin on this system.
I think as a next step I will go over to my antix13-full system and see how that compares.
Thanks again for your help.
As Root I do
If I want a reboot I do:shutdown -hP now
After searching the web I learned I could do a suspend at the cli as Root by doing:shutdown -r now
All of these work just as they should leading me to suspect my problem is with a missing Xfce componnt of some sort unknown to me.echo -n mem> /sys/power/state
Your information regarding sudo was very helpful. I do not normally use sudo so I learned something."sudo /sbin/halt" does work, for example.
I decided I would add /sbin and /usr/sbin to my PATH which does not contain them. Immediate problem, I do not seem to have a .bash_profile in the home irectory of my user, which is the hidden file referenced in materials I have as the hidden file containing the PATH statement.
Well, echo $PATH will print the PATH satement so it has to be somewhere! So now I have to find that critter so I know where it is.
BTW I do not have exitantix.sh in /usr/local/bin on this system.
I think as a next step I will go over to my antix13-full system and see how that compares.
Thanks again for your help.
-
Posts: 1,308
- Joined: 31 Aug 2009
#4
You can set your path in the .bashrc file in your home directory. Do a"ls -a" to see all the hidden files.
The exitantix.sh program won't exist on your antiX core system because core has all the X-windows stuff stripped off. It will be on your antiX full system.
The exitantix.sh program won't exist on your antiX core system because core has all the X-windows stuff stripped off. It will be on your antiX full system.
-
Posts: 146
- Joined: 10 Dec 2012
#5
XFCE by default requires a running display manager like lightdm to perform shutdown with user privileges. If I understand correctly the content of /etc/rc*.d, lightdm is started by init at the single user stage as a root process, and later at stage 5 as a user process. XFCE passes the shutdown request to the display manager, wich performs it as root. When i replaced lightdm with my login script and X autostart script, i had the logout button in xfce, but not the shutdown button. On the mate desktop both buttons appeared, but the shutdown button was greyed out, and inactive. The logout button worked in both xfce and mate. So dou you have a display manager?
The '/usr/local/bin/exitantix.sh' script is installed in AntiX base and full. It's good to know, that it is NOT installed in AntiX core. The package 'install-meta-antix' metapackage installer may simplify things on the core version. It contains -amongst others- the XFCE metapackage.
The '/usr/local/bin/exitantix.sh' script is installed in AntiX base and full. It's good to know, that it is NOT installed in AntiX core. The package 'install-meta-antix' metapackage installer may simplify things on the core version. It contains -amongst others- the XFCE metapackage.
-
Posts: 1,062
- Joined: 20 Jan 2010
#6
is it possible that policy kit is not installed and / or running when you start up? I know this is a requirement of de's like xfce / mate but it is not pulled in with the de as it is really the login manager's duty.
-
Posts: 29
- Joined: 06 Sep 2009
#7
My thanks to Dave and Eperbab. It has been a bit hetic but today and tomorrow I might have a bit of time to work further with Core, which is proving to be an interesting experiment. I will say that core is among the most responsive systems I have run over the last few years. Let's hope I can iron out the last few wrinkles. I'll report back and let you know how things are working.
-
Posts: 29
- Joined: 06 Sep 2009
#8
Anybody who has the same problem I did might benefit from reading the several responses on this thread because BitJam Eperbab and Dave each contributed part of the solution, so my thanks to everyone!
The biggest piece here was that policykit was not installed.
Step one: Go to the wiki - bless the wiki -- and find out what policy kit is.
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"https://wiki.debian.org/PolicyKit"
linktext was:"https://wiki.debian.org/PolicyKit"
====================================
If you do not know you will find out what it is, what it does and why you need it.
There also is a nice explanation at
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://scarygliders.net/2012/06/20/a-brief-guide-to-policykit/"
linktext was:"http://scarygliders.net/2012/06/20/a-br ... policykit/"
====================================
Step Two: Use apt-cache search to find it and then install it. (Do update first!)
The command pkaction then will show which pk actions are known to the system. Sure enough, in my case shutdown, suspend and hibernate all appeared in the resulting list.
Result: These commands now work in Xfce when I click my user name on the top-right corner of the panel. The three small icons in the login manager also work. Note I am running lightdm.
I did notice that there are somewhat different versions of policykit depending on whether one runs a kde-based or gnome-based system. Possibly a difference in tool-kits?
The biggest piece here was that policykit was not installed.
Step one: Go to the wiki - bless the wiki -- and find out what policy kit is.
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"https://wiki.debian.org/PolicyKit"
linktext was:"https://wiki.debian.org/PolicyKit"
====================================
If you do not know you will find out what it is, what it does and why you need it.
There also is a nice explanation at
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://scarygliders.net/2012/06/20/a-brief-guide-to-policykit/"
linktext was:"http://scarygliders.net/2012/06/20/a-br ... policykit/"
====================================
Step Two: Use apt-cache search to find it and then install it. (Do update first!)
The command pkaction then will show which pk actions are known to the system. Sure enough, in my case shutdown, suspend and hibernate all appeared in the resulting list.
Result: These commands now work in Xfce when I click my user name on the top-right corner of the panel. The three small icons in the login manager also work. Note I am running lightdm.
I did notice that there are somewhat different versions of policykit depending on whether one runs a kde-based or gnome-based system. Possibly a difference in tool-kits?