From owner-freebsd-questions@FreeBSD.ORG Fri Apr 7 01:19:57 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5C55416A403 for ; Fri, 7 Apr 2006 01:19:57 +0000 (UTC) (envelope-from oliver.iberien@charter.net) Received: from mxsf11.cluster1.charter.net (mxsf11.cluster1.charter.net [209.225.28.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id B0E2C43D46 for ; Fri, 7 Apr 2006 01:19:56 +0000 (GMT) (envelope-from oliver.iberien@charter.net) Received: from mxip12a.cluster1.charter.net (mxip12a.cluster1.charter.net [209.225.28.142]) by mxsf11.cluster1.charter.net (8.12.11/8.12.11) with ESMTP id k371JtCH030192 for ; Thu, 6 Apr 2006 21:19:55 -0400 Received: from 24-205-236-185.dhcp.snlo.ca.charter.com (HELO linux.linux) ([24.205.236.185]) by mxip12a.cluster1.charter.net with ESMTP; 06 Apr 2006 21:19:55 -0400 X-IronPort-AV: i="4.04,94,1144036800"; d="scan'208"; a="191104747:sNHT52930460" From: Oliver Iberien To: freebsd-questions@freebsd.org Date: Thu, 6 Apr 2006 18:19:54 -0700 User-Agent: KMail/1.9.1 References: <200604061808.19808.oliver.iberien@charter.net> In-Reply-To: <200604061808.19808.oliver.iberien@charter.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200604061819.54499.oliver.iberien@charter.net> Subject: Re: FIXED Running an X application as root? (getting printer set in openoffice) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Apr 2006 01:19:57 -0000 About 30 seconds after I finally sent this, I found the answer. It's always a matter of phrasing the Google search correctly: $ xhost +local:local non-network local connections being added to access control list $ su Password: bsd# /usr/local/openoffice.org-2.0.2/program/spadmin I18N: Operating system doesn't support locale "en_US" bsd# ... and it worked. xhosts refers to networks not usernames. You run it as a normal user, then switch to su, then execute the command. I found the answer here: http://lists.suse.com/archive/suse-xfree86/2004-Feb/0028.html Sounds like a really insecure thing for a sysadmin to do, though. I'm just the only user of a home machine. Sorry for using up list space, but perhaps this might help someone else down the line. Oliver On Thursday 06 April 2006 18:08, Oliver Iberien wrote: > 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.