Using ElectronAshoori Grouphttp://electron.mit.edu/index.php/usingelectron
Tue, 20 Nov 2018 00:56:39 +0000Joomla! 1.5 - Open Source Content Managementen-gbGetting added to the mailing listhttp://electron.mit.edu/index.php/usingelectron/46-administration/91-getting-added-to-the-mailing-list
http://electron.mit.edu/index.php/usingelectron/46-administration/91-getting-added-to-the-mailing-listThe group mailing list is ashoorigroup@mit.edu. This is a convenient way to email all members of the group without needing to remember every person's email address. You can be added to the mailing list if you have either a Kerberos ID or certificate (https://ca.mit.edu/ca/ to get a certificate if you don't have one).

One of the administrators (which is everyone on the list) will then be able to accept your membership request, at which point you will also become an administrator.

]]>abost@electron.mit.edu.bar (Alexander Bost)AdministrationThu, 23 Aug 2012 17:20:43 +0000Adding yourself to the mailing listhttp://electron.mit.edu/index.php/usingelectron/44-printing/90-adding-yourself-to-the-mailing-list
http://electron.mit.edu/index.php/usingelectron/44-printing/90-adding-yourself-to-the-mailing-listThe Ashoori Group mailing list is ashoorigroup@mit.edu. If you want to email everyone else in the lab and don't feel like trying to remember everyone's name, simply email ashoorigroup@mit.edu. Adding yourself can be done from any computer as long as you have either a Kerberos ID or a certificate. (To get a certificate: https://ca.mit.edu/ca/)

(f) (from ~/src/lab/lab/trunk) run make to compile everything, and make install to put the executables in bin

2. Adding a new driver

(a) Create your new driver in the gpib_lib folder in the lab trunk:

~/src/lab/lab/trunk/gpib_lib/yourdriver.C

~/src/lab/lab/trunk/gpib_lib/yourdriver.h

(b) Edit ~/src/lab/lab/trunk/gpib_lib/Makefile.am

- Add your driver's name (.C) to the end of the libmy_gpib_la_SOURCES list

- your driver header's name (.h) to the end of the include_HEADERS list

(c) Go back one directory to /s/l/l/t and run the usual sequence:

autoreconf -if; linuxgpib_config; make; make install

If you have done this correctly, the make step should produce a file called "yourdriver.lo" in the gpib_lib directory, which links to the actual driver itself "yourdriver.o" which has been created in gpib_lib/.libs

(d) In order to enable your new driver to be used as a new xml entity:

On lines 7, 8, and 9 (starting with passwd, group, and shadow respectively) add the word ldap after compat with a space in between. Save and quit.

Edit /etc/pam.d/common-auth:

sudo vim /etc/pam.d/common-auth

At the bottom, add the following line:

session required pam_mkhomedir.so skel=/etc/skel umask=0022

Restart nscd and nslcd:

sudo service nscd restart

sudo service nslcd restart

Test by typing: id (your electron login name)

--- old ---

This assumes that your user ID (UID) on the local machine and your UID on electron match. Use these instructions to change your UID if need be. (note: if your user ID doesn't exist on the local machine BEFORE setting up LDAP, there is no need to create one. All you need to install LDAP on the local machine is a root account).

Make sure the network turns on at boot.As root: edit /etc/network/interfacesAdd lines to end:

auto eth0iface eth0 inet dhcp

Note: On current versions of Ubuntu, all you need to do is uncomment the "iface" line; they're already there.

Installing ldap auth on Ubuntu

Make sure root has a password (type "sudo passwd root" to do so)

apt-get install libnss-ldap

A somewhat archaic-looking selection prompt should appear. Enter the following:

Server is ldap://192.168.0.1/ (The first prompt will read "ldapi:///". We will be using ldap as opposed to ldapi. The extra "/" is apparently due to the program's assumption that the host server is on the current machine [in our case this is what the line would read if you left out "192.168.0.1"]. If you can change it here, make sure the line reads ldap://192.168.0.1/, otherwise you'll have to change it in the /etc/ldap.conf file as mentioned below. Remember to run sudo service libnss-ldap restart if you do change it.)

distinguished name is dc=electron

ldap version 3

do not make local root database admin

ldap does not require login

all other settings accept default.

Make sure that /etc/ldap.conf reads "uri ldap://192.168.0.1/". The installer seems to like to throw in an extra "/". If you change this file, restart ldap by running: sudo service libnss-ldap restart

]]>odie@electron.mit.edu (Oliver Dial)AdministrationThu, 02 Sep 2010 22:01:05 +0000Setting up NFShttp://electron.mit.edu/index.php/usingelectron/46-administration/77-setting-up-nfs
http://electron.mit.edu/index.php/usingelectron/46-administration/77-setting-up-nfsNFS is probably the most powerful and convenient way to use electron. However, it's also probably the most difficult method to set up initially. If it's already set up, however, it's very easy to use!

If NFS is already set up

On most of our lab machines, NFS is already running. To use it, just start a terminal, and run

ln -s /mnt/electron_home/$USER electron_home

Now, the directory "electron_home" in your home directory will have all the files you have on electron in it.

If NFS is not already set up

NFS needs a way to tell which files are yours, and which belong to other users. Unix users are identified two different ways: by a user name, which is a word like "Oliver", and by a user ID, or UID, which is a number like 1000. It turns out that it's much easier to set up NFS using user numbers than it is using user ID's, so that's what we have done. This means it's critical that you have the same UID on all the machines you intend to use NFS from. To tell if this is already true, run id -u on both electron and the machine you'd like to set up. If you see different answers, you need to fix your UID. If you see the same ID, you're good to go. If not, use these instructions to fix your UID on the local machine.

If this is a computer that will be permanently in lab that different people might use, you should consider setting up LDAP on it, so the account information from electron will automatically be used.

First, become root using su

Install the software you'll need. Under Debian or Ubuntu, type:

apt-get update; apt-get install nfs-common nfs-kernel-server

Next, set up the NFS mount point.

mkdir /mnt/electron_home

Finally, add an entry to the file /etc/fstab to tell Linux to mount the NFS partition.

Note: this is not a simple thing to do. If you're concerned, ask for help. It's much easier just to get the UID and GID to be the same as on electron when creating the new account; with add-user, use the --with-uid and --with-gid settings. This document assumes you're comfortable editing files with a text editor.

Run id on electron and the machine you're working on, and write down your user ID and group ID (the first one) on electron and on the machine you're working on (they're probably the same). We'll refer to your user id as a UID, and your group ID as a GID.

You'll need to be logged in as root on the machine you're going to work on. Hit Alt-F1 or Control-Alt-F1 to get a text console, and log in directly as root. Ideally, you should not be logged in as yourself at all.

Edit /etc/passwd Find the line that starts with your user name; for example, for me, it reads

The "apt-get install gpib-modules-source" command under the Install the packages heading was intended to retrieve the latest gpib modules directly from the central Ubuntu package repository; however, it doesn't seem as though that has been updated for almost two years. We have downloaded the latest gpib modules from whoever keeps that stuff updated. The file location is /var/www/electron/images/gpib.tar.bz2 (which means you can get it directly from electron or download it from http://electron.mit.edu/images/gpib.tar.bz2).

Become root:

apt-get install module-assistant

cd /usr/src; wget http://electron.mit.edu/images/gpib.tar.bz2

m-a a-i gpib

Further clarification needed: gpib.conf file does not seem to exist after these three commands are run. Running gpib_config may be what causes it to appear, however there are still kinks to be worked out with the setup along those lines.

addgroup ${USER} gpib

addgroup ${USER} dialout (is this necessary for gpib?)

The addgroup commands seem to only take effect upon restart. There may be a command that just refreshes/restarts the proper lists, rendering a restart redundant, but at the time of this writing (Aug. 22, 2012) we only noticed a gpib-reliant command such as "simple_vm -g20 -mv" work properly upon machine restart.

Install the packages

apt-get install gpib-modules-source

apt-get install module-assistant

Build the kernel modules

Note: As of Sept. 4, 2010, this does not work because the GPIB packages are out of date. It may start working someday soon. If it doesn't work, follow the instructions under "GPIB Packages are broken" below. (Oct. 13th, 2011. May 3rd, 2012. The m-a failed to build the gpib-modules-source [still!] -BH)

m-a a-i gpib

If the GPIB Packages are broken

You need to replace the source code for the kernel modules with an up-to-date copy. I've done this for linux-gpib version 3.2.15. You can check the current version on the linux-gpib package download page. If this is still the current version, just run

Edit /etc/gpib.conf. If you're using a USB adapter, you'll want to change board_type to ni_usb_b.

As root, run

gpib_config

And everything should work.

As root,

mkdir -p /usr/src/tmp

Download an up-to-date copy of linux-gpib and copy it to /usr/src/tmp. Untar it with

cd /usr/src/tmp

tar -jxf [tar-file-name]

This created the directory 'modules' in /usr/src/tmp with the up-to-date modules. Make a backup copy of the zip file

cp /usr/src/gpib.tar.bz2 /usr/src/gpib_backup.tar.bz2

Go back to /usr/src and untar Ubuntu's copy of the module source with

tar -jxf /usr/src/gpib.tar.bz2

This created the directory 'modules' in the current directory (/usr/src). Copy the new version of the module source into Ubuntu's copy, replacing [version] with the version number of gpib you're using (NOTE: these "linux-gpib-[version]" directories seem not to exist on spin, pfaffian or any computer that I checked - so where are these drivers? -BH):

cd modules/gpib

rm ../../linux-gpib-[version]/drivers/gpib/Makefile

cp -r ../../linux-gpib-[version]/drivers/gpib/* .

Create a new tar file with the updated source

rm /usr/src/gpib.tar.bz2

cd /usr/src/tmp

tar -jcf /usr/src/gpib.tar.bz2 modules

Test; this should now succeed

m-a a-i gpib

Resume the instructions on the previous page, BUT(that's a joke)

ONCE YOU ARE SURE EVERYTHING IS WORKING, UPDATE THIS WEB PAGE WITH THE NEW VERSION OF LINUX-GPIB YOU SET UP, AND COPY YOUR TAR FILE TO /var/www/electron/images ON ELECTRON SO OTHER PEOPLE CAN BENEFIT FROM YOUR HARD WORK