A question about using a bash script to start a game

Associate
Joined
28 Oct 2002
Posts
1,510
Hi

I have installed Hearts of Iron 2 Doomsday/Armageddon with the TRP mod in Ubuntu. None of the shortcuts that it set up (or i try and create) work.

However, if i open a terminal and cd to the game directory and then run the program through wine then it works fine

my knowledge if linux and shell scripts is very limited but i wondered if i could set up a script to run the game. So i set up the following file on my desktop:

trp.sh

which has in it:
#!/bin/bash
cd /home
cd /diss
cd /.wine
cd /drive_c
cd /TRP
cd /Doomsday
wine Hoi2.exe

However this doesn't work either as when i run it nothing happens.

Any idea how i can get this to work?

many thanks

Diss
 
thanks guys - much appreciated

well, your advice worked, sort of but not quite - though this may be a problem with the game

it runs the correct program through wine but i get a critical error in a wine window saying:
--- excel file not found - do you want to continue?

the game still runs fine if i run it from the terminal

any ideas whats going on here?

many thanks

diss
 
terminal info was:
fixme:spoolsv:serv_main (0 (nil))
fixme:ntdll:RtlNtStatusToDosErrorNoTeb no mapping for 8000000a
err:alsa:ALSA_CheckSetVolume Could not find 'PCM Playback Volume' element
fixme:mixer:ALSA_MixerInit No master control found on MPU-401 UART, disabling mixer
fixme:mixer:ALSA_MixerInit No master control found on Brooktree Bt878, disabling mixer
 
hmmm
the script does work if i put it in the Doomsday folder

is this some sort of 'path' problem?
and if so how do i fix?

thanks again

diss
 
i tried the path command but it didn't seem to change anything

diss@linux:~$ echo $PATH
/home/diss/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
diss@linux:~$ path=$path:/home/diss/.wine/drive_c/TRP/Doomsday
diss@linux:~$ echo $PATH
/home/diss/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
diss@linux:~$ path=$path:/home/diss/.wine/drive_c/TRP/Doomsday
diss@linux:~$ export path
diss@linux:~$ echo $PATH
/home/diss/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
diss@linux:~$

what am i doing wrong?

is there a gui to do this?

thanks

diss
 
thanks
will give it a try - sounds like that should work

would still like to know how to edit PATH if anyone can help

thanks

Diss
 
Back
Top Bottom