LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 10-28-2008, 08:34 AM   #1
itstootuff
LQ Newbie
 
Registered: Oct 2008
Posts: 7

Rep: Reputation: 0
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
 
Old 10-28-2008, 08:54 AM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,589

Rep: Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558
Quote:
Originally Posted by itstootuff View Post
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.
 
Old 10-28-2008, 09:19 AM   #3
itstootuff
LQ Newbie
 
Registered: Oct 2008
Posts: 7

Original Poster
Rep: Reputation: 0
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
 
Old 10-28-2008, 09:47 AM   #4
eagleheart
Member
 
Registered: Apr 2007
Location: Athens, Georgia, USA
Distribution: kubuntu 12.04, centos 6.3
Posts: 31

Rep: Reputation: 16
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.
 
Old 10-28-2008, 11:19 AM   #5
itstootuff
LQ Newbie
 
Registered: Oct 2008
Posts: 7

Original Poster
Rep: Reputation: 0
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
 
Old 10-28-2008, 12:56 PM   #6
eagleheart
Member
 
Registered: Apr 2007
Location: Athens, Georgia, USA
Distribution: kubuntu 12.04, centos 6.3
Posts: 31

Rep: Reputation: 16
~ = your home directory.

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
vista/ubuntu gedit across a ssh fails john test Linux - Newbie 20 08-04-2008 11:31 AM
cannot run gedit as root allasso Linux - Software 9 12-28-2007 06:32 PM
Scripts with root privileges launched from a web browser unforkable Programming 6 03-15-2007 09:12 AM
fedora core 4 won't boot from grub, fails when changing root silex_88 Fedora 3 10-01-2005 03:58 PM
kplayer 0.5.2 crashes when launched as root on KDE 3.3.2 stl1859 Linux - Software 0 12-10-2004 09:57 AM


All times are GMT -5. The time now is 04:45 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration