FreeBSD-11, Mate, Terminal, Gvim

Manish Jain bourne.identity at hotmail.com
Tue Jul 25 22:41:05 UTC 2017



On 07/26/17 03:19, Carl Johnson wrote:
> I just have/root/.Xauthority as a symbolic link to ~/.Xauthority for my
> user login.  I think that should be safe for me as the sole user on this
> system, and I don't have to fool with xhost.
> 

Either way (extract/symlink), your root user shell must set the DISPLAY

I think, for bash users, the best way would be put the following in 
/root/.bash_profile :

export DISPLAY=:0 # if normal user exports :0.0, root should export that

[ -f /var/xauth.extract ] && \
xauth merge /var/xauth.extract || \
ln -sf /home/my_normal_user_name/.Xauthority  ~/.Xauthority

The normal user should put this in his .bash_profile :

export DISPLAY=:0 # not needed on my KDE konsole/terminator, but no harm

[ -f /var/xauth.extract ] && \
xauth extract /var/xauth.extract $DISPLAY


More information about the freebsd-questions mailing list