How to run gparted through ssh -X not root user
by IsaacKuo from LinuxQuestions.org on (#6HSQZ)
I already have a simple workaround (simply unplug the computer and move it to where I have a monitor), but I'm curious if there's some simple thing I'm missing.
I have a computer without a monitor, which I wanted to use for some drive maintenance tasks - resizing/moving partitions, cloning, etc. However, I always restrict ssh to NOT allow root login, and I prefer not to change that.
So, I was thinking this would work:
Code:kuo@ella:~$ ssh -X dlit
kuo@dlit:~$ gparted
-bash: gparted: command not found
kuo@dlit:~$ /usr/sbin/gparted
localuser:root being added to access control list
xhost: must be on local machine to add or remove hosts.
Error executing command as another user: No authentication agent found.
localuser:root being removed from access control list
xhost: must be on local machine to add or remove hosts.
kuo@dlit:~$ su -
Password:
root@dlit:~# gparted
Unit tmp.mount does not exist, proceeding anyway.
(gpartedbin:2091): Gtk-WARNING **: 21:53:39.709: cannot open display:
root@dlit:~# exit
logout
kuo@dlit:~$ su
Password:
root@dlit:/home/kuo# /usr/sbin/gparted
Unit tmp.mount does not exist, proceeding anyway.
sh: 1: dmidecode: not found
X11 connection rejected because of wrong authentication.
(gpartedbin:2196): Gtk-WARNING **: 21:54:09.327: cannot open display: localhost:10.0I have no problem running a graphical X program as my normal user, but when I "su" to root, root can't start up a graphical X program.
I mean, this isn't a pressing problem for me, I was able to work around and attach this computer elsewhere to a monitor when I had the opportunity (this monitor is attached to a computer used by others).
But it's a "nice to have" for me if I'm just missing something simple.
Thanks!
I have a computer without a monitor, which I wanted to use for some drive maintenance tasks - resizing/moving partitions, cloning, etc. However, I always restrict ssh to NOT allow root login, and I prefer not to change that.
So, I was thinking this would work:
Code:kuo@ella:~$ ssh -X dlit
kuo@dlit:~$ gparted
-bash: gparted: command not found
kuo@dlit:~$ /usr/sbin/gparted
localuser:root being added to access control list
xhost: must be on local machine to add or remove hosts.
Error executing command as another user: No authentication agent found.
localuser:root being removed from access control list
xhost: must be on local machine to add or remove hosts.
kuo@dlit:~$ su -
Password:
root@dlit:~# gparted
Unit tmp.mount does not exist, proceeding anyway.
(gpartedbin:2091): Gtk-WARNING **: 21:53:39.709: cannot open display:
root@dlit:~# exit
logout
kuo@dlit:~$ su
Password:
root@dlit:/home/kuo# /usr/sbin/gparted
Unit tmp.mount does not exist, proceeding anyway.
sh: 1: dmidecode: not found
X11 connection rejected because of wrong authentication.
(gpartedbin:2196): Gtk-WARNING **: 21:54:09.327: cannot open display: localhost:10.0I have no problem running a graphical X program as my normal user, but when I "su" to root, root can't start up a graphical X program.
I mean, this isn't a pressing problem for me, I was able to work around and attach this computer elsewhere to a monitor when I had the opportunity (this monitor is attached to a computer used by others).
But it's a "nice to have" for me if I'm just missing something simple.
Thanks!