LinuxQuestions.org
Help answer threads with 0 replies.
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 08-25-2004, 01:28 PM   #1
hylke
Member
 
Registered: Apr 2004
Location: the Netherlands
Distribution: Ubuntu 7.04
Posts: 329

Rep: Reputation: 30
cant start x programs when under root


Hello
I cant start x programs under root.
This is what i get when i wanna start xcdroast to configure it:
Quote:
hylke@hylke:~$ su
Password:
root@hylke:/home/hylke# xcdroast
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified


Gtk-WARNING **: cannot open display: :0.0
Does anybody knows how to fix that?
Thanx Hylke
 
Old 08-25-2004, 01:33 PM   #2
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 46
hi there...

you need to export the DISPLAY variable..


Code:
setenv DISPLAY $HOSTNAME:0.0

should to the trick..


regards

slackie1000
 
Old 08-25-2004, 01:50 PM   #3
hylke
Member
 
Registered: Apr 2004
Location: the Netherlands
Distribution: Ubuntu 7.04
Posts: 329

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by slackie1000
hi there...

you need to export the DISPLAY variable..


Code:
setenv DISPLAY $HOSTNAME:0.0

should to the trick..


regards

slackie1000
It says:
root@hylke:/home/hylke# setenv DISPLAY $HOSTNAME:0.0
bash: setenv: command not found
 
Old 08-25-2004, 02:49 PM   #4
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 46
my mistake!!
i didn't read that you use a bash terminal
you need...

Code:
set DISPLAY=$HOSTNAME:.0.0
hope it is correct now..
$HOSTNAME => you should give your machine name..

regards

slackie1000
 
Old 08-26-2004, 08:14 AM   #5
hylke
Member
 
Registered: Apr 2004
Location: the Netherlands
Distribution: Ubuntu 7.04
Posts: 329

Original Poster
Rep: Reputation: 30
It still doesn't works:
Quote:
hylke@hylke:~$ su
Password:
root@hylke:/home/hylke# set DISPLAY=hylke:.0.0
root@hylke:/home/hylke# xcdroast
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified


Gtk-WARNING **: cannot open display: :0.0
root@hylke:/home/hylke# hostname
hylke
Hylke
 
Old 08-26-2004, 09:17 AM   #6
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 46
trying again...

i am sorry for the delay... no experience with bash...
i tested now...

Code:
env DISPLAY=$HOSTNAME
regards

slackie1000

ps. you can test your environment variables in "bash" typing "env". You should see the DISPLAY corrected assigned.
 
Old 08-26-2004, 12:49 PM   #7
hylke
Member
 
Registered: Apr 2004
Location: the Netherlands
Distribution: Ubuntu 7.04
Posts: 329

Original Poster
Rep: Reputation: 30
Still doesn't work, but the display mode is (i gues) correctly set.
bash:
Quote:
root@hylke:/home/hylke/Desktop/Teacher Killer# xcdroast
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified


Gtk-WARNING **: cannot open display: :0.0
root@hylke:/home/hylke/Desktop/Teacher Killer# env
CPLUS_INCLUDE_PATH=/usr/lib/qt/include:/usr/lib/qt/include
MANPATH=/usr/local/man:/usr/man:/usr/X11R6/man:/usr/lib/java/man:/usr/lib/qt/doc/man:/usr/share/texmf/man
KDE_MULTIHEAD=false
HOSTNAME=hylke.digitaldevil.com
TERM=xterm
XDM_MANAGED=/var/run/xdmctl/xdmctl-:0,maysd,mayfn,sched,method=classic
WINDOW_MANAGER=metacity
GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/hylke/.gtkrc-2.0:/home/hylke/.kde/share/config/gtkrc
GS_LIB=/home/hylke/.fonts
GTK_RC_FILES=/etc/gtk/gtkrc:/home/hylke/.gtkrc:/home/hylke/.kde/share/config/gtkrc
WINDOWID=33554437
QTDIR=/usr/lib/qt
KDE_FULL_SESSION=true
USER=hylke
LS_COLORS=no=00:fi=00:di=01;34:ln=01;36i=40;33:so=01;35:bd=40;33;01:cd=40;33;01r=40;31;01:ex=01; 32:*.bat=01;32:*.BAT=01;32:*.btm=01;32:*.BTM=01;32:*.cmd=01;32:*.CMD=01;32:*.com=01;32:*.COM=01;32:* .dll=01;32:*.DLL=01;32:*.exe=01;32:*.EXE=01;32:*.arj=01;31:*.bz2=01;31:*.deb=01;31:*.gz=01;31:*.lzh= 01;31:*.rpm=01;31:*.tar=01;31:*.taz=01;31:*.tb2=01;31:*.tbz2=01;31:*.tbz=01;31:*.tgz=01;31:*.tz2=01; 31:*.z=01;31:*.Z=01;31:*.zip=01;31:*.ZIP=01;31:*.zoo=01;31:*.asf=01;35:*.ASF=01;35:*.avi=01;35:*.AVI =01;35:*.bmp=01;35:*.BMP=01;35:*.flac=01;35:*.FLAC=01;35:*.gif=01;35:*.GIF=01;35:*.jpg=01;35:*.JPG=0 1;35:*.jpeg=01;35:*.JPEG=01;35:*.m2a=01;35:*.M2a=01;35:*.m2v=01;35:*.M2V=01;35:*.mov=01;35:*.MOV=01; 35:*.mp3=01;35:*.MP3=01;35:*.mpeg=01;35:*.MPEG=01;35:*.mpg=01;35:*.MPG=01;35:*.ogg=01;35:*.OGG=01;35 :*.ppm=01;35:*.rm=01;35:*.RM=01;35:*.tga=01;35:*.TGA=01;35:*.tif=01;35:*.TIF=01;35:*.wav=01;35:*.WAV =01;35:*.wmv=01;35:*.WMV=01;35:*.xbm=01;35:*.xpm=01;35:
XCURSOR_SIZE=
KDEDIR=/opt/kde
SESSION_MANAGER=local/hylke:/tmp/.ICE-unix/1273
T1LIB_CONFIG=/usr/share/t1lib/t1lib.config
MINICOM=-c on
KONSOLE_DCOP=DCOPRef(konsole-1311,konsole)
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin
DESKTOP_SESSION=kde
LC_COLLATE=C
PWD=/home/hylke/Desktop/Teacher Killer
INPUTRC=/etc/inputrc
KONSOLE_DCOP_SESSION=DCOPRef(konsole-1311,session-2)
JAVA_HOME=/usr/lib/java
LANG=en_US
PS1=\u@\h:\w\$
PS2=>
HOME=/root
SHLVL=3
LS_OPTIONS= --color=auto -F -b -T 0
XCURSOR_THEME=default
LOGNAME=hylke
LESS=-M
LESSOPEN=|lesspipe.sh %s
DISPLAY=:0.0
COLORTERM=
_=/usr/bin/env
Hylke
 
Old 08-26-2004, 03:21 PM   #8
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 46
Quote:
Originally posted by hylke
Still doesn't work, but the display mode is (i gues) correctly set.
bash:


Hylke

i give up... sorry .... no idea how to solve this... hope some of the gurus around can help you...

regards

slackie1000
 
Old 08-27-2004, 12:45 AM   #9
idaho
Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: RedHat, Libranet
Posts: 438

Rep: Reputation: 30
You are getting refused by the server. Try invoking
xhost +
to allow foreign connections to your X server before switching to root user.

After switching to root, you can set your $DISPLAY variable, if necessary, under bash by invoking:
export DISPLAY=hostname:0.0
 
Old 08-27-2004, 11:07 AM   #10
hylke
Member
 
Registered: Apr 2004
Location: the Netherlands
Distribution: Ubuntu 7.04
Posts: 329

Original Poster
Rep: Reputation: 30
Thanx
That xhost + did the trick.
Hylke
 
  


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
Getting programs to start browser Slackware 5 07-29-2005 10:36 AM
Programs in FluxBox take ages to start or don't start at all hubabuba Slackware 1 02-20-2005 10:21 AM
How can root start programs in the name of other users? J_Szucs Linux - Newbie 3 09-12-2003 02:59 PM
c programs and root uses dmaxj Linux - General 2 06-26-2003 12:54 PM
Why i can't start programs!?? FreakboY Linux - Software 5 09-13-2002 03:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:27 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration