I used xdpyinfo | less to check what to use in DIPSPLAY=., the less being needed because an awesome lot of information is churned out.įinally, I have described what I discovered, and do not claim that it is definitive or complete, or even entirely correct. Note that this means that a "run once" preview in Gnome Schedule configuration may work, as it confusingly did for me, (I think it may use at instead of cron) but it needs to be tested as a recurrent task to be sure.Īt first I added DISPLAY=:0.0 to the last line of the script in the question, but found later that wasn't necessary It now works and I get the desired information window pop up. abiword-plugins, GNOME word processor (plugins) abook, text-based ncurses address book application accerciser, GNOME interactive accessibility explorer. as the last line not the one commented out above. Build a simple Python script on the Raspberry Pi and use Gnome Schedule to get the script to run when the Pi reboots.Part of the tutorial which lives here: h. Note that the the script called from fred.sh must be referenced via the home directory, i.e. I had named the test task script in my question trial_bak.sh. Finally, you can create a recurrent task to launch the script.Īccordingly I created the script file fred.sh with the contents: #!/bin/shĪnd used the script fred.sh as the scheduled task. In the meantime, you can manually createĪ script that first defines DISPLAY variable and then calls the graphicalĪpplication. Gnome Schedule does not support yet setting environment variables for Make the definition at the beginning of theĩ.3. Setting DISPLAY variable for tasks that will launch recurrently When you are creating or modifying a task, you can define the DISPLAY In the help document for Gnome Schedule it says: 9.2. Setting DISPLAY variable for tasks that will launch once I have found the answer, after two days of struggling with arcane syntax and obscure references. Zenity -info -text='Backup complete' -title="Backup Test" Rm -r /home/Harry/testrsync/backups/$DAY4 #Delete the backup from 4 days ago, if it exists # for my tests I am going to use a three day cycle LNK="/home/Harry/testrsync/backups/$DAY1" TRG="/home/Harry/testrsync/backups/$DAY0" The updates work perfectly, so my question is: why do I get no output from the zenity command at the end? #!/bin/bash I am testing this on a small scale before I commit all my precious to it, and To schedule the backups I want to use gnome-schedule, and to output reassuring messages to my computer screen with zenity. I want to keep this backup up to date, using rsync, with the system described in. To prepare for this I have made a full backup on an external drive. Gnome Schedule is not overloaded with features, but it makes it supremely easy to add and configure scheduled tasks.I am using Fedora Linux 12, and intend to update to an up-to-date version soon. It is always running in the background to run scheduled commands at the appropriate times. You can also use this to run the task at any time. Unix has a facility for running scheduled tasks called cron. Blueberry depended on gnome-bluetooth, which was developed exclusively. To check whether the added task works as it's supposed to, use the Run selected task button. Just like Blueberry, Blueman is desktop-agnostic and integrates well in all environments. This way, you don't have to create every single task from scratch. If you plan to add multiple jobs with similar settings, you can save the created task as a template. Use then the options available in the Time & Date section to specify the desired schedule. By default, the utility displays the output of the command or the script in a separate terminal window, but you can disable this feature by selecting the Suppress output option. To create a scheduled task, select the Recurrent task option, give the new task a descriptive name, and specify the command or script you want the task to perform. Most often, you would want to create a recurrent task that runs at predefined intervals. Select the type of task you want to create. To create a new task, press the New button in the main toolbar. The task can run once a day or once an hour according to the settings. To launch Gnome Schedule, run the gnome-schedule command in the terminal. Scheduled backup: Define the desired backup schedule to daily or only on specific days.
0 Comments
Leave a Reply. |