msgbartop
A chronological documentation test project, nothing serious, really!
msgbarbottom

10 Aug 2007 Configure lm_sensors in Gentoo

Use the script sensors-configure to configure the lm_sensors program.
It’s a part of the sys-apps/lm_sensors suite.

Tags: ,

Posted by

10 Aug 2007 Start/Stop script for a prosess run as another user

#!/bin/sh

# rc.flexlm - Init.d start/stop script for the FlexLM License Manager

# Variables:
LM_DIR="/usr/local/matlab71/etc"
LM_BIN="lmgrd"
PROG_BIN="$LM_DIR/glnx86/$LM_BIN"

LICENSE_FILE="$LM_DIR/license.dat"

RUN_AS=flexlm
LOG_FILE="/var/log/flexlm.log"

PROG_ARGS="-c $LICENSE_FILE -l $LOG_FILE"

# Sleep time for restart.
SLEEP=1

start()
{
  echo -n "Starting FlexLM License Manager ($LM_BIN): "
  # already running?
  PID=$(pidof -s $PROG_BIN)
  if [ -z $PID ]; then
    # Initialize log file (only owner gets rw permission).
    touch $LOG_FILE
    chmod 600 $LOG_FILE
    chown $RUN_AS $LOG_FILE

    # Start program.
    su $RUN_AS -c "$PROG_BIN $PROG_ARGS"
    RETVAL=$?
    if [ "$RETVAL" = "0" ]; then
      echo "OK."
      # Create lock file:
      echo "$PID" >/var/run/flexlm.pid
    else
      echo "FAILED!"
    fi
  else
    echo "already running (PID $PID)"
    RETVAL=0
  fi

  return $RETVAL
}

stop()
{
  echo -n "Stopping FlexLM License Manager ($LM_BIN): "
  # running?
  PID=$(pidof -s $PROG_BIN)
  if [ -z $PID ]; then
    echo "not running!"
    RETVAL=0
  else
    kill $PID
    RETVAL=$?
    # Remove lock file.
    if [ "$RETVAL" = "0" ]; then
      echo "OK."
      # Remove lock file:
      rm -f /var/run/flexlm.pid
    else
      echo "FAILED!"
    fi
  fi

  return $RETVAL
}

Tags:

Posted by

06 Aug 2007 Nikon and capture image function from remote PC

I just figured out another nifty feature! The D70 has two USB connection modes, “mass storage” where the camera pretends to be an external hard drive, and PTP, which is an industry standard camera-computer USB protocol. Using PTP, it does not seem possible to download the camera contents with gphoto2, as I had with my A80, but it does support the –capture-image function, which causes the trigger release to be released!
(more…)

Tags: , , ,

Posted by

05 Aug 2007 dcraw examples

dcraw is a linux/Windows command line tool. It can convert RAW-files and that does also include Nikons NEF-files.

Raw photo decoder "dcraw" v8.73
by Dave Coffin, dcoffin a cybercom o net

Usage:  dcraw [OPTION]... [FILE]...

-v        Print verbose messages
-c        Write image data to standard output
-e        Extract embedded thumbnail image
-i        Identify files without decoding them
-i -v     Identify files and show metadata
-z        Change file dates to camera timestamp
-w        Use camera white balance, if possible
-a        Average the whole image for white balance
-A  Average a grey box for white balance
-r  Set custom white balance
-C   Correct chromatic aberration
-b   Adjust brightness (default = 1.0)
-n   Set threshold for wavelet denoising
-k   Set black point
-K  Subtract dark frame (16-bit raw PGM)
-H [0-9]  Highlight mode (0=clip, 1=unclip, 2=blend, 3+=rebuild)
-t [0-7]  Flip image (0=none, 3=180, 5=90CCW, 6=90CW)
-o [0-5]  Output colorspace (raw,sRGB,Adobe,Wide,ProPhoto,XYZ)
-o  Apply output ICC profile from file
-p  Apply camera ICC profile from file or "embed"
-d        Document mode (no color, no interpolation)
-D        Document mode without scaling (totally raw)
-j        Don't stretch or rotate raw pixels
-q [0-3]  Set the interpolation quality
-h        Half-size color image (twice as fast as "-q 0")
-f        Interpolate RGGB as four colors
-s [0-99] Select a different raw image from the same file
-4        Write 16-bit linear instead of 8-bit with gamma
-T        Write TIFF instead of PPM

Create a TIFF file and use the cameras White Balance (WB)

dcraw -w -T DSC_8119.NEF

Create a TIFF file and use the average White Balance (WB) on the picture

dcraw -a -T DSC_8119.NEF

Set the filedate to be the same as the picture date according to the EXIF information

dcraw -z filnavn

Options I often use

dcraw.exe -v -w -H 2 -T DSC_4228.NEF

Tags: , , ,

Posted by

05 Aug 2007 Profiles in Gentoo

Supported profiles
You can view the list of profiles on your architecture officially supported by Gentoo developers when you emerge eselect and then run the following command:
(more…)

Tags: , ,

Posted by