I have still not been able to figure out how to use cron, any help will be appreciated. Keep in mind that I am a windows user who installed linux for the first time a few weeks ago on an older computer. A quick step by step method would be awesome!
A goood link is THIS : it will show you how to add any program to system startup in Gnome (the default Desktop Environment for Ubuntu).
java -jar KoLmafia.jar
Brennydoogles:
I cannot get launchpad to work, I registered but it keeps kicking me off as an invalid user. What is a .deb?
Can you rename it kolMaifa.deb.txt and post it in the forums? Then I can remove the extension when I get it.
on the command window, how do I set up the command to make mafia run?
In the terminal I use this to run the .jar:
But when I set it up in cron using the gnome-schedule it never pops up, to test I set it up to occur in a few minutes and the time comes and nothing happens.Code:java -jar KoLmafia.jar
/usr/lib/jvm/java-6-openjdk/jre/bin/java -jar /home/mredge73/KoLmafia.jar --CLI < mafia_login.txt >> mafia_log.txt
<insert login profile name to use, also the password if mafia doesn't already have this stored>
<insert bot script, breakfast script or whatever you want to run>
quit
Well
Looks like I am giving up on Linux, I was told it was the easiest most configurable operating system and user friendly OS. That is obviously wrong.
Your method appeared to work but I have no interaction with it.
This would be fine if I was just running a short breakfest script and then shutting down but I am using this to run a complex clan bot. I can not even shut it down. If the script hiccups then I cannot recover. I just wanted mafia to autostart on its own like it does on my windows xp system. It autostarts after rollover and my clan bot script runs until 5 min before rollover and it issues a quit command to mafia and then XP starts it back up after rollover. The script could encounter problems during the day (Blame Jick problems) that need servicing and I like to also go on and manualy do some things while the script is running like browse the message boards. I also need the abilty to turn it off at any time without having to issue the command through chat from another character.
Thanks for your help Spiny, I guess I wasted enough time on this project if it is limited to "headless mode"
It is possible to run gui applications via cronjobs. This can be done by telling cron which display to use.
00 06 * * * env DISPLAY=:0 gui_appname
The env DISPLAY=:0 portion will tell cron to use the current display (desktop) for the program "gui_appname".