00001 # Ubuntu Linux {#ubuntu}
00002
00003
00004 ##Tested versions
00005
00006 See the \link installation \endlink page for supported versions.
00007
00008
00009 ##Installation
00010 ###Create a temporary variable for Ubuntu version
00011
00012 uver=$(lsb_release -r | cut -f 2); echo $uver
00013 14.04
00014
00015 ###Install Galil's public certificate
00016
00017 $ wget http://www.galil.com/sw/pub/ubuntu/$uver/GALIL-PUB-KEY
00018 $ sudo apt-key add GALIL-PUB-KEY
00019
00020 ###Get Galil's apt sources list
00021
00022 $sudo wget http:
00023 $sudo apt-get update
00024
00025 ###Install Package
00026
00027 $sudo apt-get install gclib
00028
00029 ###Uninstall Package
00030
00031 To uninstall gclib.
00032
00033 $sudo apt-get remove gclib
00034
00035 ##Installed files
00036 * The gclib shared object files
00037 * /usr/lib/libgclibo.so
00038 * /usr/lib/libgclib.so
00039 * The gclib header files
00040 * /usr/include/gclib_errors.h
00041 * /usr/include/gclibo.h
00042 * /usr/include/gclib.h
00043 * /usr/include/gclib_record.h
00044 * gclib documentation tarball
00045 * /usr/share/doc/gclib/gclib_129_doc.tar.gz
00046 * Example source tarball
00047 * /usr/share/doc/gclib/src/gclib_129_examples.tar.gz
00048 * Source files to modify/rebuild libgclibo.so
00049 * /usr/share/doc/gclib/src/gclibo_129_src.tar.gz
00050 * GalilTools Communication Library (gcl) wrapper
00051 * /usr/share/doc/gclib/src/gclib_129_gcl.tar.gz
00052 * PCI driver files
00053 * /usr/share/doc/gclib/src/gclib_129_pci.tar.gz
00054
00055
00056 ##Serial Ports and USB
00057 If access to the serial ports or USB (e.g. DMC-4103) is desired through gclib, the following will provide steps to join the correct access group. If using USB, be sure the controller is powered and the usb is plugged in before beginning.
00058
00059 ###Determine group with access
00060
00061 $ ls -l /dev/ttyUSB* /dev/ttyS*
00062 crw-rw----. 1 root dialout 4, 64 Mar 3 16:39 /dev/ttyS0
00063 crw-rw----. 1 root dialout 4, 65 Mar 3 16:39 /dev/ttyS1
00064 crw-rw----. 1 root dialout 4, 66 Mar 3 16:39 /dev/ttyS2
00065 crw-rw----. 1 root dialout 4, 67 Mar 3 16:39 /dev/ttyS3
00066 crw-rw----. 1 root dialout 188, 0 Mar 6 11:08 /dev/ttyUSB0
00067
00068 In the above listing, **dialout** is the group that needs to be joined. **uucp** is another common group that may be listed.
00069
00070 ###Add the desired *username* to the group.
00071
00072 $ sudo gpasswd -a username dialout
00073 [sudo] password for username:
00074 Adding user username to group dialout
00075
00076 Log out and back in for change to take effect.
00077
00078 $ groups
00079 username wheel dialout
00080
00081 gclib can now connect to serial and usb devices from user *username*.
00082
00083 ##PCI Controllers
00084 If using a Galil PCI controller, the PCI driver must be installed.
00085
00086 ###Extract source and build driver
00087
00088 $ tar -xf /usr/share/doc/gclib/src/gclib_202_pci.tar.gz
00089 $ make
00090
00091 ###Copy module and add to kernel
00092
00093 $ sudo cp galilpci.ko /lib/modules/$(uname -r)
00094 $ sudo depmod
00095 $ sudo modprobe galilpci
00096
00097 ###Add galil group for access to PCI
00098
00099 $ sudo groupadd -f -K GID_MIN=100 -K GID_MAX=499 galil
00100 $ sudo cp 90-galilpci.rules /etc/udev/rules.d/
00101 $ sudo udevadm control --reload-rules
00102 $ sudo udevadm trigger
00103 $ sudo usermod -a -G galil username #exchange "username" with actual user's name
00104
00105 Logout and back in. The PCI hardware is now available for access.
00106
00107 $ ls -l /dev/galil*
00108 crw-rw---- 1 root galil 10, 56 Jun 9 11:07 /dev/galilpci0
00109 $ echo -e "\x12\x16\r" > /dev/galilpci0
00110 $ cat /dev/galilpci0
00111 DMC1846 Rev 1.1a
00112 :
00113
00114 ##Documentation
00115 The documentation is left as a tarball to minimize disk usage. The latest release version of the user manual is available at the following link.
00116 * http://www.galil.com/sw/pub/all/doc/gclib/html/
00117
00118 ###Offline html
00119 The following allows viewing of the html docs from the installation.
00120
00121 $ tar -xzf /usr/share/doc/gclib/gclib_132_doc.tar.gz html
00122 $ firefox html/index.html
00123
00124 ###Offline pdf
00125 There may be a pdf shipped in the package. The following allows viewing of the pdf docs from the installation.
00126
00127 $ tar -xzf /usr/share/doc/gclib/gclib_132_doc.tar.gz gclib_132.pdf
00128 $ evince gclib_132.pdf