Talk:Running X apps as root

From ArchWiki
Revision as of 12:20, 18 February 2012 by Macieks (Talk | contribs) (Another solution)

Jump to: navigation, search

What about /etc/X0.hosts file ? It's descibed in Xserver manual, in section "GRANTING ACCESS".


Using xhost+ is insecure: http://www.ocf.berkeley.edu/help/X_Windows_Env_HTML/security.html Maybe adding:

HOST=`hostname`
XAUTH=`ps -C X f|sed -n 's/.*-auth *//p'`
XKEY=`xauth -f ${XAUTH} list | awk '{print $3}'`

xauth add ${HOST}/unix:0 MIT-MAGIC-COOKIE-1 ${XKEY}
xauth add ${HOST}:0 MIT-MAGIC-COOKIE-1 ${XKEY}

unset HOST
unset XAUTH
unset XKEY

to /root/.bashrc is a better solution ?



OK ... one more solution:

  1. xhost +SI:localuser:root

localuser:root being added to access control list

or saving it in a config file:

  1. cat /etc/X0.hosts

si:localuser:root