Visit the LQ Articles and Editorials section
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 05-18-2010, 06:19 PM   #1
LQ Newbie
Registered: May 2010
Distribution: Arch Linux x86_64
Posts: 12

Rep: Reputation: 0
Can't launch applications as root

When I try to run thunar,for example, as root i receive a :
bash-4.1# thunar
No protocol specified
Thunar: Cannot open display:
It was working but not now and with sudo everything is fine
EDIT: I'm using "xhost +" to fix, it's safe?

Last edited by Moiseshb; 05-18-2010 at 07:46 PM.
Old 05-18-2010, 07:34 PM   #2
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
You aren't supposed to be running anything as root, that is the problem.
Old 05-18-2010, 07:41 PM   #3
LQ Newbie
Registered: May 2010
Distribution: Arch Linux x86_64
Posts: 12

Original Poster
Rep: Reputation: 0
Oh, I thought it was working
I will use sudo
Old 05-18-2010, 07:42 PM   #4
Senior Member
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133
Blog Entries: 6

Rep: Reputation: 223Reputation: 223Reputation: 223
You're logged into a graphical environment as user, su to root, and attempt to launch an application? The reason is, root is not running X, and the display is not exported to the root user.

Before you su to root, enter export XAUTHORITY=~/.Xauthority as the user, su to root, then run the application. The obligatory as root be careful, it's not safe, hope you know what you are doing goes here.
Old 05-18-2010, 07:46 PM   #5
LQ Newbie
Registered: May 2010
Distribution: Arch Linux x86_64
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks for the explanation
I will use sudo,I think is more safe.
Old 05-18-2010, 07:51 PM   #6
Senior Member
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,960

Rep: Reputation: 1082Reputation: 1082Reputation: 1082Reputation: 1082Reputation: 1082Reputation: 1082Reputation: 1082Reputation: 1082
Another alternative is to use kdesu. i.e. 'kdesu thunar'


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
openoffice 3 : install OK but how to launch it via Applications > Office ? jonaskellens Linux - Software 2 10-31-2008 02:36 PM
Program to launch SSH applications ar1 Linux - Software 1 09-27-2006 05:11 PM
Can Python code launch applications? carl0ski Programming 1 12-14-2005 04:09 PM
how to launch applications on x login? zero79 Debian 7 07-11-2005 06:07 PM
Applications requiring 'root' to launch.... sankeny Linux - Software 3 10-23-2002 07:49 AM

All times are GMT -5. The time now is 01:04 AM.

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