LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 04: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, 09: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, 04:58 PM   #3
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
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-07-2004, 11:39 PM   #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



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 08:37 AM
KDE users - Having root file manager while still logged in as normal user thegeekster Linux - General 1 04-27-2004 10:47 PM
Ugly fonts when logged in as normal user Abdul Linux - Software 2 03-09-2004 01:46 AM
Modem connection slow when logged on af normal user Fennek Linux - Networking 0 03-18-2003 05:09 PM
Modem connection fast when logged in as root slow when normal user Fennek Linux - Networking 0 03-17-2003 10:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 03:39 PM.

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
Open Source Consulting | Domain Registration