You are not logged in.
Pages: 1
Hello there,
I am trying to use xfce4-power-manager with dwm but I am failing to make it work properly as it needs policykit. Can someone help me figure out what to put in my .xinitrc so that when I auto-start xfce4-power-manager it is blessed with the necessary elevated rights to hibernate my laptop?
I have used awesome WM before with the ck-launch-session directive and then put my xfce4-power-manager into rc.lua to make it work, but it seems that dwm doesn't have an "autostart" mechanism (fortunately), so I have to go the "clean, efficient" way.
Anyone care to help enlighten me without telling me to rtfm? I have been on the wiki countless times including gentoo's wiki which is not too shabby, either, and even freedesktop's documentation. Looks like I am the only retarded one that still doesn't get how dbus works on an 80/20 basis. /endrant
Last edited by awayand (2011-06-15 04:19:44)
Offline
Here is mine:
ewaller@odin:~ 1003 %cat .xinitrc
DEFAULT_SESSION=openbox
xset b off
setxkbmap -option ctrl:nocaps
case $WM in
kde)
ck-launch-session dbus-launch startkde
;;
xfce4)
~/bin/xfce4&
ck-launch-session dbus-launch startxfce4
;;
lxde)
~/bin/lxde&
ck-launch-session dbus-launch startlxde
;;
*)
~/bin/openbox&
ck-launch-session dbus-launch $DEFAULT_SESSION
;;
esac
ewaller@odin:~ 1004 %
I start xfce4 by commanding:
WM=xfce4 startx
Edit: Oh, the ~/bin/* files are environment specific start up files.
Last edited by ewaller (2011-06-14 04:02:30)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
right so let's say you start lxde that way, you will still have to start xfce4-power-manager *after* that, because if you started it before lxde with the ck-launch-session command, then xfce4-power-manager wouldn't have the necessary rights... Any way to get this working?
Offline
I cheat
ewaller@odin:~ 1003 %cat bin/xfce4
#!/bin/bash
sleep 5
conky&
tilda&
I do start things afterwards.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Shame on you!
Offline
anyone else got an idea to fix this?
Offline
Finally found a way. Here is what my .xinitrc looks like to make dwm work with console-/policykit:
exec ck-launch-session bash -c "xfce4-power-manager &
pcmanfm -d --desktop-off &
stalonetray --kludges fix_window_pos,force_icons_size &
dwmst"
Offline
Or you could do it the easy way and exec ck-launch-session script
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fi
# exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice
exec ck-launch-session dbus-launch --sh-syntax --exit-with-session ~/.bin/startdwm
and then everything in startdwm will have rights assigned.
Offline
I like that one, will do that instead. thanks!
Offline
Pages: 1