Starting/stopping things when the system is starting or shutting down.
> Upstart
Few sublinks:
> Getting Started
> Upstart Intro, Cookbook and Best Practices
> FAQ
> Upstart Development Blog
"These are not really standards"
(but they are good suggestions)
> freedesktop.org
> Specifications
> Desktop Entry Specification
> Autostart Specification
KDE
> Autostart
> Chapter 4. Autostarting Applications and Run-Once Applications
> Aaron Seigo: autostarting apps in kde4
Autostart places:
"Hooking"
User application could be started from the existing scrip. One script is the > /etc/kde4/kdm/Xsetup:
Earlier > Topic: Capturing the images of the ksplash & kdm & ksplash again. It is using the Xsetup hook to capture the boot screens.
Periodically running things.
Cron
> CronHowto
With the KDE gui:
> Task Scheduler
System Task Scheduler:
Earlier > Topic: KDE Control Module
Anacron
> Anacron wiki
man anacron:
Using anacron:
1) Simply put executable script file in the /etc/cron.daily, /etc/cron.weekly or /etc/cron.monthly.
2) Touch the script file:
(cron.daily if it is a daily job)
Testing anacron:
man anacron:
Anacron messages in the log:
Anacron keeps timestamps in the /var/spool/anacron/. If you remove cron.daily, cron.weekly or cron.monthly files from there, anacron will execute daily, weekly or monthly scripts at the next startup.
> Upstart
Upstart is an event-based replacement for the /sbin/init daemon which handles starting of tasks and services during boot, stopping them during shutdown and supervising them while the system is running...
> Getting Started
> Upstart Intro, Cookbook and Best Practices
> FAQ
> Upstart Development Blog
"These are not really standards"
(but they are good suggestions)
> freedesktop.org
> Specifications
> Desktop Entry Specification
> Autostart Specification
KDE
> Autostart
> Chapter 4. Autostarting Applications and Run-Once Applications
> Aaron Seigo: autostarting apps in kde4
Autostart places:
- /etc/xdg/autostart/
- /usr/share/autostart/
- ~/.config/autostart/
- ~/.kde/Autostart/
"Hooking"
User application could be started from the existing scrip. One script is the > /etc/kde4/kdm/Xsetup:
Both KDM and GDM have startup scripts that are executed when X is initiated. For GDM, these are in /etc/gdm/ , while for KDM this is done at /etc/kde4/kdm/Xsetup. In either case, you can paste in an xrandr command line string into one of these scripts...
Periodically running things.
Cron
> CronHowto
With the KDE gui:
> Task Scheduler
System Task Scheduler:
Code:
KRunner: Alt + F2 and kdesudo kcmshell4 kcm_cron
Anacron
> Anacron wiki
man anacron:
NAME
anacron - runs commands periodically
SYNOPSIS
anacron [-s] [-f] [-n] [-d] [-q] [-t anacrontab] [-S spooldir] [job] ...
anacron [-S spooldir] -u [-t anacrontab] [job] ...
anacron [-V|-h]
anacron -T [-t anacrontab]
DESCRIPTION
Anacron can be used to execute commands periodically, with a frequency specified in days. Unlike
cron( 8 ), it does not assume that the machine is running continuously. Hence, it can be used on
machines that aren't running 24 hours a day, to control daily, weekly, and monthly jobs that are
usually controlled by cron.
When executed, Anacron reads a list of jobs from a configuration file, normally /etc/anacrontab
(see anacrontab(5)). This file contains the list of jobs that Anacron controls. Each job entry
specifies a period in days, a delay in minutes, a unique job identifier, and a shell command...
anacron - runs commands periodically
SYNOPSIS
anacron [-s] [-f] [-n] [-d] [-q] [-t anacrontab] [-S spooldir] [job] ...
anacron [-S spooldir] -u [-t anacrontab] [job] ...
anacron [-V|-h]
anacron -T [-t anacrontab]
DESCRIPTION
Anacron can be used to execute commands periodically, with a frequency specified in days. Unlike
cron( 8 ), it does not assume that the machine is running continuously. Hence, it can be used on
machines that aren't running 24 hours a day, to control daily, weekly, and monthly jobs that are
usually controlled by cron.
When executed, Anacron reads a list of jobs from a configuration file, normally /etc/anacrontab
(see anacrontab(5)). This file contains the list of jobs that Anacron controls. Each job entry
specifies a period in days, a delay in minutes, a unique job identifier, and a shell command...
Using anacron:
1) Simply put executable script file in the /etc/cron.daily, /etc/cron.weekly or /etc/cron.monthly.
2) Touch the script file:
Code:
sudo touch /etc/cron.daily/scriptfile
Testing anacron:
Code:
sudo anacron -f -d
-f Force execution of the jobs, ignoring the timestamps.
-d Don’t fork to the background. In this mode, Anacron will output
informational messages to standard error, as well as to syslog.
The output of jobs is mailed as usual.
-d Don’t fork to the background. In this mode, Anacron will output
informational messages to standard error, as well as to syslog.
The output of jobs is mailed as usual.
Code:
grep anacron /var/log/syslog
Comment