You are not logged in.

#1 2010-10-05 15:42:01

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Can't edit with gedit when root

If I do "su" and then try to edit something with gedit, it returns:

# gedit /etc/inittab 

(gedit:6485): EggSMClient-WARNING **: Failed to connect to the session manager: None of the authentication protocols specified are supported

and I can't edit it. It works with leafpad though. I found some URLs with similar problems but they don't help...
https://www.redhat.com/archives/redhat- … 00997.html
http://osdir.com/ml/debian-bugs-dist/20 … 09779.html
http://lists.opensuse.org/opensuse/2009 … 01911.html

Please help me to fix it.

Offline

#2 2010-10-05 15:46:29

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,543

Re: Can't edit with gedit when root

gksu gedit /etc/inittab

Last edited by skunktrader (2010-10-05 15:47:59)

Offline

#3 2010-10-05 21:42:39

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: Can't edit with gedit when root

Generally speaking apps (like gedit I guess) which require dbus connections etc. won't work with su -

Some env variables that you need aren't exported. Use sudo in those cases.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#4 2010-10-06 11:56:19

quigybo
Member
Registered: 2009-01-15
Posts: 223

Re: Can't edit with gedit when root

ngoonee wrote:

Some env variables that you need aren't exported. Use sudo in those cases.

Even sudo won't export all environment variables, in that case you need sudo -E.

Last edited by quigybo (2010-10-06 11:57:38)

Offline

#5 2010-10-06 13:02:48

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Can't edit with gedit when root

Or just use the proper tool (gksu/kdesu) because even sudo won't export everything in every case. Plenty of evidence of this on the Ubuntu forums when someone decides that launching firefox with sudo is an awesome idea and changes permissions on $HOME/.mozilla.

Offline

#6 2010-10-06 13:53:31

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Re: Can't edit with gedit when root

ngoonee wrote:

Generally speaking apps (like gedit I guess) which require dbus connections etc. won't work with su -

Some env variables that you need aren't exported. Use sudo in those cases.

But it worked just a few days ago before last upgrade. That's strange... Why did it work?
And gedit works perfectly with sudo, not a single error.

Last edited by Mr. Alex (2010-10-06 13:54:50)

Offline

#7 2010-12-26 01:22:44

while
Member
Registered: 2010-05-14
Posts: 35

Re: Can't edit with gedit when root

Sorry for reviving an old thread...

Anyone know what is happening with this error?? I just installed a new system and experience this error when trying to edit files with emacs as root.

Been searching now for some time and I guess it's related to dbus but everyone seems to think its acceptable since it's not directly related to Arch. I'm on Gentoo as well and I've not seen this error there. It's looks quite serious to me if you can't edit files as root without using sudo or some weird login session.

Offline

#8 2010-12-26 02:28:58

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: Can't edit with gedit when root

Does using gksudo not work?

Offline

#9 2010-12-26 09:15:41

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Re: Can't edit with gedit when root

while, you can edit with gedit when logged in as "su -".

Offline

#10 2010-12-26 09:19:23

while
Member
Registered: 2010-05-14
Posts: 35

Re: Can't edit with gedit when root

I don't have it installed. I don't like typing sudo in front of every command I want to run so I normally only log in as root do what I need to do and log out.

If I log in as root in a shell using "su -" it works but gives me some other errors. It doesn't run my .bashrc then either. Seems weired that you need to do this to use GUI version of emacs though.

Isn't there any package you can install/downgrade manually to fix this? Which update started this problem? I was working fine on my old arch laptop.

edit: same with gedit as emacs btw

Last edited by while (2010-12-26 10:04:25)

Offline

Board footer

Powered by FluxBB