Подскажите пожалуйста, как можно запустить X-Сервер с помощью su или sudo от имени xguest. Команда запуска:
startx xfce4 -- :2
Консоль, с которой запускается х-сервер - bash-скрипт. Скрипт запущен от имени root простым пользователем (планируется регистрация скрипта в sudoers).
Испробованные варианты:
[root@host ~]# su -c "startx xfce4 -- :2" xguest
xauth: creating new authority file /home/xguest/.serverauth.1477
Authentication failed - cannot start X server.
Perhaps you do not have console ownership?xinit: Server error.
[root@host ~]# su - -c "startx xfce4 -- :2" xguest
xauth: creating new authority file /home/xguest/.serverauth.4360
Authentication failed - cannot start X server.
Perhaps you do not have console ownership?xinit: Server error.
[root@host ~]# sudo -u xguest startx xfce4 -- :2
xauth: timeout in locking authority file /root/.serverauth.1831
xauth: timeout in locking authority file /root/.xauthJtAXJC
xauth: timeout in locking authority file /root/.xauthJtAXJC
xauth: timeout in locking authority file /root/.xauthJtAXJC
xauth: timeout in locking authority file /root/.xauthJtAXJC
Authentication failed - cannot start X server.
Perhaps you do not have console ownership?xinit: Server error.
xauth: timeout in locking authority file /root/.xauthJtAXJC
rm: невозможно удалить `/root/.serverauth.1831': Отказано в доступе
[root@host ~]# sudo -u xguest -i startx xfce4 -- :2
xauth: creating new authority file /home/xguest/.serverauth.2424
xauth: timeout in locking authority file /root/.xauthJtAXJC
xauth: timeout in locking authority file /root/.xauthJtAXJC
xauth: timeout in locking authority file /root/.xauthJtAXJC
xauth: timeout in locking authority file /root/.xauthJtAXJC
Authentication failed - cannot start X server.
Perhaps you do not have console ownership?xinit: Server error.
xauth: timeout in locking authority file /root/.xauthJtAXJC
[root@host ~]#
Исходная задача - написать скрипт, который активирует пользователя xguest, запускает xfce на втором граф.терминале от имени xguest, ждёт завершения (либо убивает xfce по таймауту, допустим полчаса) и блокирует пользователя xguest.
Всем заранее спасибо!