Link to home
Start Free TrialLog in
Avatar of jslayton01
jslayton01

asked on

Problems opening Gedit under ROOT

When I had Mandrake I managed to edit my config files in GEDIT by entering 'su' in the shell console and it would popup. But in Suse I have a hard time doing that. I can only open it under my username. But when I type 'su' and then Gedit, it gives me Command not Found.  Becasue I want to edit the /etc/cups/cupsd.conf file but I can't as USER. Then I tried going into the Shell Konsole as 'SU' to become ROOT and typed GEDIT and said Command not Found.... In Mandrake I never had this issue. Even with Kate, same problem. But what bothers me the most, is on the Kstart-Menu, it has it named as Text Editor instead of GEDIT. It should be named as GEDIT in Kstart-Menu. But I have no problems opening it up under Non-Root...I installed Gedit a while ago after I installed SUSE. I got it from the Package List in YAST.

What can be the issue here?
Avatar of Heem14
Heem14

problem is the command is not in your path. do this:

whereis gedit

it's likely in /opt/gnome/bin  - but whatever you get as a response, type that in once you have done an su

also consider installing a command line text editor like pico (much easier to use than vi) - this way you can also edit files when you are SSH'd into the box.
Avatar of jslayton01

ASKER

Ok,  its under here:

/opt/gnome/bin/gedit

And what do I have to do next inorder to get it running under ROOT and in the Shell Konsole?
Ok, it worked...

Then how come in Mandrake I just typed GEDIT and it worked like that??? Its very very wierd. Is there a way I can do that instead by just typing GEDIT?

I meand I can do it the long way too...no problem. I am not that lazy for crying out loud:) :) :)

Edit  ~root/.bashrc

and add a line such as

PATH=$PATH:/opt/gnome/bin/

log out, log in...   /opt/gnome/bin  should be in your
default path thereafter.

PATH is set on a per-user basis, typically administrative users
will have few things in the path, which is good for security reasons

(things like ".", the present working directory  certainly do not
belong in root's path, due to the potential security risk, but are
sometimes ok  in a regular user account's path)

you could also make a launcher on your desktop, use the command

kdesu gedit


then it will prompt you for root password and you can run as root directly from clicking. I prefer to do things in command line though.
ASKER CERTIFIED SOLUTION
Avatar of idmisk
idmisk
Flag of Austria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
idmsk -

Thanks, that should do it. I tried it.