Author Topic: Zen, when su to root, unable to start gedit?  (Read 1199 times)

Offline MBantz

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1317
Zen, when su to root, unable to start gedit?
« on: March 10, 2011, 03:09:46 PM »
Hey,

when I su to root and need for example gedit to edit a file, I get this message - have been like this for quite some time (several months). I recall that other gui programs are affected as well.

Code: [Select]
[root@localhost lirc]# gedit lircd.conf

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

**
GLib-GIO:ERROR:gdbusconnection.c:2270:initable_init: assertion failed: (connection->initialization_error == NULL)
Afbrudt (SIGABRT)

cheers,
MBantz

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Zen, when su to root, unable to start gedit?
« Reply #1 on: March 10, 2011, 03:26:54 PM »
Have you tried, dbus-launch gedit, Martin?

Offline MBantz

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1317
Re: Zen, when su to root, unable to start gedit?
« Reply #2 on: March 10, 2011, 03:47:46 PM »
Hey Neal,

yup, that did it - do I have to use this prefix every time?

cheers,
M

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Zen, when su to root, unable to start gedit?
« Reply #3 on: March 10, 2011, 04:00:42 PM »
Hi,

What about just "gksu gedit" from a console in user mod ? After all, graphical applications are not supposed to be started directly with a root console of from a root session.

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline MBantz

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1317
Re: Zen, when su to root, unable to start gedit?
« Reply #4 on: March 10, 2011, 05:08:48 PM »
well, i'd rather have it working automatically,

when building packages I often have to shift between root and normal user - and always logging in as ordinary user it is annoying every time (that's very often:-) I have to edit a file owned by root (typically my own package once installed - and it need fixups to get it right - then insert the fixes in the build),

gedit saves me a bunch of time, well suited for my type of work here,

cheers,
MBantz


Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Zen, when su to root, unable to start gedit?
« Reply #5 on: March 10, 2011, 05:44:28 PM »
Hey Neal,

yup, that did it - do I have to use this prefix every time?

cheers,
M

You should be fine now and be able to start it normally.

Offline MBantz

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1317
Re: Zen, when su to root, unable to start gedit?
« Reply #6 on: March 11, 2011, 12:27:18 AM »
Hey Neal,

yup, that did it - do I have to use this prefix every time?

cheers,
M

You should be fine now and be able to start it normally.


Hi Neal,

just tried to su to root and gedit a file - and get the message again.

Think I need to read up on dbus-launch to see what it is missing when launching a gui program. For quite a while ago there was no need for dbus-launch btw.,

thanks for all these tips :-)

cheers,
MBantz

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12518
Re: Zen, when su to root, unable to start gedit?
« Reply #7 on: March 11, 2011, 12:34:37 AM »
Add alias su='su -' to your .bashrc file and you won't have to mess with dbus-launch anymore. Log out and back in again to activate.

Thanks to everyone who donates. You keep the servers running.

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Zen, when su to root, unable to start gedit?
« Reply #8 on: March 11, 2011, 01:54:59 AM »
Da boss answered while I slept. ::)

 :D :D

Offline Dragynn

  • Hero Member
  • *****
  • Posts: 1436
  • Abide.
Re: Zen, when su to root, unable to start gedit?
« Reply #9 on: March 12, 2011, 08:07:25 AM »
Dude, all this CLI stuff....lol! ;D

When I want to edit a file in gedit, I just right click it and select "open as administrator" and enter my password. It worked in Zen-mini from day one.
This aggression will not stand man.

Online pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: Zen, when su to root, unable to start gedit?
« Reply #10 on: March 14, 2011, 08:25:34 AM »
Dude, all this CLI stuff....lol! ;D

When I want to edit a file in gedit, I just right click it and select "open as administrator" and enter my password. It worked in Zen-mini from day one.

True, but "all this CLI stuff" is handy over slow, remote links (i.e., ssh;D

Offline siamer

  • Sr. Member
  • ****
  • Posts: 284
    • ZEN-mini
Re: Zen, when su to root, unable to start gedit?
« Reply #11 on: March 18, 2011, 02:23:04 PM »
Hi.

In ZEN mini there is su and su -.
I didn't make alias from su to su - stragiht away because su - redirecting to home directory even if user don't want. to make alias Tex wrote how to do that...

Here you have more info about that: http://linuxgator.org/gnome/forum/viewtopic.php?f=6&t=1563

Regards,
siamer
Every man dies, but not every man really lives... !!