VOGONS


First post, by cblupo

User metadata
Rank Newbie
Rank
Newbie

If so, is it typical to interface with DOSBox from a shell? I don't want to come up with some hacky solution that only works sometimes and has obscure limitations

Briefly searched through the wiki and forum, couldn't find anything

Reply 1 of 11, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

Your question is unclear. If you want to be able to start DOSBox in the background and then send commands to it from a terminal, then no, hacky solutions are your only options.

If you want to be able to do particular things when DOSBox starts up, then there many be a couple of different possibilities. What did you have in mind?

Reply 2 of 11, by cblupo

User metadata
Rank Newbie
Rank
Newbie

Thing is, I don't really have a GUI operating system interface I can work with, so I'm trying to run whatever I need through a terminal

Sending commands to DOSBox from a terminal is what I was wishing to do. What would it require to send commands to DOSBox from a terminal? I mean if the limitations are very minor I might want to set it up like that, but if it means I won't be able to mount drives or something I'll need to find another solution. Don't worry if you don't know how to set the shell to send command to DOSBox, I shouldn't really need it that bad

Thanks for the help

Reply 3 of 11, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

What you want to do might very well be feasible – but it's still not clear what you want to do. Can you give an example?

Reply 4 of 11, by Stiletto

User metadata
Rank l33t++
Rank
l33t++

Keep in mind, using DOSBox for commercial business applications is not supported. DOSBox is for games only.

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 5 of 11, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

On OS X you can do this via AppleScript, namely sending keystrokes to the Dosbox Window.
Maybe there is something like that for your OS as well (something sending keystrokes).

And I think someone did this before with a modified Dosbox, maybe that was on IRC #dosbox...

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 6 of 11, by cblupo

User metadata
Rank Newbie
Rank
Newbie

@Stiletto. Right, I'm trying to set this up for an Assembly class at university

Reply 7 of 11, by cblupo

User metadata
Rank Newbie
Rank
Newbie

@Jorpho Well, technically I wan't to do everything this setup instruction doc is telling me to do http://courses.ncsu.edu/csc236/lec/001/DOSBox_Install.pdf solely from a terminal, provided by cloud9 IDE http://i.imgur.com/kqijUQ8.png (a GUI doesn't exist and isn't available)

And I need to do things like>
mount e c:\P23X
unpack
dbset

Reply 9 of 11, by Jorpho

User metadata
Rank l33t++
Rank
l33t++
cblupo wrote:
@Jorpho Well, technically I wan't to do everything this setup instruction doc is telling me to do http://courses.ncsu.edu/csc236 […]
Show full quote

@Jorpho Well, technically I wan't to do everything this setup instruction doc is telling me to do http://courses.ncsu.edu/csc236/lec/001/DOSBox_Install.pdf solely from a terminal, provided by cloud9 IDE http://i.imgur.com/kqijUQ8.png (a GUI doesn't exist and isn't available)

And I need to do things like>
mount e c:\P23X
unpack
dbset

Okay, but all of that looks like things you can run at startup. As I implied earlier, this is entirely feasible.

The quick way is to open your dosbox.conf and add those lines at the end of the file, beneath [autoexec]. Then those lines will run automatically when DOSBox is launched.

If you don't want those lines to run every time you launch DOSBox, then you can make a copy of DOSBox.conf and launch DOSBox with dosbox -conf custom.conf.

If you need to specify particular commands when you're launching DOSBox, the instead you can use multiple instances of the "-c" switch, as in dosbox -c "mount e c:\P23X" -c "unpack" -c "dbset".

There seems to be no need in this case to send commands to DOSBox after it is started.

Reply 10 of 11, by cblupo

User metadata
Rank Newbie
Rank
Newbie

@Jorpho

I ran these commands
$ sudo apt-get install dosbox /*it's installed*/
$ sudo find / -type f -name "dosbox.conf" /*returns nothing*/
$ sudo find / -type f -name "DOSBox.conf" /*returns nothing*/

Where is dosbox.conf?

How do I launch dosbox from the terminal?

Reply 11 of 11, by Jorpho

User metadata
Rank l33t++
Rank
l33t++
cblupo wrote:

Where is dosbox.conf?

I guess I should have looked in the manual. Apparently in Linux it's in ~/.dosbox/dosbox-0.74.conf .

I'm not sure what the limitations of your terminal are, but if you have no GUI at all, then you might have to find some way of stopping DOSBox (or rather SDL) from trying to create a window. "export SDL_VIDEODRIVER=dummy" might do it.

ETA: You'll probably want to include "exit" at the end of your list of commands in order to ensure that DOSBox exits gracefully.