Problems opening Gedit under ROOT

Posted on 2005-05-16
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?
Question by:jslayton01
    LVL 12

    Expert Comment

    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.

    Author Comment

    Ok,  its under here:


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

    Author Comment

    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 problem. I am not that lazy for crying out loud:) :) :)
    LVL 23

    Expert Comment


    Edit  ~root/.bashrc

    and add a line such as


    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)

    LVL 12

    Expert Comment

    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.
    LVL 10

    Accepted Solution

    'su' is not enough because your environment is not set then. you have to do 'su -' then it should work


    Author Comment

    idmsk -

    Thanks, that should do it. I tried it.


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
    If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
    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.

    745 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now