IMPOSSIBLE OPEN FILE WITH GEDIT COMMAND

Hi,
with opensuse 11.1 (gnome desktop environment) I receive a strange message when trying to open a file, like fstab, with gedit.

If I type:

sudo gedit /etc/fstab

after entered the password I obtain this:

Gtk-WARNING **: cannot open display: 

I looked for an answer in the web but nothing. Have you got any idea?

Try gksudo gedit [filename].

are you thinking about the similar command in kde for kate?

kdesu kate .....

instead of

sudo kate ....

could be. I try.

Hi
Use gnomesu instead;


gnomesu gedit /etc/fstab


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.1 (i586) Kernel 2.6.27.19-3.2-pae
up 3:58, 2 users, load average: 0.13, 0.25, 0.19
ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I think this came up last week too. As you are trying to load with ‘sudo’
try, instead, ‘gnomesu’ or ‘kdesu’ depending on if you are using Gnome or
KDE. I think you’ll enjoy the results. The reason is that you need to be
able to connect to your desktop (owned by your user) as ‘root’ (the user
you are becoming). There are other ways, but gnomesu and kdesu make it
easy for you:

gnomesu gedit /etc/fstab

Good luck.

ciampucci wrote:
> Hi,
> with opensuse 11.1 (gnome desktop environment) I receive a strange
> message when trying to open a file, like fstab, with gedit.
>
> If I type:
>
>
> Code:
> --------------------
> sudo gedit /etc/fstab
> --------------------
>
>
> after entered the password I obtain this:
>
>
> Code:
> --------------------
> Gtk-WARNING **: cannot open display:
> --------------------
>
>
> I looked for an answer in the web but nothing. Have you got any idea?
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIcBAEBAgAGBQJJ09MLAAoJEF+XTK08PnB5EjoP/RPdsDQCR56cOgvVDHWz4ytF
YER+Ys1NOVshzEY0NOZtVt1g3bWzUrl1iSsXCZ0ZbZvSJVa91cK//3hF46CybFvi
Wvce8owLrlTZEwbFPN7xRsXZL4boi6f+1DJbLiTyA7rqrPI/6pNKT3XHq9+QWBUQ
iK2xFGyWsQP2fCQbbU5Xk7D1XXE82TfisQ/wqtsHfFDXxoq2AiSEodvEqdWt27bI
Gj7dsHO1HxgZem56H2vgA1gFZtvJCwgjhQj/G0AUbSMrXiTEKal6cA11i3OFQUpc
E6d2hzXmihKAUBqhGFKKPgDeyEb5KrdR0jUKX7eeMeXMJB7mF312fh8xtdWXFC6+
eIPAtwpbQhElMMsMWQIvb0Fu1Obg/EYTj/nZczt12117zzw66lxKRSoqhU0f2aoP
lJ1lBwLkVL75hECrKjRauY1BxNLvPrZ9SMIG3x2EZkP910K3OwNXCL8LqTFOJDyU
RUQ6QtbfPPWO4jDWqskKtrx0qkZoFmM49mTQbgZsGvT6TUhkLA5KGsAPytoc/W9U
/4fcBEFn3zSmzpCpP/2IwNSsdslab6QslGIR2LDe5PMDkHpSVA52D7AQZ0sQOqI/
sKinBHxV8MTovGvDanRIfM37uIOElcFOnk41i4ibEmOOLGz743Jt4tJb0dUjNoQW
kk8XDgGpuJMYoKUr/Qi7
=IPSw
-----END PGP SIGNATURE-----

So what in practice is the difference between gnomesu and gksudo? I’ve always used gksudo, and it seems to work, but lots of people keep recommending gnomesu. Puzzled…

Hi
gksudo is long gone… :wink: gnomesu now.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.1 (i586) Kernel 2.6.27.19-3.2-pae
up 4:10, 2 users, load average: 0.60, 0.28, 0.19
ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME

Thanks - must’ve been confusing things with ubuntu, in which it still works. I’ve been playing with KDE so much I hadn’t noticed I was telling people the wrong thing.

:shame:

Sorry everyone!

:wink:

Hi
That it (gksudo) doesn’t exist in the openSUSE distro… the default is
gnomesu.

Isn’t it an Ubuntu thing anyways?


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.1 (i586) Kernel 2.6.27.19-3.2-pae
up 4:26, 2 users, load average: 0.36, 0.37, 0.23
ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME

Use gnomesu instead;

Ok, it works. Thanks.

just a little consideration: in Ubuntu I usually use sudo with gedit and it works fine. Why doesn’t work in opensuse too?

> just a little consideration: in Ubuntu I usually use sudo with gedit
> and it works fine. Why doesn’t work in opensuse too?

because the security model is different in openSUSE and Ubuntu…

many sudo available programs in Ubuntu are NOT available in openSUSE…

it is felt by the openSUSE developer community that the way here is
more secure…(but i can’t explain why)


Conficter

> just a little consideration: in Ubuntu I usually use sudo with gedit
> and it works fine. Why doesn’t work in opensuse too?

because the security model is different in openSUSE and Ubuntu…

many sudo available programs in Ubuntu are NOT available in openSUSE…

it is felt by the openSUSE developer community that the way here is
more secure…(but i can’t explain why)

Thanks, very clear.