I’ve just installed openSUSE 11 x64 edition with Gnome. I cannot run gparted in it (I’ve installed it from “Software management”.
When I run it from the “Application Browser” - nothing happens. When I run it from the terminal by typing “sudo /usr/sbin/gparted” I have this error:
alexk@ALEX-DESKTOP:~> sudo /usr/sbin/gparted
(gpartedbin:20529): Gtk-WARNING **: cannot open display:
alexk@ALEX-DESKTOP:~>
What am I doing wrong? It used to work fine in 64-bit Ubuntu 8.04
Gparted is designed to run on boot. Normally you would burn an iso onto disk and then put disk in drive and restart. It is completely independent.
Best is to use openSuse partition manager in yast. This makes it easier to set mount points.
Cryovac:
$ su
/usr/sbin/gparted
Works like a charm, thanks! BTW, why doesn’t it work with ‘sudo’?
Yes I know, I have a gparted CD in case of emergency, but I just wanted to resize partitions on my second HDD that has only data partitions.
Thanks for pointing at the Yast partition manager, it’s much easier than editing fstab by hand
sudo is downgraded a bit compared with su. As opposed to Ubuntu where sudo is root, in Suse it’s not quite root.
With sudo you are still using your $PATH and will not get programs that are in /sbin and /usr/sbin as those are in root’s $PATH.
You could do:
sudo /usr/sbin/gparted
and that would probably work, but if you are running a script that calls other programs, again it may not find programs due to your $PATH.
What I often do on machines using the sudo method, e.g. *buntu, is:
sudo su -
and that gives me root’s environment and yet still be able to use sudo and my own password instead of su.
Thanks for the lesson; now I really know the difference.