You are not logged in.

#1 2012-03-26 17:42:00

zomzilla
Member
Registered: 2011-06-12
Posts: 40

[SOLVED] make an alias a command/program

hi, i set up a simple alias command to run
wine /PATH-to-steam.exe
when i enter 'steam'

is there a way i could make an entry in /usr/bin/ so it can be run by dmenu or similar?

thanks

zom

Last edited by zomzilla (2012-03-26 18:44:03)

Offline

#2 2012-03-26 17:49:28

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] make an alias a command/program

Sure, just create a script instead of the alias

#!/bin/bash
wine /PATH-to-steam.exe

make it executable and name this file 'steam'.

You don't have to put it in /usr/bin/ if dmenu runs all executable files from the $PATH, you can add e.g. ~/bin to the $PATH an put your scripts there.


Edit: $PATH is not the same as PATH in 'PATH-to-steam.exe'.
http://en.wikipedia.org/wiki/PATH_(variable)

Last edited by karol (2012-03-26 17:57:46)

Offline

#3 2012-03-26 17:55:17

quasifilmie
Member
Registered: 2011-10-27
Posts: 296

Re: [SOLVED] make an alias a command/program

I don't know much about this but the entry should be put in /usr/local/bin  (someone correct if i am wrong this is definitely the case on mac os)  and then you can create desktop file in /usr/share/applications.

Offline

#4 2012-03-26 18:00:58

jaco
Member
From: Toulouse, France
Registered: 2011-03-17
Posts: 149

Re: [SOLVED] make an alias a command/program

Put a line
alias steam="/PATH/TO/steam.exe"

in you .bashrc (or .zshrc if you're using zsh)

Don't forget to do a source ~/.bashrc to enable this modification

Offline

#5 2012-03-26 18:08:47

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] make an alias a command/program

jaco wrote:

Put a line
alias steam="/PATH/TO/steam.exe"

in you .bashrc (or .zshrc if you're using zsh)

Don't forget to do a source ~/.bashrc to enable this modification

How dmenu can use this?

Offline

#6 2012-03-26 18:16:11

jaco
Member
From: Toulouse, France
Registered: 2011-03-17
Posts: 149

Re: [SOLVED] make an alias a command/program

karol wrote:

How dmenu can use this?

I've not taken the "dmenu" clause into account smile

Offline

#7 2012-03-26 18:37:11

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: [SOLVED] make an alias a command/program

Like quasifilmie said, I'd find /usr/local/bin the most elegant place for a bash script.

Offline

#8 2012-03-26 18:43:43

zomzilla
Member
Registered: 2011-06-12
Posts: 40

Re: [SOLVED] make an alias a command/program

thanks guys thats great; just wasnt sure about how scripts would work in $PATH

thanks smile

Offline

Board footer

Powered by FluxBB