Is Gparted not available via a VNC session?

Bo Berglund bo.berglund at gmail.com
Mon Dec 27 20:48:13 UTC 2021


On Mon, 27 Dec 2021 19:03:01 +0100, Bo Berglund <bo.berglund at gmail.com> wrote:

>So I tried the following from a post on AskUbuntu:
>
>- Start a terminal
>- $ xhost +local:
>- Start another terminal
>- $ sudo gparted
>- Now GParted appears!
>
>- Close GParted
>- Use Mate menu to start GParted
>- Nothing happens...
>- ps shows no sign of gparted...
>- Again type sudo gparted into one of the terminals
>- Gparted appears
>
>So what is the deal here, can Gparted only be started from a Teminal when using
>VNC????
>
>How can I make the magic happen also if I use the Mate Menu to start GParted?
>

I "solved" the problem as follows:

1) Created shellscript file $HOME/bib/startgeparted containing:

#!/bin/bash
/usr/bin/xhost +local:
sudo /usr/sbin/gparted

and made it executable

2) Copied the installed desktop file to the user desktop:

cp /usr/share/applications/gparted.desktop /home/user/Desktop

3) Edited the ~/Desktop/gparted.desktop 
Replaced the Exec command with this:

Exec=/home/user/bin/startgparted

Now I could start GParted from the desktop icon.

I also edited the desktop file in the mate location with the Exec replacement,
but this only worked on one of my two laptops...

Still the desktop icon trick worked on both.


-- 
Bo Berglund
Developer in Sweden





More information about the ubuntu-users mailing list