You are not logged in.

#1 2011-04-26 10:16:54

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Cannot shutdown/reboot

I am trying to follow the modern instruction from this link:
https://wiki.archlinux.org/index.php/Al … o_Shutdown

However, it won't work because I get notification of insufficient privileges when attemption to reboot/shutdown.

Here's my .xinitrc

cairo-dock &
xfdesktop &
/home/juha/bin/startup.sh &
exec ck-launch-session compiz ccp

and my startup script

sh -c "sleep 5 && wicd-client" &
sh -c "python2 -u /usr/share/screenlets/Radio/RadioScreenlet.py" &
sh -c "python2 -u /home/juha/.screenlets/NowCalendar/NowCalendarScreenlet.py" &
sh -c "python2 -u /usr/share/screenlets/Tomboy/TomboyScreenlet.py" &
sh -c "xbindkeys" &
sh -c "xfce4-volumed" &  
sh -c "sleep 25 && conky" &
while true; do emerald --replace; sleep 1; done &

I tried putting "exec ck-launch-session compiz ccp" earlier in the que, but then the system just gets locked on endless loop of login/password screen.

Offline

#2 2011-04-26 11:45:04

the sad clown
Member
From: 192.168.0.X
Registered: 2011-03-20
Posts: 837

Re: Cannot shutdown/reboot

Check your consolekit session and see if it is good or not.  It probably isn't if you are getting permission problems.

ck-list-sessions

Also, I noticed you are launching several things outside of consolekit.  You might want to instead launch them all (including your wm) from a script and launch that script from xinitrc.

Read this wiki for suggestions:
https://wiki.archlinux.org/index.php/ConsoleKit


I laugh, yet the joke is on me

Offline

#3 2011-04-26 11:47:58

fabertawe
Member
From: Lloegr
Registered: 2009-11-24
Posts: 279

Re: Cannot shutdown/reboot

I've just ditched Gnome and finally got suspend working by executing everything via ck-launch-session in .xinitrc via a script...

exec ck-launch-session dbus-launch --sh-syntax --exit-with-session "$HOME"/.xinit-compiz

My .xinit-compiz script looks like this...

#!/bin/sh
xsettingsd &
bash -c 'compiz ccp decoration --sm-client-id $DESKTOP_AUTOSTART_ID --loose-binding --indirect-rendering' &
xfce4-panel &
cairo-dock -o &
emerald --replace &
. "$HOME"/.xsession-extra &
exec gkrellm

I've put gkrellm last so I can logout from cairo-dock's Log-out applet with 'pkill gkrellm'.


Ryzen 9 5950X, X570S Aorus Pro AX, RX 6600, Arch x86_64

Offline

#4 2011-04-26 12:06:39

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Re: Cannot shutdown/reboot

fabertawe wrote:

I've just ditched Gnome and finally got suspend working by executing everything via ck-launch-session in .xinitrc via a script...

exec ck-launch-session dbus-launch --sh-syntax --exit-with-session "$HOME"/.xinit-compiz

My .xinit-compiz script looks like this...

#!/bin/sh
xsettingsd &
bash -c 'compiz ccp decoration --sm-client-id $DESKTOP_AUTOSTART_ID --loose-binding --indirect-rendering' &
xfce4-panel &
cairo-dock -o &
emerald --replace &
. "$HOME"/.xsession-extra &
exec gkrellm

I've put gkrellm last so I can logout from cairo-dock's Log-out applet with 'pkill gkrellm'.

Why are you not using "compiz ccp" directly after "ck-launch-session"?

Last edited by Lockheed (2011-04-26 12:08:25)

Offline

#5 2011-04-26 14:12:35

fabertawe
Member
From: Lloegr
Registered: 2009-11-24
Posts: 279

Re: Cannot shutdown/reboot

Lockheed wrote:

Why are you not using "compiz ccp" directly after "ck-launch-session"?

As the sad clown pointed out - "you are launching several things outside of consolekit". This way everything launched from the script is covered.


Ryzen 9 5950X, X570S Aorus Pro AX, RX 6600, Arch x86_64

Offline

#6 2011-04-26 15:35:23

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Re: Cannot shutdown/reboot

Well, so I did this:
.xinitrc

exec ck-launch-session dbus-launch --sh-syntax --exit-with-session "$HOME"/.xinitrc-compiz

.xinit-compiz

#!/bin/sh
xsettingsd &
xfdesktop &
bash -c 'compiz ccp decoration --sm-client-id $DESKTOP_AUTOSTART_ID --loose-binding --indirect-rendering' &
xfce4-panel &
cairo-dock -o &
python2 -u /usr/share/screenlets/Radio/RadioScreenlet.py" &
python2 -u /home/juha/.screenlets/NowCalendar/NowCalendarScreenlet.py" &
python2 -u /usr/share/screenlets/Tomboy/TomboyScreenlet.py" &
xbindkeys &
xfce4-volumed &  
sleep 5 && wicd-client" &
sleep 10 && conky
emerald --replace &

And as expected, it lead me into the endless login/password loop:

login screen
password screen
nvidia logo flashing once
console flashing once
login screen
password screen
nvidia logo flashing once
console flashing once
login screen

etc.

Offline

#7 2011-04-26 17:00:39

fabertawe
Member
From: Lloegr
Registered: 2009-11-24
Posts: 279

Re: Cannot shutdown/reboot

For a start you should only include the things you're actually using, for instance you weren't using 'xsettingsd &' before, that's one of mine.

Also, how are you starting X? GDM/XDM etc... I log in from the console.

Last edited by fabertawe (2011-04-26 17:02:23)


Ryzen 9 5950X, X570S Aorus Pro AX, RX 6600, Arch x86_64

Offline

#8 2011-04-26 17:01:32

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Re: Cannot shutdown/reboot

Yes, I tried without it and  this is the result.

Offline

#9 2011-04-26 17:12:39

fabertawe
Member
From: Lloegr
Registered: 2009-11-24
Posts: 279

Re: Cannot shutdown/reboot

The last entry in .xinit-compiz should have an 'exec' at the front so the script doesn't exit.

Try this for .xinit-compiz

#!/bin/sh
xfdesktop &
compiz ccp &
sh -c "sleep 5 && wicd-client" &
sh -c "python2 -u /usr/share/screenlets/Radio/RadioScreenlet.py" &
sh -c "python2 -u /home/juha/.screenlets/NowCalendar/NowCalendarScreenlet.py" &
sh -c "python2 -u /usr/share/screenlets/Tomboy/TomboyScreenlet.py" &
sh -c "xbindkeys" &
sh -c "xfce4-volumed" &  
sh -c "sleep 25 && conky" &
emerald --replace &
exec cairo-dock

Last edited by fabertawe (2011-04-26 17:16:32)


Ryzen 9 5950X, X570S Aorus Pro AX, RX 6600, Arch x86_64

Offline

#10 2011-04-26 18:33:45

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Re: Cannot shutdown/reboot

Same thing.

Offline

#11 2011-04-27 09:12:51

fabertawe
Member
From: Lloegr
Registered: 2009-11-24
Posts: 279

Re: Cannot shutdown/reboot

I'm by no means an expert in any of this, I'm in the "try it and see what works" camp! It's strange it doesn't work for you though when running all from the script as I had a similar .xinitrc setup to you initially and the new approach works perfectly for me.

I don't know if you have but you could also simplify your .xinitrc to

exec ck-launch-session "$HOME"/.xinit-compiz

and see if that works ("try all permutations and stick with what works" approach).

EDIT: I just noticed this...

Lockheed wrote:

Well, so I did this:
.xinitrc

exec ck-launch-session dbus-launch --sh-syntax --exit-with-session "$HOME"/.xinitrc-compiz

That should be "$HOME"/.xinit-compiz

Last edited by fabertawe (2011-04-27 09:20:33)


Ryzen 9 5950X, X570S Aorus Pro AX, RX 6600, Arch x86_64

Offline

#12 2011-04-27 09:17:09

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Re: Cannot shutdown/reboot

The thing is I am using automatic login and powering on the computer takes me straight to xfce/pcmanfm desktop. I am using some minimal logon manager (not GDM). Maybe this is to blame?

Offline

#13 2011-04-27 09:19:00

fabertawe
Member
From: Lloegr
Registered: 2009-11-24
Posts: 279

Re: Cannot shutdown/reboot

You're too quick for my edits wink See above regarding the error in .xinitrc


Ryzen 9 5950X, X570S Aorus Pro AX, RX 6600, Arch x86_64

Offline

#14 2011-04-27 09:23:02

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Re: Cannot shutdown/reboot

Hehe, yes, I know, but my file was actually named .xinitrc-compiz.

Offline

#15 2011-04-27 09:33:13

fabertawe
Member
From: Lloegr
Registered: 2009-11-24
Posts: 279

Re: Cannot shutdown/reboot

Whoops, oh ok wink

Lockheed wrote:

The thing is I am using automatic login and powering on the computer takes me straight to xfce/pcmanfm desktop. I am using some minimal logon manager (not GDM). Maybe this is to blame?

Like I said I'm no expert but if your original .xinitrc was logging in ok then I'm stumped as to why the slight change wouldn't work. Maybe go back to what was working but also install something like xfce4-session to handle the consolekit stuff? (I've not tried it, just a suggestion). What's the name of your logon manager?


Ryzen 9 5950X, X570S Aorus Pro AX, RX 6600, Arch x86_64

Offline

#16 2011-04-27 16:16:48

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Re: Cannot shutdown/reboot

What wiykd tgus xfce4-session do exactly?
How do I check what logon manager am I using?

By the way, I just remembered that since some time when I type sudo reboot, then instaed of rebooting, I am thrown into console screen asking me for login name but it is frozen so I have to hold the power button to power-off.

Offline

#17 2011-04-27 17:54:41

fabertawe
Member
From: Lloegr
Registered: 2009-11-24
Posts: 279

Re: Cannot shutdown/reboot

I believe xfce4-session will handle shutdown/reboot/etc for you. Have a look at the Xfce4 (Arch Wiki) page for some possible tips. You're already using some xfce components anyway.


Ryzen 9 5950X, X570S Aorus Pro AX, RX 6600, Arch x86_64

Offline

#18 2011-04-27 18:21:14

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Re: Cannot shutdown/reboot

Turns out I already had xfce4-session installed.
Why is it so hard to get linux to work...

Offline

#19 2011-04-28 08:21:37

fabertawe
Member
From: Lloegr
Registered: 2009-11-24
Posts: 279

Re: Cannot shutdown/reboot

It seems you already have all the Xfce4 stuff installed so why not just run it as per the Wiki link? That way it'll handle everything for you and you can still add your own stuff (Compiz etc) to its autostart (or whatever it calls it).


Ryzen 9 5950X, X570S Aorus Pro AX, RX 6600, Arch x86_64

Offline

#20 2011-04-28 08:30:30

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Re: Cannot shutdown/reboot

Because I want to keep xfce as minimal as possible - only for right click menu and on-screen volume/wifi indicators.
I use PCmanFM for the desktop and compiz/emerald for window management.

Offline

#21 2011-04-28 09:23:03

fabertawe
Member
From: Lloegr
Registered: 2009-11-24
Posts: 279

Re: Cannot shutdown/reboot

Hopefully someone else will have a suggestion, otherwise just keep fiddling with it until it works (that's what I do anyway!). I'd try ditching the log on manager though, see if that helps. Good luck, hope you sort it.


Ryzen 9 5950X, X570S Aorus Pro AX, RX 6600, Arch x86_64

Offline

#22 2011-04-28 11:46:06

iopo
Member
Registered: 2009-10-26
Posts: 31

Re: Cannot shutdown/reboot

Same happened to me, and I changed to openbox + fbpanel, it's ligther than xfce, and works better for me.
Then to shutdown and reboot, you can set whatever command you want for menus, so I use

sudo shutdown -r now
sudo shutdown -h now

to reboot and shutdown.

You have to add to /etc/sudousers (use visudo):

user  ALL=(ALL) NOPASSWD: /sbin/shutdown

to allow shutdown without password

Maybe there is a way to do the same with xfce menu...

Offline

#23 2011-04-28 21:07:45

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Re: Cannot shutdown/reboot

There is this file ~/.xsession and it contains

#!/bin/sh

#
# ~/.xsession
#
# Executed by xdm/gdm/kdm at login
#

/bin/bash --login -i ~/.xinitrc

Could this be responsible for my autologon?

Offline

#24 2011-04-29 12:34:11

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Re: Cannot shutdown/reboot

iopo wrote:

Same happened to me, and I changed to openbox + fbpanel, it's ligther than xfce, and works better for me.
Then to shutdown and reboot, you can set whatever command you want for menus, so I use

sudo shutdown -r now
sudo shutdown -h now

to reboot and shutdown.

You have to add to /etc/sudousers (use visudo):

user  ALL=(ALL) NOPASSWD: /sbin/shutdown

to allow shutdown without password

Maybe there is a way to do the same with xfce menu...

It brings the same result as before: X closes but I am put into console asking me for login but it is frozen so I cannot do anything.

Offline

#25 2011-04-30 10:08:54

fabertawe
Member
From: Lloegr
Registered: 2009-11-24
Posts: 279

Re: Cannot shutdown/reboot

Lockheed wrote:

There is this file ~/.xsession and it contains

#!/bin/sh

#
# ~/.xsession
#
# Executed by xdm/gdm/kdm at login
#

/bin/bash --login -i ~/.xinitrc

Could this be responsible for my autologon?

My .xsession is exactly the same as yours.


Ryzen 9 5950X, X570S Aorus Pro AX, RX 6600, Arch x86_64

Offline

Board footer

Powered by FluxBB