Monthly Archives: March 2014

Change gnome XTerm colors

To change the gnome XTerm background color (and text color) follow the instructions below.

First of all install the gconf-editor tool

Start the gconf-editor tool and go to apps -> gnome-terminal -> profiles -> Default and change the foreground_color to #FFFFFFFFDDDD  and the background_color to #000000000000 .

Go to an open XTerm window and open the Edit menu and select Profile Preferences. On the colors tab uncheck “Use colors from system theme”.

That’s all; your XTerm terminals now have a black background with a white text color.


Mount NAS CIFS share on Ubuntu

Follow the instructions below to attach your NAS storage to your Ubuntu machine.

First of all install the  cifs-utils  package:

Then edit your  /etc/fstab  file and add an entry like the one below (adjust directory names for your situation):

Then create a new folder (as root) in the /mnt  folder with the same name as specified in the line above (for the example it would be ShareName ).

Next create a file  .cifspwd  in your home directory with the following lines:

That’s all; your folder on your NAS will be mounted next time you boot. To mount the new folder immediately issue the command:

Have fun!


Scanning an image with C#

This post shows an example of scanning an image with C#. First of all start Visual Studio and create a new console application.scanning software c#

In this example I make use of the standard WIA scanning functionality in Windows 7. Reference the WIA dll in your new project. The dll can be found in the folder “c:\windows\system32\wiaaut.dll”.

The code below scans an image (A4 size) at the default 300 DPI and stores it as an uncompressed TIFF image.