LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Need to run a program after login on Ubuntu desktop 7.04 (https://www.linuxquestions.org/questions/ubuntu-63/need-to-run-a-program-after-login-on-ubuntu-desktop-7-04-a-569060/)

RVickers 07-13-2007 10:11 AM

Need to run a program after login on Ubuntu desktop 7.04
 
I would like to be able to run a program (Vmware's VMPlayer) automatically upon login. Is there anyway to do this?

Also is there a way to setup a command to run at a certain time on a certain date?

such as execute program.exe on aug 1, 2007 6pm

Thanks in advance.

scompa 07-13-2007 12:21 PM

Go to System - Sessions and there u can add a startup program.

felixc 07-13-2007 08:16 PM

Absolutely. As scompa said, the System menu will contain Preferences, and in there you will find Sessions. That window will allow you to set up programs to run every time you start a session.

As for running programs at a specific time, there is an excellent utility called "cron" that is always included by default that lets you make things as intricate as you'd like (you can, for example, make it run every 10 minutes except on the hour every second day of the third week of every fourth month, if you'd like).

Setting up cron is done by running "crontab -e" (this will edit your personal crontab file). What to put in that file is up to you, and the syntax to use is very well documented on the web. As an example, if you want to run "custom.sh" every hour, on the hour, without producing any output, you'd enter this:

0 * * * * custom.sh > /dev/null

Lsatenstein 07-16-2007 08:39 PM

If you use gnome then go to System>>preferences>>sessions and add your session there.


All times are GMT -5. The time now is 08:26 PM.