German Guillot wrote:

On Wed, 04 Aug 2004 20:22:44 -0500, Mikkel L. Ellertson
<[EMAIL PROTECTED]> wrote:


Bill Shirley wrote:



Try putting in the script:

DISPLAY=:0.0

at the top after #!/bin/sh

HTH, Bill



This only works if you are running the X server. If another user is
running X, you will not be able to connect to the X server, unless you
turn off security. It also fails if you are not running an X server.
Also, if you are running more then one X server, the DISPLAY setting may
be different for "your" X server.



The thing is, the X server is running, but the owner is root. Should that be so? I have the machine set to boot to run level 5, and then I log in from there. If I booted to run level 3, logged in, and _then_ started X, would I own the server process? I wonder if it would work if I made the cron entry in root's crontab, and put the script in cron's path. I'll try that now, just to see, though I'm not too sure I want root to run wget and galeon regularly. I don't know nuttin', but it somehow seems like a risky practice to me.

On the other hand, this seems like a limitation that should have a
workaround without compromising security. If I can run the script
while I'm logged in to an x session, but not from cron, it means cron
is using a different session, all it's own. Isn't there a way to
instruct cron that a command must be run from the active session of
the user whose crontab it is? That sounds reasonable, no?

More to investigate. What fun!

Germán.



The display manager will be running as root. But when a suer logs in, it turns ownership over th the user. If you use run level 3, then the user owns the X server from the start. You can also do things like have more then one X server running at a time, each owned by a different user. Access to each X server is controled by xauth. There is an XAUTHORITY shell varable that points to the file containing the key. It is possable to grant a program run by a different user access, but it is not simple. Run "man xauth" and you will get an idea...

On the other hand, maybe you could use something like lynx, or wget to do what you are looking for?

Mikkel

--

   Do not meddle in the affairs of dragons,
for you are crunchy and taste good with ketchup.


____________________________________________________
Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com
____________________________________________________

Reply via email to