LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices



Reply
 
Search this Thread
Old 08-07-2004, 05:32 AM   #1
muttley
LQ Newbie
 
Registered: Aug 2004
Distribution: Debian Sid
Posts: 8

Rep: Reputation: 0
Running GUI apps frm terminal while logged in as normal user


Hello, I seem to have a problem running gui apps as 'root' from the commandline while logged in as a normal user. Output from screen from a typical attempt is as follows:

root@debian:/home/deviant# gedit /etc/apt/sources.list
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

kedit: cannot connect to X server :0.0

What solutions are there for me? Do I need to edit some config files and if so which ones? What lines must I add and which part of the file or files i.e. top or end of file/files? Or do I just need to pass some commands in a terminal to fire up gui apps as 'root' while logged in as an ordinary user from the shell?

thanks 4 any help in advance
 
Old 08-07-2004, 10:53 AM   #2
muttley
LQ Newbie
 
Registered: Aug 2004
Distribution: Debian Sid
Posts: 8

Original Poster
Rep: Reputation: 0
Problem resolved. Found a solution but I suspect it could be a "per session" fix and not a permanent answer.

Code:
export XAUTHORITY=/home/"normal user"/.Xauthority
Where "normal user" = name of normal user running X
 
Old 08-07-2004, 05:58 PM   #3
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,513

Rep: Reputation: 64
Quote:
Originally posted by muttley
Problem resolved. Found a solution but I suspect it could be a "per session" fix and not a permanent answer.

Put it in your /root/.bashrc and it will be there every time you su to root as the user named in the line. This assuming of course that you have uncommented the lines in the /root/.bash_profile to source the .bashrc.
 
Old 08-08-2004, 12:39 AM   #4
muttley
LQ Newbie
 
Registered: Aug 2004
Distribution: Debian Sid
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by HappyTux
Put it in your /root/.bashrc and it will be there every time you su to root as the user named in the line. This assuming of course that you have uncommented the lines in the /root/.bash_profile to source the .bashrc.
Thank you HappyTux. Edited /root/.bashrc with nano and inserted the appropriate i.e. above-mentioned line as advised. Things are working fine thus far.
 
  


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
startx does not load when logged in as a normal user? xunzi Linux - Newbie 0 06-29-2004 09:37 AM
KDE users - Having root file manager while still logged in as normal user thegeekster Linux - General 1 04-27-2004 11:47 PM
Ugly fonts when logged in as normal user Abdul Linux - Software 2 03-09-2004 02:46 AM
Modem connection slow when logged on af normal user Fennek Linux - Networking 0 03-18-2003 06:09 PM
Modem connection fast when logged in as root slow when normal user Fennek Linux - Networking 0 03-17-2003 11:59 AM


All times are GMT -5. The time now is 10:21 AM.

Main Menu
Advertisement
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