Results 1 to 3 of 3

Thread: want to run a sh-script at login (13.10), but how?

  1. #1
    Join Date
    Oct 2005
    Location
    NRW-D
    Beans
    361
    Distro
    Ubuntu 14.04 Trusty Tahr

    Question want to run a sh-script at login (13.10), but how?

    This is probably a bit of a noob question, but I want to automatically execute the following at every login, using 13.10 with Unity:

    Code:
    #!/bin/sh
    sleep 1 && feh --bg-fill ~/Pictures/background.jpg &
    The website this comes from states I should add it to .xinitrc (in my home directory); that file wasn't there, so I created it (and made it executable), but nothing happens. Am I overlooking something or doing something silly? Are there alternatives to get this done?

    Many thanks in advance!
    Linux #416781 - Ubuntu #9075
    “The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.” ―George Bernard Shaw

  2. #2
    Join Date
    Apr 2005
    Location
    Finland/UK
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: want to run a sh-script at login (13.10), but how?

    Just open "Startup Applications" and add the script there?

    (adding it to ~/.profile probably would work, but it seems pointless to execute that command for CLI logins )

    ...Also keep in mind that the command won't do anything at all unless you have Feh installed, and have made sure NAutilus is not managing your desktop (like it does by default). Otherwise you won't see anything even if the script works.

  3. #3
    Join Date
    Oct 2005
    Location
    NRW-D
    Beans
    361
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: want to run a sh-script at login (13.10), but how?

    Thanks mcduck. feh is installed alright. I've added the script to Startup Applications, but it doesn't seem to work. Running the script manually after login does result in the desired effect (having a Conky pane do the pseude-transparency trick). Can I conclude now that the script is not executed? But that seems odd... Or am I overlooking something else?
    Linux #416781 - Ubuntu #9075
    “The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.” ―George Bernard Shaw

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •