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.
Re: gedit is not opening as root user
use
Code:
gksu gedit /path/to/file
Re: gedit is not opening as root user
I would say
Code:
gksudo gedit /path/to/file
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
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.
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:
Quote:
ls -l /usr/bin/gksudo
lrwxrwxrwx 1 root root 4 Apr 30 2012 /usr/bin/gksudo -> gksu
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.
Re: gedit is not opening as root user
Quote:
Originally Posted by
vasa1
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?
Re: gedit is not opening as root user
Quote:
Originally Posted by
Morbius1
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/
Re: gedit is not opening as root user
Quote:
Originally Posted by
dcstar
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.