Posts Tagged ‘Linux’

Default from bash to csh in CentOs 4.6

In a simple post, my CentOs 4.6 default shell is BASH when I log in as root. I finally got tired of manually switching to csh with the ‘csh’ command. My goal was to set the default shell of Centos 4.6 to CSH. The solution was simple and I wish I had done it earlier.

  1. Login to CentOs as root
  2. Open file /etc/passwd with the command “vi /etc/passwd” from the terminal
  3. My first line said: root:x:0:0:root:/root:/bin/bash
    Change it to root:x:0:0:root:/root:/bin/csh
  4. Save and close the file.
  5. Restart and your default will now be csh.

Samsung SyncMaster 2233rz, NVIDIA 3D Vision, Linux, and Pymol

I’ve been tasked with getting a3d visualizations working on a linux machine (running Centos 4.6) for Pymol and a variety of other 3d visualization software. CRT monitors capable of 3d are difficult, if not impossible to purchase. In the LCD range, we got the Zalman monitor working, but it was not very clear. So instead, we went with the Samsung SyncMaster 2233rz monitor with the NVIDIA 3D Vision, on Centos 4.6 machine.  It works beautifully!

  1. Start with a Centos 4.6 linux machine.
  2. Power off and install the NVIDIA Quadro FX3700 graphic card.
  3. Hook up the NVIDIA 3D Vision hardware (both USB and 3-pin)
  4. Install the graphic card driver. I used version 195.36.15 from Nvidia.com.
  5. Follow/Mimic the /etc/X11/xorg.conf file.

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 1.0  (buildmeister@builder75)  Fri Mar 12 01:44:55 PST 2010

Section “ServerLayout”
Identifier     “Layout0″
Screen      0  “Screen0″ 0 0
InputDevice    “Keyboard0″ “CoreKeyboard”
InputDevice    “Mouse0″ “CorePointer”
Option         “Xinerama” “0″
EndSection

Section “Files”
FontPath        “unix/:7100″
EndSection

Section “Module”
Load           “dbe”
Load           “extmod”
Load           “type1″
Load           “freetype”
Load           “glx”
EndSection

Section “InputDevice”
# generated from data in “/etc/sysconfig/mouse”
Identifier     “Mouse0″
Driver         “mouse”
Option         “Protocol” “IMPS/2″
Option         “Device” “/dev/input/mice”
Option         “Emulate3Buttons” “no”
Option         “ZAxisMapping” “4 5″
EndSection

Section “InputDevice”
# generated from data in “/etc/sysconfig/keyboard”
Identifier     “Keyboard0″
Driver         “kbd”
Option         “XkbLayout” “us”
Option         “XkbModel” “pc105″
EndSection

Section “Monitor”
# HorizSync source: edid, VertRefresh source: edid
Identifier     “Monitor0″
VendorName     “Unknown”
ModelName      “Samsung SyncMaster”
HorizSync       30.0 – 190.0
VertRefresh     56.0 – 125.0
Option         “DPMS”
EndSection

Section “Device”
Identifier     “Device0″
Driver         “nvidia”
VendorName     “NVIDIA Corporation”
BoardName      “Quadro FX 3700″
EndSection

Section “Screen”
Identifier     “Screen0″
Device         “Device0″
Monitor        “Monitor0″
DefaultDepth    24
Option         “TwinView” “0″
Option         “Stereo” “3″
Option         “AddARGBLXVisuals” “True”
Option         “metamodes” “1680×1050 +0+0; 640×480 +0+0; 1680x1050_120 +0+0″
SubSection     “Display”
Depth       24
EndSubSection
EndSection

What did not Work!

  1. Nvidia Quadro FX1400 instead of the Nvidia Quadro 3700
  2. NuVision emitter and goggles instead of the NVIDIA 3D Vision
  3. Compatability problems with Synergy

More Helpful References!

  1. 195.36.15 XConfig Options, direct from Nvidia
  2. 3D from Linux to Samsung 2233RZ LCD forum post!

Setting up NFS on RHEL

What I’ve recently learned is how to use NFS to share folders between two Red Hat Enterprise Linux 5 machines. They are both on the same network and for simplicity have had firewall disabled (firewall settings were not required in my setup). Below are some tips I used on each of the respective machines in no particular order. Additionally, all steps were performed using the root login.

Machine A (contains file to share)

  1. Make sure NFS service is running. You can do this by typing ps aux | grep nfs in the terminal.
  2. To start the NFS service, type /etc/rc.d/init.d/nfs start or /etc/rc.d/init.d/nfs restart in the terminal.
  3. If you want the NFS service to start automatically at boot up, add /etc/rc.d/init.d/nfs start or /etc/rc.d/init.d/nfs restart to the /etc/rc.d/rc.local file.
  4. Next, we need to specify the share specifics. This involves specifying the folder path, the remote machine (Machine B), and the share permissions. The information goes into /etc/exports. Use the following format: /mnt/shareThisFolder machineBName(ro). After updating the file, make sure to restart the NFS service (#3 above).

Machine B (wants access to remote files)

  1. We need to mount the folder we shared earlier on Machine A. The changes go into /etc/fstab file. We need the remote machine name, remote filepath (should be same as the earlier specified location), local filepath. Use for the following format: machineAName:/mnt/shareThisFolder /mnt/filesFromMachineA nfs rsize=8192, wsize=8192,timeo=14,intr 0 0. After saving the file, type mount -a in the terminal to start the share.

Troubleshooting:

  1. Some issues I kept running into was mount failed XXXXXXXX, reason given by server permission denied. This happened to me because though I had started the NFS service on Machine A, I had failed to specify the folder to share. After adding those details (and restarting the NFS service), I was able to mount from Machine B.
  2. NFS has been working for a few weeks, but has suddenly stopped working. The host computer had been rebooted. The solution is to run the following under the root account in this order:/etc/rc.d/init.d/nfslock restart
    /etc/rc.d/init.d/portmap restart
    /etc/rc.d/init.d/nfs restart

    Make sure none of the operations failed, then try remounting. A more long term solution to this is to insure that nfslock, portmap, and nfs autostart during RHEL bootup. Type /usr/sbin/ntsysv from the terminal and make sure those three are checked!