В интернете искал, но либо не помагало либо не находил пути(файлы) которые нужно редактировать у себя в системе.
мб кто-нить поможет настроить. надо разрешить выключать ребутать комп всем пользователям из xfce. (из консоли командами эти действия выполняются)
Облегчу вам задачу, но насколько сильно, да и облегчу ли - не знаю :)
В общем, процесс запуска DE|WM в Slackware состоит из следующих шагов:
1) Init читает файл /etc/inittab, определяет из него runlevel, до которого система должна догрузиться. Для графики у нас это runlevel 4.
2) Далее, узнав, что нужно попасть в четвертый уровень, init выполняет сценарий /etc/rc.d/rc.4. Весь файл я не буду приводить, но вот важная часть:
text
# If all you have is XDM, I guess it will have to do:
if [ -x /usr/bin/xdm ]; then
exec /usr/bin/xdm -nodaemon
elif [ -x /usr/X11R6/bin/xdm ]; then
exec /usr/X11R6/bin/xdm -nodaemon
fi
То есть, если бинарник xdm существует и является исполняемым, то он будет запущен с параметром -nodaemon (этот параметр не играет роли, потому что у вас, скорее всего, все равно иначе)
3) Далее, xdm читает свои конфигурационные файлы и выполняет запуск сервера иксов. Среди прочих конфигов читаются /etc/X11/xdm/X{session,startup}, /etc/X11/xinit/xinitrc, последний является симлинком на /etc/X11/xinit/xinitrc.xfce.
4) Xinitrc.xfce выполняет одну из двух команд в зависимости от значения переменной DESKTOP_SESSION:
text
if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
exec ck-launch-session dbus-launch --exit-with-session /usr/bin/startxfce4
else
exec dbus-launch --exit-with-session /usr/bin/startxfce4
fi
Первая команда - это запуск через ConsloleKit, вторая — через D-Bus. В первом случае ConsoleKit запускает startxfce4 через D-Bus для обхода бага. Но в нормальных условиях достаточно просто
text
exec startxfce4
Вот так, в общих чертах... Кнопочки работают, если 1) Xstartup успешно зарегистрирует сессию пользователя и 2) D-Bus будет нормально подключаться к сессии.
не могу отыскать где находиться этот запуск. у меня всё немного не так:
часть файла /etc/inittab
text
# The default runlevel.
id:2:initdefault:
# Boot-time system configuration/initialization script.
# This is run first except when booting in emergency (-b) mode.
si::sysinit:/etc/init.d/rcS
# What to do in single-user mode.
~~:S:wait:/sbin/sulogin
# /etc/init.d executes the S and K scripts upon change
# of runlevel.
#
# Runlevel 0 is halt.
# Runlevel 1 is single-user.
# Runlevels 2-5 are multi-user.
# Runlevel 6 is reboot.
message () {
# pretty-print messages of arbitrary length; use xmessage if it
# is available and $DISPLAY is set
MESSAGE="$PROGNAME: $*"
echo "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2
if [ -n "$DISPLAY" ] && which xmessage > /dev/null 2>&1; then
echo "$MESSAGE" | fold -s -w ${COLUMNS:-80} | xmessage -center -file -
fi
}
message_nonl () {
# pretty-print messages of arbitrary length (no trailing newline); use
# xmessage if it is available and $DISPLAY is set
MESSAGE="$PROGNAME: $*"
echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2;
if [ -n "$DISPLAY" ] && which xmessage > /dev/null 2>&1; then
echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} | xmessage -center -file -
fi
}
internal_errormsg () {
# exit script with error; essentially a "THIS SHOULD NEVER HAPPEN" message
# One big call to message() for the sake of xmessage; if we had two then
# the user would have dismissed the error we want reported before seeing the
# request to report it.
errormsg "$*" \
"Please report the installed version of the \"x11-common\"" \
"package and the complete text of this error message to" \
"<debian-x@lists.debian.org>."
}
# initialize variables for use by all session scripts
# attempt to create an error file; abort if we cannot
if (umask 077 && touch "$ERRFILE") 2> /dev/null && [ -w "$ERRFILE" ] &&
[ ! -L "$ERRFILE" ]; then
chmod 600 "$ERRFILE"
elif ERRFILE=$(tempfile 2> /dev/null); then
if ! ln -sf "$ERRFILE" "${TMPDIR:=/tmp}/xsession-$USER"; then
message "warning: unable to symlink \"$TMPDIR/xsession-$USER\" to" \
"\"$ERRFILE\"; look for session log/errors in" \
"\"$TMPDIR/xsession-$USER\"."
fi
else
errormsg "unable to create X session log/error file; aborting."
fi
exec >>"$ERRFILE" 2>&1
echo "$PROGNAME: X session started for $LOGNAME at $(date)"
# sanity check; is our session script directory present?
if [ ! -d "$SYSSESSIONDIR" ]; then
errormsg "no \"$SYSSESSIONDIR\" directory found; aborting."
fi
# Attempt to create a file of non-zero length in /tmp; a full filesystem can
# cause mysterious X session failures. We do not use touch, :, or test -w
# because they won't actually create a file with contents. We also let standard
# error from tempfile and echo go to the error file to aid the user in
# determining what went wrong.
WRITE_TEST=$(tempfile)
if ! echo "*" >>"$WRITE_TEST"; then
message "warning: unable to write to ${WRITE_TEST%/*}; X session may exit" \
"with an error"
fi
rm -f "$WRITE_TEST"
# use run-parts to source every file in the session directory; we source
# instead of executing so that the variables and functions defined above
# are available to the scripts, and so that they can pass variables to each
# other
SESSIONFILES=$(run-parts --list $SYSSESSIONDIR)
if [ -n "$SESSIONFILES" ]; then
set +e
for SESSIONFILE in $SESSIONFILES; do
. $SESSIONFILE
done
set -e
fi
exit 0
# vim:set ai et sts=2 sw=2 tw=80:
не знаю важно ли но вот результат команды ck-list-sessions
Достаточно определить в /etc/polkit-1/localauthority/50-local.d/enable-shutdown.pkla такие правила, чтобы кнопки стали активными, а пользователи снова смогли от своего имени управлять питанием компьютера.