Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding an Alias for PCSX2
#1
For anyone who doesn't feel like typing "cd path/to/pcsx2/bin && ./pcsx2" every time you want to run it, I figured out a way to add an alias to make it easier (a bash alias, not the kind you see in Finder). If you don't already have a bash profile in your home directory create one now:

Code:
sudo touch ~/.profile

Then open it with whatever text editor you prefer (let's say nano):

Code:
sudo nano ~/.profile

Add the following line to the bottom and save it:

Code:
alias pcsx2='export TEMPPWD=`pwd` && cd /path/to/pcsx2/bin/ && ./pcsx2 && cd $TEMPPWD'

The first part creates a temporary variable called TEMPPWD and sets it to your current directory. Then it cd's to the pcsx2/bin directory and runs the executable. When you close PCSX2, it cd's back to whatever directory you started in. This is all you need to do if you launch it from Terminal, but it still won't work in xterm, since by default X11 doesn't start a login shell when you open it. You can fix that pretty easily, though:

Code:
defaults write org.x.X11 app_to_run "/usr/X11/bin/xterm -ls"

Now you can just open X11 and type "pcsx2" (without the quotes) and hit enter.
Reply

Sponsored links

#2
hey that could be done for windows too Laugh (in a totally different way {using environment variables} but it can be done Biggrin )
Windows 7 64bit
Intel Pentium Dual-Core E5200 OC to 3.6GHz, Intel GMA x4500, 1GB DDR2

NinjaMight just work on next guideNinja
Reply
#3
Would be better if it called chdir on it's own exe path, or accessed its files relative to that.
Reply




Users browsing this thread: 1 Guest(s)