2010/6/15 Mark Thomas <mtho...@co-japan.com>: > On Tuesday, June 15, 2010 01:49:31 pm Rafael Skodlar wrote: >> On 06/14/2010 07:44 PM, Mark Thomas wrote: >> > On Tuesday, June 15, 2010 04:07:49 am Viesturs Lācis wrote: >> >> Hello! >> >> >> >> I see exe and zip files available for download from the provided link >> >> http://code.google.com/p/dxf2gcode/ >> >> These are files for windows. >> >> >> >> So that is why I wanted to ask - how do You install on Linux? >> >> >> >> with best regards, >> >> >> >> Viesturs >> > >> > 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) >> >> A shorter shortcut would be an alias in .bashrc like this: >> alias d2g='/usr/local/bin/dxf2gcode' >> >> To make that happen one could >> echo "alias d2g='/usr/local/bin/dxf2gcode'" >> .bashrc >> and execute >> . .bashrc >> while in home directory; needed only until the reboot. >> >> Another possibility is a link like this: >> cd /usr/local/bin >> ln -s dxf2gcode d2g >> >> No need for additional script at all. _cd_ in scripts is not needed in >> general; full path does the same thing. It is needed when creating tar >> with certain structure for example. >> >> > #!/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 >> >> Watch for the script to have lines properly terminated with LF instead >> of CRLF as I see it too often causing troubles in Unix. >> >> -- >> Rafael >> > > > This would work if you copied all the .py files of the program to > /usr/local/bin. Since dxf2gcode is a collection of files the cd comes in handy > as it sets the correct directory and actually used quite frequently in script > files for this purpose, and it doesn't add clutter to the bin directory. > > Also, having a small script makes it easy to add to the menu for execution. > > If you edit a script file with the standard linux editors such as gedit or > kate, or for that matter even vi there will be no issue with LF or CRLF. This > usually crops up when copying files created under some form of DOS/Windows > without converting them to Unix format > > Cheers, > > Mark > >
Thank You, guys, for the explanation! Viesturs ------------------------------------------------------------------------------ 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