10 latest updates and drivers and I need to run a game called unreal tournament, but in terminal it requires 2 commands The first one is to mount into the folder:
cd /usr/local/games/ut2004/
and then the second one is to open the actual game:
sudo aoss ./ut2004
In one shortcut i can only fit 1 command but both don't fit in is there any way i can turn these 2 commands into one? Perhaps turni9ng on the desktop shortcut already mounted into the folder? Any help would be really appreciated because im getting kinda sick of using the terminal to run it every time.
cd /usr/local/games/ut2004/ && sudo aoss ./ut2004
Either you enter:
cd /usr/local/games/ut2004/; sudo aoss ./ut2004
, thus with the extra ; in between ...... or you create a small shell script in your home directory:
and call that from your shortcut.
If you want a 'shortcut' you can create a bash function. Add this to your ~/.bashrc file:
Once you save ~/.bashrc run: source ~/.bashrc
(You only have to do that once.)
Now just type this in a terminal:
...and hit enter
Note that cd, && and ; are shell built-in operators and will not work in a .desktop shortcut as the command line is directly executed as-is, so you must call a shell to interpret them.
You could also create an alias in your .bach_aliases file like 'alias unreal='cd /usr/local/games/ut2004/ && sudo aoss ./ut2004'. That way the next time you login you just type unreal and start playing.