?
Solved

Problems opening Gedit under ROOT

Posted on 2005-05-16
7
Medium Priority
?
837 Views
Last Modified: 2012-06-27
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?
0
Comment
Question by:jslayton01
7 Comments
 
LVL 12

Expert Comment

by:Heem14
ID: 14015421
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.
0
 

Author Comment

by:jslayton01
ID: 14015437
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?
0
 

Author Comment

by:jslayton01
ID: 14015448
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:) :) :)
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 23

Expert Comment

by:Mysidia
ID: 14015569

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)

0
 
LVL 12

Expert Comment

by:Heem14
ID: 14015667
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.
0
 
LVL 10

Accepted Solution

by:
idmisk earned 1000 total points
ID: 14022705
'su' is not enough because your environment is not set then. you have to do 'su -' then it should work

-michael
0
 

Author Comment

by:jslayton01
ID: 14022741
idmsk -

Thanks, that should do it. I tried it.

0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month16 days, 12 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question