03-05-2009, 07:47 AM
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:
Then open it with whatever text editor you prefer (let's say nano):
Add the following line to the bottom and save it:
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:
Now you can just open X11 and type "pcsx2" (without the quotes) and hit enter.
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.