Scripts and relay browser in linux?

Chish

Member
KoLMafia works great for me in Windows, but my Linux-fu is quite weak and I can't seem to get scripts or the relay browser modifications working in Linux.

I put scripts in /scripts and some things like Bale's Universal Recovery Script configuration relay addition in /relay and started up Mafia. clicking the little [re] in the relay browser caused it to spend some time loading a page, but then nothing popped up. When I tried to run a script from the main interface, it couldn't find any! I tried setting the executable bit on them, but that didn't help.

Am I just not doing it right?
 

Grotfang

Developer
I put scripts in /scripts and some things like Bale's Universal Recovery Script configuration relay addition in /relay and started up Mafia. clicking the little [re] in the relay browser caused it to spend some time loading a page, but then nothing popped up. When I tried to run a script from the main interface, it couldn't find any! I tried setting the executable bit on them, but that didn't help.

Scripts don't need to be executable. Are you sure you are putting them in the right folders? Note that you should NOT be creating your own /relay and /scripts folders. If you copied everything across from Windows then those folders are now redundant. Mafia's folders can be found in:

Code:
~/.kolmafia

Note that these may be hidden to your file browser in its default settings. Show hidden files and navigate to your user's home directory or go into the terminal and type:

Code:
cd ~/.kolmafia
 

Chish

Member
when I opened up ./mafia after downloading it, there was no /scripts folder. I am sure I put everything in the right folders.
 

Theraze

Active member
That's not what he said... try what he said and check there. :)

./mafia is not equal to ~/.kolmafia
 

Chish

Member
wait a second.... I'm been running Mafia out of ~/Downloads/mafia.jar this whole time. Is this wrong?
 

Theraze

Active member
I believe that *nix saves its data folders in a location not tied in to your actual jar, unlike in Windows. Some *nix user can correct me if I'm wrong, but I believe that regardless of where you run mafia out of, it will create a folder named .kolmafia in the home location (~/.kolmafia) and put its data, scripts, session logs, and so forth in there.
 

Chish

Member
oh. Thanks for your help, I would not have figured that out! :)

It seems weird that Linux and Windows work differently in this manner.

Also note that the directory it creates is actually ~/.kolmafia.
 
Last edited:

Theraze

Active member
Which is actually what both Grotfang and myself said, since ~ is *nix slang for "whatever folder is the current user's home folder" but... :)

Wikipedia even lists that in its entry for Tilde. Impressive.
 

lostcalpolydude

Developer
Staff member
If you do something like "java -jar KoLmafia.jar -DuseCWDasROOT=true" then you can have mafia save all its files in the same folder as the jar file.
 
Top