KDE can start programs automatically (restore session):
K > System Settings >| Advanced - tab |> Session Manager
There are three options On Login:
Note
"Restore manually saved session" enables a "Save Session" button in the K-menu near "Switch User", "Lock Screen" and "Log Out".
Starting programs when KDE starts
Place program links or scripts that you wish to run on KDE startup into ~/.kde/Autostart.
Note #1
Package: kcontrol-autostart
This package is not installed as default !
After installation Press Alt + F2 and type kcontrol -> KDE Components > Autostart Manager
More of the Control Center:
FAQ: Control Centre vs. System Settings
http://kubuntuforums.net/forums/inde...opic=3091157.0
Note #2
Scripts need to be executable.
Running programs when KDE shuts down:
Place program links or scripts that you wish to run on KDE shutdown into ~/.kde/shutdown.
Note
You need to make shutdown folder.
Example: cleaning Trashcan on exit.
Make folder /home/USER/.kde/shutdown/
Note
USER is your login name.
Create textfile, no_trash.sh, and put there:
This will remove files and info folders. Kubuntu will create those again when you delete files.
Making no_trash.sh executable:
755 means that:
owner: read, write and execute permissions,
group: read and execute permissions,
others: read and execute permissions.
Sometimes "passwordless sudo for the script" is handy (Be careful !):
kubicle told (May 30, 2006, 11:18:55)
In Topic: Need some help with shell scripts.
http://kubuntuforums.net/forums/index.php?topic=5493.0
Links:
Topic: Not to 'autostart'
http://kubuntuforums.net/forums/inde...opic=3086592.0
Topic: Need some help with shell scripts.
http://kubuntuforums.net/forums/index.php?topic=5493.0
Linux permissions help
http://zzee.com/solutions/linux-permissions.shtml
Chmod help
http://zzee.com/solutions/chmod-help.shtml
Sudoers
https://help.ubuntu.com/community/Sudoers
Sudoers Manual
http://www.gratisoft.us/sudo/man/sudoers.html
How to configure Sudo to run programs as a different user
http://newbiedoc.berlios.de/wiki/How...different_user
K > System Settings >| Advanced - tab |> Session Manager
There are three options On Login:
Restore previous session
Will save all applications running on exit and restore them when they next start up.
Restore manually saved session
Allows the session to be saved at any time via "Save Session" in the K-Menu. This means the currently started application will reappear when they next start up.
Start with an empty session
Do not save anything. Will come up with an empty desktop on next start.
Will save all applications running on exit and restore them when they next start up.
Restore manually saved session
Allows the session to be saved at any time via "Save Session" in the K-Menu. This means the currently started application will reappear when they next start up.
Start with an empty session
Do not save anything. Will come up with an empty desktop on next start.
"Restore manually saved session" enables a "Save Session" button in the K-menu near "Switch User", "Lock Screen" and "Log Out".
Starting programs when KDE starts
Place program links or scripts that you wish to run on KDE startup into ~/.kde/Autostart.
Note #1
Package: kcontrol-autostart
autostart module for KDE control center
Autostart is a KDE control center module to configure which applications start up when you login into a KDE session.
Autostart is a KDE control center module to configure which applications start up when you login into a KDE session.
After installation Press Alt + F2 and type kcontrol -> KDE Components > Autostart Manager
More of the Control Center:
FAQ: Control Centre vs. System Settings
http://kubuntuforums.net/forums/inde...opic=3091157.0
Note #2
Scripts need to be executable.
Running programs when KDE shuts down:
Place program links or scripts that you wish to run on KDE shutdown into ~/.kde/shutdown.
Note
You need to make shutdown folder.
Example: cleaning Trashcan on exit.
Make folder /home/USER/.kde/shutdown/
Note
USER is your login name.
Create textfile, no_trash.sh, and put there:
Code:
#!/bin/sh rm -rf /home/USER/.local/share/Trash/files/ rm -rf /home/USER/.local/share/Trash/info/
Making no_trash.sh executable:
Code:
sudo chmod -v 755 /home/USER/.kde/shutdown/no_trash.sh
owner: read, write and execute permissions,
group: read and execute permissions,
others: read and execute permissions.
Sometimes "passwordless sudo for the script" is handy (Be careful !):
kubicle told (May 30, 2006, 11:18:55)
In Topic: Need some help with shell scripts.
http://kubuntuforums.net/forums/index.php?topic=5493.0
Links:
Topic: Not to 'autostart'
http://kubuntuforums.net/forums/inde...opic=3086592.0
Topic: Need some help with shell scripts.
http://kubuntuforums.net/forums/index.php?topic=5493.0
Linux permissions help
http://zzee.com/solutions/linux-permissions.shtml
Chmod help
http://zzee.com/solutions/chmod-help.shtml
Sudoers
https://help.ubuntu.com/community/Sudoers
Sudoers Manual
http://www.gratisoft.us/sudo/man/sudoers.html
How to configure Sudo to run programs as a different user
http://newbiedoc.berlios.de/wiki/How...different_user
Comment