![]() Equipping You to Communicate Effectively | support CMN & share a library of 19K+ images, videos, etc Go Pro! |
![]() | ![]() |
| |||||||
![]() |
| | Thread Tools | Search this Thread | Rate Thread | Display Modes |
| ||||
| The first thing I'd try is to launch it from the user's crontab rather than through cron.daily or hourly or whatever. (and it may well be that's what you're doing already) I wrote a little script for automating my audio recording in the same manner the other week. The only other thing I can think of (off the top of my head) is that it might have to be launched from within the GUI environment. What I'd do is add some more diagnostics to the script, logging important variables and such, so you can see where it's breaking. You could also perhaps tee the launch script into a log file, so in theory any errors that get printed to the "console" also get printed to the logfile. I wonder if gnome has a crontab interface widget? |
| ||||
| Gnome has the Scheduled Task menu item under preferences. I've tried using that and it still doesn't give me anything. Go figure though, it works 100% flawlessly on my wifes Debian computer. I've tried using other programs in crontab like firefox and gedit and don't get even as much as a peep out of them either. This isn't an immediate need but I'd like to get it setup for some future use at church. |
| ||||
| Crazy idea: is the script world-executable? It probably shouldn't make a difference (since it's running as that user), but it might be worth a look. Weird. I had no trouble crontabbing the audio recording under Hardy, but then again I'm using arecord from the command line rather than something that runs under gdm, so that may be a difference. |
| ||||
| Here's something at least. I'm trying this script to try and sort it out. The script itself works fine. It does exactly what it is supposed to if ran solo. But ran from cron all it does is echo the "Firefox is Running" phrase so the script itself is running. Same as the impress script just without running the gui. I'm guessing then that there is something in this that cron can't handle so it spits out "Firefox is Running" no matter if it is or isn't. Code: #!/bin/bash FF=`ps aux | grep firefox-bin | wc -l` if [ "" == 1 ]; then echo "Starting Firefox: $(date)" >> /home/tmckellar/Desktop/ff.log && env DISPLAY=:0.0 /usr/bin/firefox-3.0 else echo "Firefox running: $(date)" >> /home/tmckellar/Desktop/ff.log fi |
| ||||
| Likely impress doesn't have access to the display that you want this to appear on. While performing "env DISPLAY=:0.0" or "set DISPLAY=:0.0; export DISPLAY" tells impress which display to use, it won't be able to use it if it cannot provide the xauth authorization key to the X server. You can get around this using two different methods: 1) tell the X server that you authorize non-authorized xwire sessions from a specific machine. You can do this by running the following command from a terminal running on the display you want to run the impress session on (i.e. display :0.0): xauth +127.0.0.1This will allow any program running on the machine identified by the IP address 127.0.0.1 (the local machine loopback) to connect to the X server until the X server restarts (i.e. the machine reboots). You have to do this from a terminal running on that display as the communications between the xauth program and the X server will inherit the authorization key from the terminal environment. 2) pass the xauth authorization key to impress to give to the X server when it starts up the xwire connection to the X server. While this is a whole lot more secure (i.e. it keeps other programs (such as rogue keylogger) running on your machine from accessing the screen/keyboard without having the authorization key) it requires a whole lot more work. If you want to use this approach, I can dig around to get the commands... But it is a bunch more work. Hope this helps... |
| ||||
| I think passing the xauth command for just Openoffice.org will work. If you do xauth +127.0.0.1, can you undo it? I might try that once I know for sure i can undo it or you are able to dig up the command to do it just for Openoffice.org. I think that may eventually do the trick. I was playing around with cron and vlc today though and I got that to work no problem. We have some old computers at church I might throw Ubuntu server or Debian on to stream the service around the building. |
| ||||
| To remove host 127.0.0.1 from the X server's authorized clients list, you run the command: xauth -127.0.0.1Of course, this needs to be done from a session that is authorized (i.e. a terminal window on the display) and after it is run any application you run after this command that isn't authorized (i.e. isn't from a terminal on the display -- such as your cron) will not be able to access that X display. I'm starting to dig up the info for the other approach... |