Tuesday, December 16, 2008

Configuring the fstab

== Configuring the fstab ==

In this sample how to add a swap partition on to fstab. The Swap partition is located on sda2.

* If fresh formatted partition for swap and not yet mounted do the following:

fdisk -l (to list out the devices)
mkswap /dev/sda2 (to set the sda2 swap)

* To locate the uuid of sda2
cd /dev/disk/by-uuid
ls - l

it should display like this example:
lrwxrwxrwx 1 root root 10 2008-10-30 12:26 f0306cfc-2bb7-4f51-afc5-c28e56c5416f -> ../../sda1
lrwxrwxrwx 1 root root 10 2008-10-30 12:26 f35a5a72-8034-42f4-85f9-44d0e27a7439 -> ../../sda2

* then add the colored blue text to the fstab sample below

UUID=f0306cfc-2bb7-4f51-afc5-c28e56c5416f / ext3 relatime,errors=remount-ro 0 1
UUID= f35a5a72-8034-42f4-85f9-44d0e27a7439 none swap 0 0


* to mount it without rebooting just type this command:
mount -a

How to setup an unsupported printer on linux for network print on Windows as server

== Introduction ==
source: http://iharder.sourceforge.net/current/macosx/winmacprinter/

The process here is where an old printer driver shared in windows acting as a dummy printer then forwarding the print to the actual unsupported printer on linux. So you can have a printer fully supported in a network without worrying too much if linux supports it. As we all know most devices are supported only on Windows.

and here are the procedures...

1. Make sure you have a working printer set up on your Windows XP computer
2. Install the software needed to emulate a Postscript printer and redirect printing ports
3. Emulate and share the Postscript printer so that the client machines can use it.

== Step 1: A Working Printer ==

If you don't have a working printer set up with your Windows XP computer, consult your Windows XP documentation or get your 10-year old neighbor to help you out.

== Step 2: Postscript and Redirection Software ==

We need to install the following software packages:

1. Ghostscript (Postscript emulation software / link: http://www.cs.wisc.edu/~ghost/)
2. GSview (Postscript viewer and print processor / link: http://www.cs.wisc.edu/~ghost/)
3. RedMon (Printer port redirection / link: http://www.is-foehr.com/)

in case of broken links just use google to find newer versions.

== Step 3: Emulated Postscript Printer ==

On your Windows XP computer, click Start and then Control Panel. Then double click on Printers and Faxes. You should see something that looks like this:



Click on Add a printer which you will find on the left side of the window. You should see the first panel of a wizard, and it will look like this:



Click Next. The next panel you see should look like this:



Select Local printer attached to this computer and make sure that Automatically detect and install my Plug and Play printer is not checked. Click Next. You should see the following panel:



Select Create a new port and select Redirected Port from the popup list. Click Next. A little dialog box should pop up that looks like this:



The port name RPT1: is a fine port name. Click OK. You should be back at the next panel of the wizard:



Select a nice Postscript printer. I used the HP laserjet 1200 PS (I have not tried using other PS drivers but I guess you may use any PS type of driver as long as the linux client has a support for it)

Give your printer a name. I recommend not using spaces. We will call the printer GhostPrinter to indicate that it is an emulated Postscript printer (using Ghostscript) that prints to an HP laserjet 1200 PS.

Note: the name on the image and my instruction are different. It can be changed to anything you like.



If you wish to use this as the default printer you may. Also if you wish to share this printer just set it.



After that let's go to the printer settings to forward the print to another printer driver.

Now let's go to the Printer and Faxes contol center



Right click on our GhostPrinter and select Properties from the popup menu. You should see this:



Click on the Ports tab to take you to this panel:



With RPT1: Redirected Port GhostPrinter selected, click Configure Port... to bring up this panel:



In the Redirect this port to the program box, enter or browse to the gsprint.exe program. Its default location is C:\Ghostgum\gsview\gsprint.exe. (It appears that more recent versions put it here: C:\Program Files\Ghostgum\gsview\gsprint.exe)

In the Arguments for this program are box, enter -printer "exact name of printer where to print" -color -. It is essential that you precisely identify the name of the real, working printer (in this case, "HP DeskJet 722C") and that you include the trailing hyphen that stands alone.

In the Run box, let alone it on Normal setting.

The default value of 300 in the Shut down delay box should be sufficient. If you find that jobs are getting lost because it takes longer than this to begin printing your document, you may come back here and increase this value.

Click OK.

Now just try to do a test print on the GhostPrinter. If it works then that's all folks!!!