Announcement

Collapse
No announcement yet.

FAQ: How to start programs when KDE starts or stops

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    FAQ: How to start programs when KDE starts or stops

    KDE can start programs automatically (restore session):

    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.
    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
    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.
    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:
    Code:
    #!/bin/sh
    
    rm -rf /home/USER/.local/share/Trash/files/
    rm -rf /home/USER/.local/share/Trash/info/
    This will remove files and info folders. Kubuntu will create those again when you delete files.

    Making no_trash.sh executable:
    Code:
    sudo chmod -v 755 /home/USER/.kde/shutdown/no_trash.sh
    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
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

    #2
    Re: FAQ: How to start programs when KDE starts or stops

    OK, I am new to Kubuntu, but this method seems rather clumsy for a "GUI" OS.

    I am attempting to use Autostart Manager, but it doesn't show in any of the menus or in system settings.

    Comment


      #3
      Re: FAQ: How to start programs when KDE starts or stops

      Have you installed it?

      Package: kcontrol-autostart

      Via Adept Manager.
      Windows no longer obstructs my view.
      Using Kubuntu Linux since March 23, 2007.
      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

      Comment


        #4
        Re: FAQ: How to start programs when KDE starts or stops

        Thanks for this, Rog131!

        Out of interest, what sort of stuff would you put in shutdown?
        Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

        Comment


          #5
          Re: FAQ: How to start programs when KDE starts or stops

          what sort of stuff would you put in shutdown?
          KDE logout/shutdown

          Maybe, small privacy cleaning stuff > Privacy Cleanup 101. But, i think that, there are better ways to do things with the cron and anacron.


          System shutdown

          I have moved the fsck to the shutdown by using AutoFsck > Fsck on Shutdown
          Before you edit, BACKUP !

          Why there are dead links ?
          1. Thread: Please explain how to access old kubuntu forum posts
          2. Thread: Lost Information

          Comment

          Working...
          X