Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Apr 2006 18:08:19 -0700
From:      Oliver Iberien <oliver.iberien@charter.net>
To:        freebsd-questions@freebsd.org
Subject:   Running an X application as root? (getting printer set in openoffice)
Message-ID:  <200604061808.19808.oliver.iberien@charter.net>

next in thread | raw e-mail | index | archive | help
In order to set the printer setting for openoffice.org-2.0.2 I have to, as far 
as I know, run the program /usr/local/openoffice.org-2.0.2/program/spadmin as 
root. (The default settings are for lp and I am using cups.) It's a series of 
dialogs in windows and so I've tried to set the display. I get a "no protocol 
specified" error.

bsd# setenv DISPLAY ":0.0"
bsd# /usr/local/openoffice.org-2.0.2/program/spadmin
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

I18N: Operating system doesn't support locale "en_US"
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

/usr/local/openoffice.org-2.0.2/program/spadmin.bin X11 error: Can't open 
display: :0.0
   Set DISPLAY environment variable, use -display option
   or check permissions of your X-Server
   (See "man X" resp. "man xhost" for details)

I looked at the xhost page and tried:

bsd# xhost +root
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

The same thing happened with xhost +. What am I missing?

Oliver

PS Using sudo does not work as for some reason when I try to run spadmin with 
sudo, spadmin can't find libraries it needs that are in its own folder. 
su-ing gets the same result as running as root, and deleting 
~/.openoffice.org-2.0.2 and running spadmin as a normal user changes 
nothing -- apparently nothing printer-related is in there. 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604061808.19808.oliver.iberien>