From owner-freebsd-questions@freebsd.org Tue Jul 25 22:52:49 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54985DA98A5 for ; Tue, 25 Jul 2017 22:52:49 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mailrelay12.qsc.de (mailrelay12.qsc.de [212.99.163.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.antispameurope.com", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B668B6A776 for ; Tue, 25 Jul 2017 22:52:48 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de ([213.148.129.14]) by mailrelay12.qsc.de; Wed, 26 Jul 2017 00:52:45 +0200 Received: from r56.edvax.de (port-92-195-203-176.dynamic.qsc.de [92.195.203.176]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 086013CBF9; Wed, 26 Jul 2017 00:52:43 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id v6PMqh9H002021; Wed, 26 Jul 2017 00:52:43 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Wed, 26 Jul 2017 00:52:43 +0200 From: Polytropon To: Manish Jain Cc: Carl Johnson , "freebsd-questions@freebsd.org" Subject: Re: FreeBSD-11, Mate, Terminal, Gvim Message-Id: <20170726005243.0daee7e1.freebsd@edvax.de> In-Reply-To: References: <20170725210647.6f4c8fcd.freebsd@edvax.de> <20170725215338.41ea83f0.freebsd@edvax.de> <20170725230437.88caf5bd.freebsd@edvax.de> <20170725231936.3f571dbc.freebsd@edvax.de> <86o9s8w5ja.fsf@elm.localnet> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-cloud-security-sender: freebsd@edvax.de X-cloud-security-recipient: freebsd-questions@freebsd.org X-cloud-security-Virusscan: CLEAN X-cloud-security-disclaimer: This E-Mail was scanned by E-Mailservice on mailrelay12.qsc.de with 733CB6A38FA X-cloud-security-connect: mx01.qsc.de[213.148.129.14], TLS=1, IP=213.148.129.14 X-cloud-security: scantime:.1288 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jul 2017 22:52:49 -0000 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, ...