[lug] xv with cron and sc_reen_sa_ver

D. Stimits stimits at comcast.net
Mon Jan 5 13:11:10 MST 2004


Gary Hodges wrote:

> Sorry for the late replies to my xv/screensaver posts.  I think the NOAA
> mail filters were purging my original post and the replies because of
> the word "screensaver" in the subject.   We'll see if this gets through
> with my munging of the subject...
>
> D. Stimits wrote:
> Sean Reifschneider wrote:
>  >> On Tue, Dec 30, 2003 at 04:52:20PM -0700, Gary Hodges wrote:
>  >>
>  >> >space bar the xv window(s) disappear.  I had this problem back with
>  >> >RH7.2 and it was solved by putting the following line in my Perl
> script:
>  >>
>  >>
>  >> I'm wondering if your problem is related to the x authentication. 
>  Just
>  >> setting the display is no longer enough to allow you to access the X
>  >> display.  You have to have a magic cookie to give to the X server to
>  >> prove you're allowed to access the X server.
>  >
>  > I would bet that this is a very strong possibility. The xv stuff is
>  > likely NOT running as the user that is logged in at the X11 session. As
>  > a test, one could do this to allow any local user to display on the
>  > current X11 session:
>  >   xhost +localhost
>  > If that works, then something more permanent could be added.
>
> It sounds like something fundamental has changed with the X display.
> I'll look into the "magic cookie" concept.   :-)
> On Stimits reply...  The xv stuff is running from my cron job, and the
> screensaver is running on my X session so that should be OK, right?  I
> did try your xhost suggestion but it didn't work.  I'll play around some
> more and report back if I get it going.

The cron job, unless it is run as you, with no sudo, would fail. The 
screensaver is probably set up right, but more than likely this is 
because the X11 server was already set up to allow screensavers from the 
server to anyone...not because it is running as you. The xhost mechanism 
is the oldest and simplest of all of the mechanisms, but in much older 
distros it was used with vastly relaxed settings. The difference to 
newer installations is that xhost can be used, but is not the 
recommended mechanism to allow incoming (because it opens too much too 
easily I believe). On the other hand, if xhost was unable to provide 
permissions which would allow this to work, then it is unlikely it is an 
X security failure. This is not conclusive though, as applications might 
be individually set to use another mechanism...I really have no idea 
what other mechanisms to look at, but it is about a 90% chance now that 
authentication is not the problem. [but just in case it is 
authentication plus something else, you may wish to use "xhost 
+localhost" manually before any testing...when it finally works, try 
without xhost]

D. Stimits, stimits AT comcast DOT net




More information about the LUG mailing list