..:: PCSX2 Forums ::..
Register | Help | Log In |
Register PCSX2 Site Forums Member List Donate View Today's Posts Search

Current time: 03-18-2010, 09:27 AM Hello There, Guest! (Login — Register)

..:: PCSX2 Forums ::.. / PCSX2 Mac / News-General Discussion / Adding an Alias for PCSX2

1 user browsing this thread: (0 members, and 1 guest).

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Adding an Alias for PCSX2
Author Message
CaptnEvilStomper Offline
Newbie

Posts: 5
Joined: Mar 2009
Location:
Post: #1
Adding an Alias for PCSX2
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.
03-05-2009 07:47 AM
Find all posts by this user Quote this message in a reply
LuisR14 Offline
Sora's Neighbor :P
****

Posts: 2.330
Joined: Dec 2008
Location: USA
Post: #2
RE: Adding an Alias for PCSX2
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
(This post was last modified: 03-06-2009 09:17 AM by LuisR14. Edit Reason: )
03-06-2009 09:15 AM
Find all posts by this user Quote this message in a reply
Gabest Offline
Plugin Author
*****

Posts: 224
Joined: Sep 2005
Location:
Post: #3
RE: Adding an Alias for PCSX2
Would be better if it called chdir on it's own exe path, or accessed its files relative to that.

DirectX End-User Runtime Web Installer
Donate via PayPal!
(This post was last modified: 03-06-2009 12:07 PM by Gabest. Edit Reason: )
03-06-2009 12:06 PM
Find all posts by this user Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:


Current time: 03-18-2010, 09:27 AM

Contact Us | PCSX2 | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication

Powered By MyBB, © 2002-2010 MyBB Group.
Theme created by IncadudeF and modified by bositman