Tille's SiteThe user who gives access is the one who owns the display. Find out who this is issuing the w command and spot the user marked with console in the tty field. This user can add the following code to her/his .bashrc file:
xhost | grep localhost > /dev/null if [ $? -eq 0 ]; then echo "display permissions are set" else echo "setting display access"; xhost +localhost fi
Say that you need to switch to the root account a lot, put this in root's .bashrc file:
export DISPLAY=localhost:0
If you use sh instead of bash (or ksh if you insist), split up this command:
DISPLAY=localhost:0.0 export DISPLAY
| Home |