On 06/14/2010 10:44 PM, Mark Thomas wrote:
> If you want a short cut to running the program create a file called d2g with
> the following contents (changing the second line to reflect where you have
> placed the dxf2gcode program files)
>
> #!/bin/bash
> cd /your/path/to/dxf2gcode
> ./dxf2gcode_b02.py 2>/dev/null&
>
> Copy the file (d2g)  to the /usr/local/bin directory and make it executable
>
> sudo cp d2g /usr/local/bin/
> sudo chmod 775 /usr/local/bin/d2g
>
> Now you can execute the program from anywhere by typing d2g
>
> Cheers,
>
> Mark

Or, in your shell's rc or .profile file, just include 
/your/path/to/dxf2gcode in your $PATH statement, and avoid all that.

ie - in your .profile file in your home directory, there's a statement: 
PATH="$HOME/bin:$PATH"

change that statement to
PATH="$HOME/bin:/your/path/to_the_d2g_file:$PATH   (don't include the 
dxf2gcode filename).

Then, 3 ways to update your current session - log out, then log back in 
(the pain in the arse way), or from the command line, type "source 
~/.profile" or finally, "exec bash."  Any one of those ways will cause 
the shell to re-read your .profile file.  Logging out & logging back in, 
as well as using the "exec bash" techniques will cause the shell to 
re-read all your rc and profile files.

Your syntax will be different inside the rc or profile files if you are 
using a shell other than bash, such as csh or tcsh.

Mark

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to