If you log in as root, “su” in a terminal emulator, such as the GNOME Terminal, and then once as root, type “gnomesu gedit”, this should open gedit as root.
A further note to this. There is actually a desktop specificity to this. If you are using gnome or KDE, then to open gedit as root you type (as a regular user):
if using Gnome:
gnomesu gedit
.
if using KDE :
kdesu gedit
and in both cases enter root password when prompted.
The same is true for opening any other apps with root permissions. As a regular user, in KDE type “kdesu application” and in Gnome type “gnomesu application”.
What you may find interesting is the LXDE desktop is different. If using LXDE, you can simply first type “su” (or “su -” ) and then type the ‘application’ and there is no need for an lxdesu or anything like that.
For example to open the application ‘leafpad’ with root permissions
in KDE I type: kdesu leafpad
in Gnome I type: gnomesu leafpad
in LXDE I type: su -c leafpad
… and I enter root password when prompted for a password.
On 06/06/2011 09:06 AM, Kyluke wrote:
>
> Whenever i try sudo gedit I get:
>
> Cannot open display:
> Run ‘gedit --help’ to see a full list of available command line
> options.
>
> I have run gedit --help and have found nothing to help me open gedit.
> Please let me know if I missed something or how I can open gedit as
> root.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> If you log in as root, “su” in a terminal emulator, such as the GNOME
> Terminal, and then once as root, type “gnomesu gedit”, this should open
> gedit as root.
it is unnecessary to become root in the terminal prior to issuing
“gnomesu gedit”…that entered into a user terminal will prompt a popup
asking for the root password, and if that successful gedit will open
with root powers… see
–
dd CAVEAT: http://is.gd/bpoMD
via NNTP openSUSE 11.4 [2.6.37.6-0.5] + KDE 4.6.0 + Thunderbird 3.1.10
Acer Aspire One D255, 1.66 GHz Atom, 1 GB RAM, Intel Pineview graphics
When your gecko is broken you have a reptile dysfunction! *
oldcpu wrote:
> - in LXDE I type: su -c leafpad
There is also a very generic desktop independent xdg-su from the package
xdg-utils (for graphical applications), the benefit (if it is one) compared
to su is it opens a graphical password dialog, so you need no terminal and
it can directly be used with [ALT] [F2].
–
PC: oS 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.6.3 | GeForce
9600 GT | 4GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.6.0 | nVidia
ION | 3GB Ram
DenverD wrote:
> On 06/06/2011 05:36 PM, DawthLasu wrote:
>
>> If you log in as root, “su” in a terminal emulator, such as the GNOME
>> Terminal, and then once as root, type “gnomesu gedit”, this should open
>> gedit as root.
>
> two little problems with that information:
>
> 1. to become root in a terminal one should use “su -” and not “su”, see
> http://tinyurl.com/ydbwssh
>
> 2. it is unnecessary to become root in the terminal prior to issuing
> “gnomesu gedit”…that entered into a user terminal will prompt a popup
> asking for the root password, and if that successful gedit will open
> with root powers… see
On 06/06/2011 05:46 PM, martin_helm wrote:
> There is also a very generic desktop independent xdg-su from the package
> xdg-utils (for graphical applications), the benefit (if it is one) compared
> to su is it opens a graphical password dialog, so you need no terminal and
> it can directly be used with [ALT] [F2].
as can both kdesu and gnomesu thusly:
alt+F2
type for example “kdesu kwrite” or “gnomesu gedit”
type root password into GUI password dialog
kwrite/gedit opens (no terminal required)
and, now there is a third way to be entered onto line two above:
xdg-su -c [kwrite/gedit/etc]
which is only half again as long (four key strokes longer than kdesu)
for kde, but only two more strokes than gnomesu
–
dd CAVEAT: http://is.gd/bpoMD
via NNTP openSUSE 11.4 [2.6.37.6-0.5] + KDE 4.6.0 + Thunderbird 3.1.10
Acer Aspire One D255, 1.66 GHz Atom, 1 GB RAM, Intel Pineview graphics
When your gecko is broken you have a reptile dysfunction! *
DenverD wrote:
> as can both kdesu and gnomesu
which you don’t need on a plain x11/openbox/fluxbox/lxde for example, that
was my point just to make it more clear (of course you can install kdesu or
gnomesu there but it makes not too much sense to install something with more
dependencies if you have already a tool which does the same job without
additional dependencies).
On kde of course I use kdesu not xdg-su -c.
–
PC: oS 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.6.3 | GeForce
9600 GT | 4GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.6.0 | nVidia
ION | 3GB Ram
On 06/06/2011 07:06 PM, DawthLasu wrote:
>
> Well, that told me didn’t it. Least I learnt something new.
that was my whole point, not to “tell you” but to let you (and all those
who follow in this thread learn the more correct info for openSUSE (i
know some other distros do things differently)…ok?
> Thanks for the tips.
and, when i make technical mistakes (which the next person in the thread
might wanna follow) i’d expect you to shine the light on the
facts–helps everyone involved…right?
–
dd CAVEAT: http://is.gd/bpoMD
via NNTP openSUSE 11.4 [2.6.37.6-0.5] + KDE 4.6.0 + Thunderbird 3.1.10
Acer Aspire One D255, 1.66 GHz Atom, 1 GB RAM, Intel Pineview graphics
When your gecko is broken you have a reptile dysfunction! *
@DenverD
I forgot to add some smiley or so when I answered. By the way I use kdesu
exactly for the reason you mentioned - it saves a few keystrokes and I am
incredibly lazy
–
PC: oS 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.6.3 | GeForce
9600 GT | 4GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.6.0 | nVidia
ION | 3GB Ram
On 06/06/2011 07:39 PM, martin_helm wrote:
> @DenverD
> I forgot to add some smiley or so when I answered. By the way I use kdesu
> exactly for the reason you mentioned - it saves a few keystrokes and I am
> incredibly lazy
>
not as lazy as me, i’m trying to figure out how to make this alias work:
alias g=‘xdg-su -c’
which works in a terminal thusly
g kwrite
launches a gui password prompt, and then a root powered kwrite…
however, it doesn’t work from Alt+F2, and i can’t divine why, can you?
–
dd CAVEAT: http://is.gd/bpoMD
via NNTP openSUSE 11.4 [2.6.37.6-0.5] + KDE 4.6.0 + Thunderbird 3.1.10
Acer Aspire One D255, 1.66 GHz Atom, 1 GB RAM, Intel Pineview graphics
When your gecko is broken you have a reptile dysfunction! *
DenverD wrote:
> however, it doesn’t work from Alt+F2, and i can’t divine why, can you?
>
Same here, but I simply do not know which configuration files are read when
[ALT][F2] is used.
What about a script named g and put it into ~/bin?
#/bin/sh
xdg-su -c "$@"
(and yes this is a nasty, there is for sure a better solution which I do not
see right now)
–
PC: oS 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.6.3 | GeForce
9600 GT | 4GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.6.0 | nVidia
ION | 3GB Ram
No you’re right, it was my mistake, and now I know the better way to do it
I’ll be watching to see if you and Martin get that alias of yours working, I’ve just been learning on aliases in the modprobe.conf for LPI Certification I’m working towards
On 06/06/2011 10:06 PM, DawthLasu wrote:
>
> I’ll be watching to see if you and Martin get that alias of yours
> working, I’ve just been learning on aliases in the modprobe.conf for LPI
> Certification I’m working towards
yep, i don’t understand why Alt+F2 won’t accept a ‘perfectly good’
alias… (and, i have no idea what an LPI Certification is!)
–
dd CAVEAT: http://is.gd/bpoMD
via NNTP openSUSE 11.4 [2.6.37.6-0.5] + KDE 4.6.0 + Thunderbird 3.1.10
Acer Aspire One D255, 1.66 GHz Atom, 1 GB RAM, Intel Pineview graphics
When your gecko is broken you have a reptile dysfunction! *
It’s a certification that basically says “I can do Linux, me” from the Linux Professional Institute. I’ve always wanted to do more with Linux, and now I’m finally getting round to it