LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Fedora 9 gedit fails if launched as root from terminal (https://www.linuxquestions.org/questions/linux-software-2/fedora-9-gedit-fails-if-launched-as-root-from-terminal-679538/)

itstootuff 10-28-2008 08:34 AM

Fedora 9 gedit fails if launched as root from terminal
 
hey everyone

i very recently shifted to linux : fedora . I am using 2.6.25-14.fc9.i686.

The tweaking on linux requires to edit some system config file and that requires switching to root (while i am actually logged in as normal user).
I do it by typing 'su -' command in terminal. But then i cannot open gedit to edit the files. it says

No protocol specified
cannot open display:
Run 'gedit --help' to see a full list of available command line options.


If i login as root and then try to open gedit through terminal - it works..

whats wrong...

thanks for help

TB0ne 10-28-2008 08:54 AM

Quote:

Originally Posted by itstootuff (Post 3323981)
hey everyone

i very recently shifted to linux : fedora . I am using 2.6.25-14.fc9.i686.

The tweaking on linux requires to edit some system config file and that requires switching to root (while i am actually logged in as normal user).
I do it by typing 'su -' command in terminal. But then i cannot open gedit to edit the files. it says

No protocol specified
cannot open display:
Run 'gedit --help' to see a full list of available command line options.

If i login as root and then try to open gedit through terminal - it works..

X windows display variable isn't set when you SU to root on a terminal window. After you SU to root at the terminal, you can type in "export DISPLAY=0:0", and try it.

itstootuff 10-28-2008 09:19 AM

hey thanksss

now it opens BUTTTTT it gives following error

(gedit:3515): GnomeUI-WARNING **: While connecting to session manager:
Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed.

whats that...

thanks for help

eagleheart 10-28-2008 09:47 AM

It might help to copy (as logged-in-user) ~/.Xauthority to /root

In slackware/kde I use "kdesu" to get display-enabled-root functionality. If you have the kde libs try it (I use it in fluxbox, e.g.). Or perhaps gnome has something similar.

OTOH Centos (even the latest, 5.2) always gives a display enabled term with "su -" at the command line (while in D.E). I'm surprised Fedora is different.

itstootuff 10-28-2008 11:19 AM

hey thanks all

TBOne: this needs me to log in as root first and then type
export DISPLAY=:0.0
on the terminal and logout and then login as regular user. Coz otherwise it never works...
eagleheart: there is no ~/.Xauthority file in Fedora 9.

thanks anyways

eagleheart 10-28-2008 12:56 PM

~ = your home directory.

I'm surprised you don't have .Xauthority in your home directory (e.g.,
/home/itstootuff/ )


All times are GMT -5. The time now is 11:10 PM.