Using GParted via TigerVNC how to enable on LinuxMint?

Sam Varshavchik mrsam at courier-mta.com
Sun Jan 5 21:13:29 UTC 2025


Bo Berglund writes:

> On Sun, 05 Jan 2025 17:32:00 +0100, Bo Berglund <bo.berglund at gmail.com>  
> wrote:
>
> >export XAUTHORITY=/home/UserName/.Xauthority
>
> I found an easier solution not needing any script:
>
> Edit the user's .bashrc file and add this to it:
>
> export XAUTHORITY="/home/username/.Xauthority"
>
> (Replace "username" with your own user name.)
>
> Then when you log in the env var will be set and therefore all you need to  
> do is
> this:
>
> In a new terminal window:
> sudo gparted
>
> Now GParted starts and can  be used normally.

I use tigervnc, both the server and the client. When I originally looked  
into how to set up a VNC, I don't recall where I found the guide, but it  
told me to create a $HOME/.vnc/xstartup script. Mine reads, for an XFCE  
desktop:

#!/bin/bash
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
export XAUTHORITY="$HOME/.vnc/.Xauthority";
xhost +local:
xset b off
cd $HOME
startxfce4

This ends up setting XAUTHORITY, appropriately, only for my VNC sessions,  
and without interfering with other stuff, for example I can ssh instead of  
using VNC, use X11forwarding with the ssh session, as an alternative to VNC  
(which'll work, I guess, as long as X11 is still here), and have it manage  
its own XAUTHORITY without interfering with VNC.

Using ~/.vnc/xstartup to set XAUTHORITY seems to be better.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20250105/4935c8f3/attachment.sig>


More information about the ubuntu-users mailing list