Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: gedit is not opening as root user

  1. #1
    Join Date
    Aug 2011
    Beans
    1

    gedit is not opening as root user

    praveen@milos:~$ sudo gedit /etc/apt/apt.conf
    [sudo] password for praveen:

    ** (gedit:4331): WARNING **: Command line `dbus-launch --autolaunch=32635d81c49028f93a9356cb00000008 --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initialization failed.\n
    Cannot open display:
    Run 'gedit --help' to see a full list of available command line options.

  2. #2
    Join Date
    Oct 2012
    Beans
    182

    Re: gedit is not opening as root user

    use
    Code:
    gksu gedit /path/to/file

  3. #3
    Join Date
    Jan 2005
    Location
    South Africa
    Beans
    2,098
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: gedit is not opening as root user

    I would say
    Code:
    gksudo gedit /path/to/file
    If you don't make backups of your important data, your data is obviously not important to you.

  4. #4
    Join Date
    Jan 2008
    Beans
    7,744

    Re: gedit is not opening as root user

    I recommend:

    Code:
    sudo nano /etc/apt/apt.conf
    or

    Code:
    sudo vi /etc/apt/apt.conf

  5. #5
    Join Date
    Dec 2007
    Beans
    12,521

    Re: gedit is not opening as root user

    Recommending vi or nano is all well and good but what makes me concerned is why OP wants to edit /etc/apt/apt.conf in the first place. I've been using Ubuntu for a little over a year and haven't had the need to do so.

  6. #6
    Join Date
    Dec 2009
    Beans
    6,771

    Re: gedit is not opening as root user

    Just so we all don't get into a fight over this, gksu and gksudo are the same thing in debian:
    ls -l /usr/bin/gksudo
    lrwxrwxrwx 1 root root 4 Apr 30 2012 /usr/bin/gksudo -> gksu

  7. #7
    Join Date
    Jan 2005
    Location
    South Africa
    Beans
    2,098
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: gedit is not opening as root user

    According to the manpage, that implies that su and sudo are the same

    But thanks for clearing that up for me; never new that.
    If you don't make backups of your important data, your data is obviously not important to you.

  8. #8
    Join Date
    Feb 2005
    Location
    Melbourne, Australia
    Beans
    13,510
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: gedit is not opening as root user

    Quote Originally Posted by vasa1 View Post
    Recommending vi or nano is all well and good but what makes me concerned is why OP wants to edit /etc/apt/apt.conf in the first place. I've been using Ubuntu for a little over a year and haven't had the need to do so.
    Probably because another misguided "HOWTO" somewhere just lists commands that people blindly follow. The interesting thing about the people who continually follow these things is that their systems invariably develop all sorts of strange problems that never EVER seem seem to occur in systems that people treat correctly.

    They then come to places like this asking for help with now non-standard systems that can be so fundamentally broken that a total reinstall is the only solution (keep reading the posts in this forum if you have any doubts.....).

    Funny world, innit?
    Regards, David.
    Please use the Forum search and Wiki search for immediate help
    Please mark your thread as Solved when appropriate
    New to technical forums?: How To Ask Questions The Smart Way

  9. #9
    Join Date
    Feb 2005
    Location
    Melbourne, Australia
    Beans
    13,510
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: gedit is not opening as root user

    Quote Originally Posted by Morbius1 View Post
    Just so we all don't get into a fight over this, gksu and gksudo are the same thing in debian:
    Arrggghhhh!

    su and sudo are different! gksu and gksudo are different for the exact same reason - they are run in different User environments:

    "Su switches you to the root user account and requires the root account’s password. Sudo runs a single command with root privileges – it doesn’t switch to the root user or require a separate root user password."

    http://www.howtogeek.com/111479/htg-...tween-sudo-su/
    Regards, David.
    Please use the Forum search and Wiki search for immediate help
    Please mark your thread as Solved when appropriate
    New to technical forums?: How To Ask Questions The Smart Way

  10. #10
    Join Date
    Oct 2008
    Beans
    3,509

    Re: gedit is not opening as root user

    Quote Originally Posted by dcstar View Post
    Arrggghhhh!

    su and sudo are different! gksu and gksudo are different for the exact same reason - they are run in different User environments:

    "Su switches you to the root user account and requires the root account’s password. Sudo runs a single command with root privileges – it doesn’t switch to the root user or require a separate root user password."

    http://www.howtogeek.com/111479/htg-...tween-sudo-su/
    In my quantal install /usr/bin/gksudo links to /usr/bin/gksu.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •