Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
xfce4 without polkit/consolekit: suspend/shutdown greyed out
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
patrickdepinguin
n00b
n00b


Joined: 18 Jan 2007
Posts: 9

PostPosted: Tue Nov 03, 2015 9:52 am    Post subject: xfce4 without polkit/consolekit: suspend/shutdown greyed out Reply with quote

In the logout screen of XFCE4, the buttons Restart, Shut Down, Suspend and
Hibernate are all greyed out.

I have found many pages and forum threads that describe the same issue, in
Gentoo and other distributions, but in all of these cases PolicyKit and
ConsoleKit were used and this changes the situation.
I do not use polkit/consolekit, nor do I want to (in fact, on this single-user
system I do not see how it would be of benefit to me).

I am using Slim as display manager. I have also tried stopping xdm, then using
plain startx, startxfce4, or using either of those via dbus-launch. None of this
has any effect on the suspend/shutdown/... buttons.

Besides the main problem of not having these buttons in the logout screen, I
also have the same problem in xfce4-power-manager. Having looked in the source
code, I noticed that this plugin supports systemd, consolekit, or otherwise
defaults to using pkexec, a policykit executable which is thus not present on a
non-policykit system.
In an earlier version of xfce4-power-manager, 1.3.0, this code was different
and sudo was used. Since this at least already allows me to suspend using the
laptop hotkey (in which case I get a sudo password prompt even if I edited
sudoers, that aside), I have masked xfce4-power-manager>1.3.0.

Relevant packages I have installed:
(equery list xfce* slim* xorg* upower* *udev* *pm-utils*)
Code:
dev-util/xfce4-dev-tools-4.12.0
x11-terms/xfce4-terminal-0.6.3
xfce-base/xfce4-appfinder-4.12.0-r1
xfce-base/xfce4-meta-4.12
xfce-base/xfce4-panel-4.12.0
xfce-base/xfce4-session-4.12.1
xfce-base/xfce4-settings-4.12.0
xfce-extra/xfce4-mixer-4.11.0
xfce-extra/xfce4-mount-plugin-0.6.7
xfce-extra/xfce4-notifyd-0.2.4
xfce-extra/xfce4-power-manager-1.3.0
xfce-extra/xfce4-screenshooter-1.8.2
xfce-extra/xfce4-taskmanager-1.1.0
xfce-extra/xfce4-verve-plugin-1.0.1
xfce-extra/xfce4-volumed-0.1.13
xfce-extra/xfce4-whiskermenu-plugin-1.5.0

x11-misc/slim-1.3.6-r5
x11-themes/slim-themes-1.2.3a-r7

x11-base/xorg-drivers-1.16
x11-base/xorg-server-1.16.4
x11-base/xorg-x11-7.4-r2

sys-power/upower-0.99.2-r1

sys-fs/eudev-3.1.2
sys-fs/udev-init-scripts-27
virtual/libgudev-215-r3
virtual/libudev-215-r1
virtual/udev-215

sys-power/pm-utils-1.4.1-r6:0


The following additional USE flags have been set (but I had the same problem
without them):
Code:
xfce-base/xfce4-settings upower
xfce-base/xfce4-session upower


Output of emerge --info:
Code:
Portage 2.2.20.1 (python 2.7.10-final-0, default/linux/amd64/13.0/desktop, gcc-4.9.3, glibc-2.21-r1, 4.0.5-gentoo x86_64)
=================================================================
System uname: Linux-4.0.5-gentoo-x86_64-Intel-R-_Core-TM-_i5-3320M_CPU_@_2.60GHz-with-gentoo-2.2
KiB Mem:     8052820 total,   6691124 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sun, 25 Oct 2015 00:45:01 +0000
sh bash 4.3_p39
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
ccache version 3.1.9 [disabled]
app-shells/bash:          4.3_p39::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.10::gentoo, 3.4.3::gentoo
dev-util/ccache:          3.1.9-r4::gentoo
dev-util/cmake:           3.3.1-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.17::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers)
sys-libs/glibc:           2.21-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.nl.gentoo.org/gentoo-portage
    priority: -1000

raiagent
    location: /var/lib/layman/raiagent
    masters: gentoo
    priority: 0

ABI="amd64"
ABI_X86="64"
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
ACCEPT_PROPERTIES="*"
ACCEPT_RESTRICT="*"
ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci"
APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias"
ARCH="amd64"
AUTOCLEAN="yes"
BOOTSTRAP_USE="cxx unicode internal-glib python_targets_python3_4 python_targets_python2_7 multilib"
BR2_DL_DIR="/home/tdescham/repo/contrib/dl"
CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author"
CAMERAS="ptp2"
CBUILD="x86_64-pc-linux-gnu"
CCACHE_DIR="/var/ccache-portage"
CCACHE_SIZE="5GiB"
CFLAGS="-march=native -O2 -pipe"
CFLAGS_amd64="-m64"
CFLAGS_x32="-mx32"
CFLAGS_x86="-m32"
CHOST="x86_64-pc-linux-gnu"
CHOST_amd64="x86_64-pc-linux-gnu"
CHOST_x32="x86_64-pc-linux-gnux32"
CHOST_x86="i686-pc-linux-gnu"
CLEAN_DELAY="5"
COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog"
COLLISION_IGNORE="/lib/modules/* *.py[co] *$py.class */dropin.cache"
COLORTERM="xfce4-terminal"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"
CXXFLAGS="-march=native -O2 -pipe"
DBUS_SESSION_BUS_ADDRESS="unix:abstract=/tmp/dbus-A55CKhNMiW,guid=2c6318833af8543b7c3dd0ee56387105"
DEFAULT_ABI="amd64"
DESKTOP_SESSION="xfce"
DISPLAY=":0.0"
DISTDIR="/usr/portage/distfiles"
EDITOR="vim"
ELIBC="glibc"
EMERGE_DEFAULT_OPTS="--ask --verbose"
EMERGE_WARNING_DELAY="10"
EPREFIX=""
EROOT="/"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FETCHCOMMAND="wget -t 3 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}""
FETCHCOMMAND_RSYNC="rsync -avP "${URI}" "${DISTDIR}/${FILE}""
FETCHCOMMAND_SFTP="bash -c "x=\${2#sftp://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port=22 ; eval \"declare -a ssh_opts=(\${3})\" ; exec sftp -P \${port} \"\${ssh_opts[@]}\" \"\${host}:/\${x#*/}\" \"\$1\"" sftp "${DISTDIR}/${FILE}" "${URI}" "${PORTAGE_SSH_OPTS}""
FETCHCOMMAND_SSH="bash -c "x=\${2#ssh://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port=22 ; exec rsync --rsh=\"ssh -p\${port} \${3}\" -avP \"\${host}:/\${x#*/}\" \"\$1\"" rsync "${DISTDIR}/${FILE}" "${URI}" "${PORTAGE_SSH_OPTS}""
FFLAGS="-O2 -pipe"
GCC_SPECS=""
GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://mirror.bytemark.co.uk/gentoo/ http://www.mirrorservice.org/sites/distfiles.gentoo.org/"
GLADE_CATALOG_PATH=":"
GLADE_MODULE_PATH=":"
GLADE_PIXMAP_PATH=":"
GPG_AGENT_INFO="/tmp/gpg-myYX6A/S.gpg-agent:32142:1"
GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx"
GRUB_PLATFORMS=""
GSETTINGS_BACKEND="dconf"
GUILE_LOAD_PATH="/usr/share/guile/1.8"
HG="/usr/bin/hg"
HOME="/home/tdescham"
INFOPATH="/usr/share/info:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.3/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.25.1/info"
INPUT_DEVICES="keyboard mouse evdev synaptics"
IUSE_IMPLICIT="abi_x86_64 prefix prefix-guest"
KERNEL="linux"
LANG="en_US.utf8"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text"
LC_ALL=""
LC_MESSAGES=""
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LDFLAGS_amd64="-m elf_x86_64"
LDFLAGS_x32="-m elf32_x86_64"
LDFLAGS_x86="-m elf_i386"
LESS="-R -M --shift 5"
LESSOPEN="|lesspipe %s"
LIBDIR_amd64="lib64"
LIBDIR_amd64_fbsd="lib64"
LIBDIR_arm="lib"
LIBDIR_arm64="lib64"
LIBDIR_n32="lib32"
LIBDIR_n64="lib64"
LIBDIR_o32="lib"
LIBDIR_ppc="lib32"
LIBDIR_ppc64="lib64"
LIBDIR_s390="lib32"
LIBDIR_s390x="lib64"
LIBDIR_sparc32="lib32"
LIBDIR_sparc64="lib64"
LIBDIR_x32="libx32"
LIBDIR_x86="lib32"
LIBDIR_x86_fbsd="lib32"
LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer"
LINGUAS="en"
LOGNAME="tdescham"
LS_COLORS="rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:"
MAIL="/var/mail/tdescham"
MAKEOPTS="-j5"
MANPATH="/usr/local/share/man:/usr/share/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.3/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.25.1/man"
MULTILIB_ABIS="amd64 x86"
MULTILIB_STRICT_DENY="64-bit.*shared object"
MULTILIB_STRICT_DIRS="/lib32 /lib /usr/lib32 /usr/lib /usr/kde/*/lib32 /usr/kde/*/lib /usr/qt/*/lib32 /usr/qt/*/lib /usr/X11R6/lib32 /usr/X11R6/lib"
MULTILIB_STRICT_EXEMPT="(perl5|gcc|gcc-lib|binutils|eclipse-3|debug|portage|udev|systemd|clang|python-exec)"
MULTIOSDIRS="../lib64:../lib32"
MYVIMRC="/home/tdescham/.vimrc"
NETBEANS="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml"
NOCOLOR="true"
OFFICE_IMPLEMENTATION="libreoffice"
OPENGL_PROFILE="xorg-x11"
PAGER="/usr/bin/less"
PATH="/home/tdescham/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.3"
PHP_TARGETS="php5-5"
PKGDIR="/usr/portage/packages"
PORTAGE_ARCHLIST="alpha amd64 amd64-fbsd amd64-linux arm arm-linux arm64 hppa hppa-hpux ia64 ia64-hpux ia64-linux m68k m68k-mint mips nios2 ppc ppc-aix ppc-macos ppc-openbsd ppc64 ppc64-linux riscv s390 sh sparc sparc-fbsd sparc-solaris sparc64-freebsd sparc64-solaris x64-cygwin x64-freebsd x64-macos x64-openbsd x64-solaris x86 x86-cygwin x86-fbsd x86-freebsd x86-interix x86-linux x86-macos x86-netbsd x86-openbsd x86-solaris x86-winnt"
PORTAGE_BIN_PATH="/usr/lib/portage/python2.7"
PORTAGE_COMPRESS_EXCLUDE_SUFFIXES="css gif htm[l]? jp[e]?g js pdf png"
PORTAGE_CONFIGROOT="/"
PORTAGE_DEBUG="0"
PORTAGE_DEPCACHEDIR="/var/cache/edb/dep"
PORTAGE_ELOG_CLASSES="log warn error"
PORTAGE_ELOG_MAILFROM="portage@localhost"
PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for ${PACKAGE} on ${HOST}"
PORTAGE_ELOG_MAILURI="root"
PORTAGE_ELOG_SYSTEM="save_summary:log,warn,error,qa echo"
PORTAGE_FETCH_CHECKSUM_TRY_MIRRORS="5"
PORTAGE_FETCH_RESUME_MIN_SIZE="350K"
PORTAGE_GID="250"
PORTAGE_GPG_SIGNING_COMMAND="gpg --sign --digest-algo SHA256 --clearsign --yes --default-key "${PORTAGE_GPG_KEY}" --homedir "${PORTAGE_GPG_DIR}" "${FILE}""
PORTAGE_INST_GID="0"
PORTAGE_INST_UID="0"
PORTAGE_INTERNAL_CALLER="1"
PORTAGE_IONICE_COMMAND="ionice -c 3 -p ${PID}"
PORTAGE_NICENESS="3"
PORTAGE_OVERRIDE_EPREFIX=""
PORTAGE_PYM_PATH="/usr/lib64/python2.7/site-packages"
PORTAGE_PYTHONPATH="/usr/lib64/python2.7/site-packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_RSYNC_RETRIES="-1"
PORTAGE_SYNC_STALE="30"
PORTAGE_TMPDIR="/var/tmp"
PORTAGE_VERBOSE="1"
PORTAGE_WORKDIR_MODE="0700"
PORTAGE_XATTR_EXCLUDE="btrfs.* security.evm security.ima    security.selinux system.nfs4_acl"
PORT_LOGDIR_CLEAN="find "${PORT_LOGDIR}" -type f ! -name "summary.log*" -mtime +7 -delete"
PRELINK_PATH_MASK="/usr/lib64/libfreebl3.so:/usr/lib64/libnssdbm3.so:/usr/lib64/libsoftokn3.so"
PROFILE_ONLY_VARIABLES="ARCH ELIBC IUSE_IMPLICIT KERNEL USERLAND USE_EXPAND_IMPLICIT USE_EXPAND_UNPREFIXED USE_EXPAND_VALUES_ARCH USE_EXPAND_VALUES_ELIBC USE_EXPAND_VALUES_KERNEL USE_EXPAND_VALUES_USERLAND"
PWD="/mnt/home"
PYTHONDONTWRITEBYTECODE="1"
PYTHON_SINGLE_TARGET="python2_7"
PYTHON_TARGETS="python2_7 python3_4"
QT_GRAPHICSSYSTEM="raster"
RESUMECOMMAND="wget -c -t 3 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}""
RESUMECOMMAND_RSYNC="rsync -avP "${URI}" "${DISTDIR}/${FILE}""
RESUMECOMMAND_SSH="bash -c "x=\${2#ssh://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port=22 ; exec rsync --rsh=\"ssh -p\${port} \${3}\" -avP \"\${host}:/\${x#*/}\" \"\$1\"" rsync "${DISTDIR}/${FILE}" "${URI}" "${PORTAGE_SSH_OPTS}""
ROOT="/"
ROOTPATH="/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.3"
RPMDIR="/usr/portage/rpm"
RUBY_TARGETS="ruby20 ruby21"
SESSION_MANAGER="local/argentina:@/tmp/.ICE-unix/32135,unix/argentina:/tmp/.ICE-unix/32135"
SHELL="/bin/bash"
SHLVL="4"
SSH_AGENT_PID="32140"
SSH_AUTH_SOCK="/tmp/ssh-dLtGNyu0AN9k/agent.32139"
SYMLINK_LIB="yes"
TERM="xterm"
UNINSTALL_IGNORE="/lib/modules/* /var/run /var/lock"
USE="X a52 aac acpi alsa amd64 berkdb bindist bluetooth branding bzip2 cairo cdda cdr cli cracklib crypt cryptsetup cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac gdbm gif glamor gtk iconv jpeg lcms libnotify mad mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nptl ogg opengl pango pcre pdf png ppds readline sdl seccomp session sse sse2 ssl startup-notification svg tcpd tiff truetype udev unicode usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="intel i915" XFCE_PLUGINS="brightness clock trash power battery" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USER="tdescham"
USERLAND="GNU"
USE_EXPAND="ABI_MIPS ABI_PPC ABI_S390 ABI_X86 ALSA_CARDS APACHE2_MODULES APACHE2_MPMS CALLIGRA_FEATURES CAMERAS COLLECTD_PLUGINS CPU_FLAGS_X86 CROSSCOMPILE_OPTS CURL_SSL DRACUT_MODULES DVB_CARDS ELIBC ENLIGHTENMENT_MODULES FCDSL_CARDS FFTOOLS FOO2ZJS_DEVICES FRITZCAPI_CARDS GPSD_PROTOCOLS GRUB_PLATFORMS INPUT_DEVICES KERNEL LCD_DEVICES LIBREOFFICE_EXTENSIONS LINGUAS LIRC_DEVICES MONKEYD_PLUGINS NETBEANS_MODULES NGINX_MODULES_HTTP NGINX_MODULES_MAIL OFED_DRIVERS OFFICE_IMPLEMENTATION OPENMPI_FABRICS OPENMPI_OFED_FEATURES OPENMPI_RM PHP_TARGETS PYTHON_SINGLE_TARGET PYTHON_TARGETS QEMU_SOFTMMU_TARGETS QEMU_USER_TARGETS ROS_MESSAGES RUBY_TARGETS SANE_BACKENDS USERLAND UWSGI_PLUGINS VIDEO_CARDS VOICEMAIL_STORAGE XFCE_PLUGINS XTABLES_ADDONS"
USE_EXPAND_HIDDEN="ABI_MIPS ABI_PPC ABI_S390 CROSSCOMPILE_OPTS ELIBC KERNEL USERLAND"
USE_EXPAND_IMPLICIT="ARCH ELIBC KERNEL USERLAND"
USE_EXPAND_UNPREFIXED="ARCH"
USE_EXPAND_VALUES_ARCH="alpha amd64 amd64-fbsd amd64-linux arm arm-linux arm64 hppa hppa-hpux ia64 ia64-hpux ia64-linux m68k m68k-mint mips nios2 ppc ppc64 ppc64-linux ppc-aix ppc-macos ppc-openbsd riscv s390 sh sparc sparc64-freebsd sparc64-solaris sparc-fbsd sparc-solaris x64-cygwin x64-freebsd x64-macos x64-openbsd x64-solaris x86 x86-cygwin x86-fbsd x86-freebsd x86-interix x86-linux x86-macos x86-netbsd x86-openbsd x86-solaris x86-winnt"
USE_EXPAND_VALUES_ELIBC="AIX Cygwin Darwin DragonFly FreeBSD glibc HPUX Interix mintlib musl NetBSD OpenBSD SunOS uclibc Winnt"
USE_EXPAND_VALUES_KERNEL="AIX Darwin FreeBSD freemint HPUX linux NetBSD OpenBSD SunOS Winnt"
USE_EXPAND_VALUES_USERLAND="BSD GNU"
USE_ORDER="env:pkg:conf:defaults:pkginternal:repo:env.d"
VIDEO_CARDS="intel i915"
VIM="/usr/share/vim"
VIMRUNTIME="/usr/share/vim/vim74"
WINDOWID="39845892"
XAUTHORITY="/home/tdescham/.Xauthority"
XDG_CONFIG_DIRS="/etc/xdg:/etc/xdg"
XDG_CURRENT_DESKTOP="XFCE"
XDG_DATA_DIRS="/usr/local/share:/usr/share:/usr/share"
XDG_MENU_PREFIX="xfce-"
XFCE_PLUGINS="brightness clock trash power battery"
XSESSION="Xfce4"
XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"


I have seen the announcement about upower and upower-pm-utils, but
upower-pm-utils requires polkit which I don't want.
In fact, I don't even know if I need upower, can you clarify the benefits of
this?

Note that pm-suspend directly works fine.

Any help is appreciated, let me know if you need further details.
Back to top
View user's profile Send private message
mi_unixbird
Tux's lil' helper
Tux's lil' helper


Joined: 24 Jul 2015
Posts: 102

PostPosted: Tue Nov 03, 2015 10:14 am    Post subject: Reply with quote

Well, you need polkit + (consolekit | systemd-logind) for what you want basically

Shutting down is a root action, only root can issue the shutdown system call. Here's where polkit comes in which is a mechanism that determines when a non-root user can be awarded a privilege normally reserved to root by a root process. The classical Unix permission model simply cannot handle that is needed for this.

Basically, in the default Polkit policy, it says that a normal user (sometimes in a specific group) may shut down if:

- the user is currently logged in
- the user has the current seat (as in, is not logged in remotely)

This is typically "save", under these conditions, the user is physically near the machine and could press the power off button anyway. The reason something as complex as polkit is needed for this is because you don't want non-root users to be able to shut down remotely over say SSH and troll people.

So there you have the reason to use polkit for a single user-system.

Now, if you are a single user and you have given yourself root access either by knowing the password of the user that has UID=1 or via a mechanism like sudo. Then you can indeed achieve the same _rights_ as this. But not per se via the same _interface_. The way to achieve the same thing is simply issuing the shutdown system call as root. Which typically is achieved like "sudo shutdown -P now". So there's where polkit comes in, not only does it distribute rights, but it's a framework to hook onto to provide a more pleasant interface for some people.

I agree however that Xfce should probably be intelligent enough to in the absence of polkit simply give a prompt asking you to verify you are an "administrative user" or at least have a setting to allow any user in a group like "sudo" or "wheel" upon providing their password to activate shut-down. This is again not an extra security risk as they could've just issued the shutdown system call anyway provided default sudo settings by obtaining root rights remotely via say SSH.
_________________
execctl --path exec filectl --current-directory list
Back to top
View user's profile Send private message
patrickdepinguin
n00b
n00b


Joined: 18 Jan 2007
Posts: 9

PostPosted: Thu Nov 05, 2015 8:33 pm    Post subject: Reply with quote

Thanks a lot for your clear reply. It helped me in realizing that I won't find a solution to the direct problem of the greyed out buttons.

Instead, via other posts, I found alternative implementations for the same end goal:
- I do still not use polkit, consolekit, upower, udisks
- I mapped some laptop special keys to 'sudo pm-suspend' and 'sudo pm-hibernate'.
- To shutdown/reboot, the Slim display manager I was using allows me to enter 'halt'' as username and the root password as password and it will initiate a shutdown. Same for 'reboot'.
- For mounting external drives, I have installed udevil (and the SpaceFM file manager), although I still need to test that that works.
- I removed xfce4-power-manager, and replaced the brightness control with a custom script mapped to laptop keys and the battery status with xfce4-battery-plugin.

Some references:
- https://forums.gentoo.org/viewtopic-t-947670-start-0-postdays-0-postorder-asc-highlight-.html
- https://forums.gentoo.org/viewtopic-t-938680-start-0-postdays-0-postorder-asc-highlight-.html
- https://ignorantguru.github.io/udevil/
- http://ignorantguru.github.io/spacefm/
- https://wiki.archlinux.org/index.php/SLiM#Shutdown.2C_reboot.2C_suspend.2C_exit.2C_launch_terminal_from_SLiM
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5592

PostPosted: Fri Nov 06, 2015 11:28 pm    Post subject: Reply with quote

A bit of trivia: in the distant past, before all this *kit crap even existed, xfce's shutdown/suspend buttons Just Worked™, exactly the same as they need a gazillion extra daemons running to do today, because they had tiny sudo/setuid helper binaries. I'll spare you wasting time looking for those: they were removed entirely around 4.4. Coincidentally I stopped using xfce around the same time... I think E17/18/19 is the only DE that still uses the setuid shutdown helper method, but that has its own bloat issues.

(I don't even bother with pm-utils any more, I just do "echo mem > /sys/power/state" directly from acpid.)
Back to top
View user's profile Send private message
mi_unixbird
Tux's lil' helper
Tux's lil' helper


Joined: 24 Jul 2015
Posts: 102

PostPosted: Sat Nov 07, 2015 3:59 pm    Post subject: Reply with quote

Ant P. wrote:
A bit of trivia: in the distant past, before all this *kit crap even existed, xfce's shutdown/suspend buttons Just Worked™, exactly the same as they need a gazillion extra daemons running to do today, because they had tiny sudo/setuid helper binaries. I'll spare you wasting time looking for those: they were removed entirely around 4.4. Coincidentally I stopped using xfce around the same time... I think E17/18/19 is the only DE that still uses the setuid shutdown helper method, but that has its own bloat issues.

(I don't even bother with pm-utils any more, I just do "echo mem > /sys/power/state" directly from acpid.)
While I do believe the old option should still be there for those who want it at compile time. I guess the major thing of those helper binaries is that they can't track seats so they enable someone who has the rights to remotely shut down the computer. You need consolekit or logind to limit that right to local sessions only. In a multi-user environment this can definitely become a problem.

It's also providing their own functionality for something that already exists I guess. It's better that they all rely on a common library like polkit and consolekit than that each of them re-invents the wheel.
_________________
execctl --path exec filectl --current-directory list
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum