-1

Another quick question. I have installed f.lux on Ubuntu 12.04, however the program refuses to work unless I run a command

xflux -l [longitude] -g [latitute] -k [temperature]

So I've created an alias with my settings so that I simply have to type the command startflux in a terminal at login. I want to automate this process so that my alias (or the full command above) will run after login, how would I go about doing so?

I've read bits and pieces about editing the rc.local file, however trying this didn't seem to work? What exactly is the rc.local file and etc/init.d/ and how are they used?

Thanks!

  • 3
    login to what? Gnome? or I guess it's Unity on Ubuntu 12.04 - but are you talking graphical? – mikeserv Mar 21 '14 at 0:50
  • 1
    Another quick question!!! – Tejas Mar 21 '14 at 6:09
2

gnome-session-properties can be used to configure startup applications.

Also, if you want an application to run at system boot, you can add a rule like the following to your crontab (edit crontab with crontab -e):

@reboot /run/this/program/at/boot >/dev/null 2>&1
0

If you are connecting via ssh, you can edit your .bashrc file located in your home directory, and add in it the command you would like to use.

It will then be executed at login.

I'm not sure if it works if you are using GNOME (or KDE etc). I cannot test it right now.

  • ~/.bashrc is not read by login shells (which is what you run when connecting through ssh). While on Debian derivatives, including Ubuntu, ~/.profile (which is read) calls ~/.bashrc by default, you cannot assume this to be the case always. – terdon Mar 31 '14 at 15:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.