2

Hi i am not good at terminal shortcuts or anything like that but if someone can give me instructions to make these to commands to a shortcut that will be awesome

cd "/home/owner/.wine/dosdevices/c:/Program Files/Riot Games/League of Legends/RADS/system"

and

WINEDEBUG=+ntdll wine "rads_user_kernel.exe" run lol_launcher $(ls ../projects/lol_launcher/releases/) LoLLauncher.exe
3
  • 1
    I think that your first command should be cd "/home/owner/.wine/dosdevices/c:/Program\ Files/Riot\ Games/League\ of\ Legends/RADS/system" instead.
    – Lucio
    Apr 2, 2013 at 1:25
  • 2
    Not true, this will work perfectly well as long as the path is quoted as shown in the question. cd foo\ bar and cd "foo bar" are both correct and will work.
    – terdon
    Apr 2, 2013 at 1:30
  • 1
    @Lucio You don't escape spaces when you have something quoted.
    – japzone
    Apr 2, 2013 at 1:31

2 Answers 2

4

If you want to make it a permanent command that works no matter what user (root or your own account) you're using, then this is the simplest. Open a text editor and make a new document. Save it to your home folder as the name of your command (example: mycommand). Then in the document enter the following

#!/bin/bash
cd "/home/owner/.wine/dosdevices/c:/Program Files/Riot Games/League of Legends/RADS/system"
WINEDEBUG=+ntdll wine "rads_user_kernel.exe" run lol_launcher $(ls ../projects/lol_launcher/releases/) LoLLauncher.exe

Save it. Now open Terminal and do the following:

chmod +x mycommand
sudo cp ~/mycommand /usr/bin/mycommand

Now just restart the Terminal or enter the command bash. You should now be able to run your custom script at anytime by using it's name (example: mycommand)

2
  • I think that this commands won't work. Read my comment below.
    – Lucio
    Apr 2, 2013 at 1:26
  • 1
    @Lucio You don't need to escape spaces if you have the address enclosed in quotes.
    – japzone
    Apr 2, 2013 at 1:31
3

Not sure what you mean by shortcuts. I think you mean bash aliases. If so, add these lines to your $HOME/.bashrc:

alias league='cd "/home/owner/.wine/dosdevices/c:/Program Files/Riot Games/League of Legends/RADS/system"'

alias lol='WINEDEBUG=+ntdll wine "rads_user_kernel.exe" run lol_launcher $(ls ../projects/lol_launcher/releases/) LoLLauncher.exe'

You can now run these ciommands by opening a terminal and typing league or lol. You can change the names to whatever you want, the general format of bash aliases is

alias <alias name>='<command to run>'
5
  • I think that this commands won't work. Read my comment below.
    – Lucio
    Apr 2, 2013 at 1:26
  • @Lucio it will work because the path is "quoted". Both cd foo\ bar and cd "foo bar" work perfectly well.
    – terdon
    Apr 2, 2013 at 1:28
  • @terdon Also if you run alias <alias name>='<command to run>' in a Terminal session you'll get a Temporary Alias that will be disposed when you close that Terminal. Useful if you're just doing an extra long command a lot during a single session.
    – japzone
    Apr 2, 2013 at 1:34
  • I open too many terminals at the same time for that. Probably why my .bahsrc has 54 aliases :).
    – terdon
    Apr 2, 2013 at 1:37
  • @terdon The more aliases you have the slower your commands will be executed because it has to check back each time to check through all the aliases. Just an FYI. Another problem with Aliases is that they are User Dependent, meaning they only apply to one user.
    – japzone
    Apr 2, 2013 at 1:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .