Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Jul 2017 00:52:43 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Manish Jain <bourne.identity@hotmail.com>
Cc:        Carl Johnson <carlj@peak.org>, "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: FreeBSD-11, Mate, Terminal, Gvim
Message-ID:  <20170726005243.0daee7e1.freebsd@edvax.de>
In-Reply-To: <VI1PR02MB12002C2EB276B0F09FE9A45CF6B80@VI1PR02MB1200.eurprd02.prod.outlook.com>
References:  <a973035703bd510d1226163df5ac9a34.squirrel@webmail.harte-lyne.ca> <20170725210647.6f4c8fcd.freebsd@edvax.de> <VI1PR02MB1200A48204221928325FC148F6B80@VI1PR02MB1200.eurprd02.prod.outlook.com> <20170725215338.41ea83f0.freebsd@edvax.de> <VI1PR02MB1200CA799271D535917ED023F6B80@VI1PR02MB1200.eurprd02.prod.outlook.com> <20170725230437.88caf5bd.freebsd@edvax.de> <VI1PR02MB12001763910BE8FB395166D4F6B80@VI1PR02MB1200.eurprd02.prod.outlook.com> <20170725231936.3f571dbc.freebsd@edvax.de> <86o9s8w5ja.fsf@elm.localnet> <VI1PR02MB12002C2EB276B0F09FE9A45CF6B80@VI1PR02MB1200.eurprd02.prod.outlook.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 25 Jul 2017 22:40:57 +0000, Manish Jain wrote:
> 
> 
> 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

If $DISPLAY is set or not usually depends on the terminal
emulator where the shell runs. For example, classic xterm
sets $DISPLAY to the correct display name. For remote
connections, you might need to set $DISPLAY manually (for
example with hostname / IP and display number, maybe with
a screen number or "sub-display" if needed).

See "man X" for details, section "DISPLAY NAMES", and also
the following section "ACCESS CONTROL". Yes, this stuff is
actually documented. ;-)




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170726005243.0daee7e1.freebsd>