![]() |
#1 | ||
![]() ![]() ![]() ![]() ![]() Join Date: Sep 2012
Location: ,
Posts: 6
|
![]() I'm fairly pleased with myself for figuring this out, and since I can't find anywhere on the Internet it mentions this, I'm posting it for people.
There is a Linux feature (intended for running scripts in an interpreter) called hashbang or shebang. Basically, if you have a text script that uses '#' to denote comments, in linux you can mark the script executable and put "#! /path/to/script-interpreter" as the first line, and when linux runs it it will use that interpreter. Since DOSBox .conf files use #comments, it works perfectly well with DOSbox. Thus: #!/usr/bin/dosbox -conf (configuration) (end-of-file) Configuration/Caveats Where is dosbox installed? From the command-line, type "whereis dosbox". Permissions: File needs to be marked 'executable'. end-of-line character: *has* to be linefeed (e.g. Unix), *not* carriage-return/linefeed (e.g. MS-DOS/Windows); It will fail silently if it has the latter, but this can be fixed with a unix utility called 'dos2unix'. usage: dos2unix ~/bin/* (This caught me offguard when porting gog.com games in, and I felt really stupid when I figured out why the exact same configuration was fine in one file, but just opened DOSBox in another - <G>.) File Naming: They do not need the .conf extension, and if you intend to open them via double clicking, they can be named anything. However if you want to run them from the command line, they need to be in a location Linux see's in your $PATH (ideally ~/bin/), and you probably want to avoid a name containing spaces: typing moo2 will work, typing "Master of Orion 2" will work but you actually need the quotes, clicking on the file "Master of Orion 2" with no quotes will work fine though. I probably shouldn't be as annoyingly pleased with myself over this that I am . . . but hey, it's really quite nice and easy and loads stuff better than my previous system of manually adding games to gnome menus. Jonnan
__________________
When life hands you Lemons, make Lemonade. When life hands you the Pits, make Nerve Gas! |
||
![]() ![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
A little trick when looking for something on Mobygames... | The Fifth Horseman | Gaming Zone | 2 | 28-04-2012 04:49 PM |
Hat Trick | Romano | Games Discussion | 2 | 05-12-2007 04:21 PM |
Dosbox + Linux + Krynn Games = ? | newbie sarah | Troubleshooting | 4 | 28-09-2006 09:01 PM |
Dosbox In Linux | Sebatianos | Troubleshooting | 1 | 01-04-2006 01:45 AM |
Thread Tools | |
Display Modes | |
|
|
||
  |