Welcome to Our Community

While Linux.org has been around for a while, we recently changed management and had to purge most of the content (including users). If you signed up before April 23rd, 2017 please sign up again. Thanks!

  1. Note: we recently updated out site software, please report any unseen issues - we do this often to insure your information is secure.
    Dismiss Notice

Creating Automatic Tasks

Discussion in 'Command Line' started by kiran, Apr 25, 2017.

  1. kiran

    kiran New Member

    Joined:
    Apr 25, 2017
    Messages:
    4
    Likes Received:
    0
    I want to create a task that opens some apps automatically when I log in to my PC every time. How can I accomplish this??


     
  2. Rob

    Rob Administrator
    Staff Member

    Joined:
    Oct 27, 2011
    Messages:
    221
    Likes Received:
    639
    Hey there kiran,

    Are you looking to start programs when you log into your GUI? Or run some scripts automatically when you log in via terminal/ssh?

    Welcome to the forum!

    Rob
     
  3. kiran

    kiran New Member

    Joined:
    Apr 25, 2017
    Messages:
    4
    Likes Received:
    0
    I want to the task to be started when I switch on the computer, press the power button, enter the password and log-in to my system
     
  4. Rob

    Rob Administrator
    Staff Member

    Joined:
    Oct 27, 2011
    Messages:
    221
    Likes Received:
    639
    There are ways to set this up.. upon boot by putting something like this in cron:
    Code:
    @reboot /path/to/task
    If you're logging in via ssh and want something to run automatically, you can put a line in your .bash_profile file in your home directory...

    If you're logging in via a GUI like Unity, XFCE, Gnome, etc.. they should each have ways to accomplish this as well.

    I'm thinking you mean when you log into your desktop graphical session.. which window manager are you using? For example, the default w/ Ubuntu is Unity (for the time being)
     
  5. kiran

    kiran New Member

    Joined:
    Apr 25, 2017
    Messages:
    4
    Likes Received:
    0
    I am using gnome
     
  6. Cybercraft

    Cybercraft New Member

    Joined:
    Apr 25, 2017
    Messages:
    11
    Likes Received:
    15
    For gnome, you must install 'gnome-tweak-tools' and, after relaunch, in gnome-tweak-tools, in tab 'Startup application's, add you scripts/applications (cfr: image in french :( because i'm french)

    Capture du 2017-04-27 15-49-23.png
     
    atanere and Rob like this.
  7. kiran

    kiran New Member

    Joined:
    Apr 25, 2017
    Messages:
    4
    Likes Received:
    0
    Thank you, I will have a look
     

Share This Page