LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-28-2007, 05:32 PM   #1
dissociative
Member
 
Registered: Jul 2007
Posts: 42

Rep: Reputation: 15
Problem running X apps as other users


I run X with startx from runlevel 3, when I try to run any graphical application as a another user I get error messages that say unable to open display like this.

Code:
bash-3.1$ audacious 
No protocol specified
No protocol specified
audacious: cannot open display:
Code:
bash-3.1$ xarchive
No protocol specified
Error parsing options
I'm not sure if this has something to do with the runlevel
 
Old 11-28-2007, 05:37 PM   #2
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,443

Rep: Reputation: 73
no it has nothing to do with the runlevel and everything to do with the X server. You have to give other users permission to use the already running X server (since it is running under a different user).

A dangerous, but easy way to allow everyone access is to simply do a
Code:
xhost +
It is safer just to add the username you want to be able to connect with a
Code:
xhost +USERNAME
 
Old 11-28-2007, 08:44 PM   #3
dissociative
Member
 
Registered: Jul 2007
Posts: 42

Original Poster
Rep: Reputation: 15
I tried that but it returns an error even as root:

Code:
root@darkstar:/home/guest# xhost +user
No protocol specified
xhost:  unable to open display ":0.0"
 
Old 11-28-2007, 11:36 PM   #4
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,443

Rep: Reputation: 73
oops forgot to tell you to also export the display.
As the user you logged into X...
Code:
xhost +127.0.0.1
now as the other user
Code:
export DISPLAY=127.0.0.1:0.0
Now try running your apps.
 
Old 11-29-2007, 12:33 AM   #5
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Check this and later posts: http://www.linuxquestions.org/questi...4/#post2964588


For username it should be like this:

xhost +user@domain e.g. xhost +dissociative@localhost

Last edited by Alien_Hominid; 11-29-2007 at 12:36 AM.
 
Old 11-29-2007, 03:08 AM   #6
difrost
LQ Newbie
 
Registered: Nov 2007
Location: Poland
Distribution: Slackware, Beton
Posts: 7

Rep: Reputation: 0
Also specify only display number, e.g.:
Code:
export DISPLAY=:0
 
  


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
Odd problem when running apps. Delta_Dude12 Linux - General 2 08-27-2006 08:45 PM
installing apps for all users cerebellum Linux - Newbie 10 05-31-2005 04:05 PM
Font problem with KDE apps running under gnome movery Linux - Software 4 10-12-2004 03:21 PM
Problem Running certain apps intens Slackware 2 01-12-2004 01:13 PM
Running apps as alternate users otisthegbs Linux - Software 1 11-25-2003 03:12 AM

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

All times are GMT -5. The time now is 02:54 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
Open Source Consulting | Domain Registration