Friday, 31 August 2012

and I migrated to Ubuntu...

It was nice to test PCLinuxOS, but even nicer was to realise that the entries that I wrote in the blog about how to configure it apparently helped a lot of people. I received many "thank you" messages from around the globe for the help ;)

It was nice, but in the end I moved to Ubuntu. Why? Because of its stability, its support and continuos improvements. I'm now in 10.04 LTS (Long Term Support) which apparently is the same version that Google uses internally in all of their computers. This version is supported till April 2013, I guess is time to start thinking about changing to 12.04 LTS... with its "Unity" desktop that I'll give a try just in case.

This will be my last post on this forum, although I'll try to answer any questions I get... if I still know/remember the answer, that is ;)

Good luck to those that are still in PCLinuxOS...

PS: Recently I used Slax linux (only a 200Mb download liveCD) to fix a master record corruption in my Hard Disk. Just in case someone wants to try a small footprint linux.

Monday, 2 June 2008

Installation of SMCWUSB-G Wifi ndiswrapper

Here I'll describe how to configure the wifi usb stick from SMC model SMCWUSB-G.

I had to set my pclinuxos desktop to wireless LAN because of a new wifi router that I just got for IPTV which should sit besides the IPTV decoder, far away from my desktop. For this I purchased locally a wifi adapter, the one they had, the SMCWUSB. This was a mistake because I should have looked first for an adapter well known to work with pclinuxos, ideally with native linux drivers.

I run in a lot of problems with this adapter, there is no native driver, so only option seems to be using the ndiswrapperm, but it isn't a easy tasks and after many trials (one full working day) this seems to be the way to make this hardware to work properly on pclinuxos.

1.- Install the lastest ndiswrapper using the Package Manager. DO NOT download the lastest ndiswrapper from internet it requires a kernel higher than the one in pclinuxos (at least on June 2008).
2.- Copy to a local folder the drivers from the SMC installatino CD or download from SMC site.
3.- In the local folder where you copied the drivers make a backup of the driver for xp with:
mv smcwguxp.sys smcwguxp.sys.bak
4.- rename the windows 2000 driver so it looks like the xp driver with:
cp smcwgu2k.sys smcwguxp.sys
5.- install the driver with
ndiswrapper -i smcwgu.inf
6.- Open the Administration Center -> Network & Internet
7.- Make sure that there is no wlan device installed. If necessary delete any wlan device using the tool "Delete a network interface" in the Administration Center.
8.- Add a new device using "Set up a new network interface..."
9.- when asked for the type select "Wireless"
10.- when asked for select ndiswrapper and then ndiswrapper for smcwgu
11.- your smcwusbg hardware should now be detected and it should start scanning for wifi networks.
12.- configure your wifi network as usual (SSID, security, etc)

The mistakes that I've done that you should avoid: installing latest version of ndiswrapper from sourceforge, or in general installing an ndiswrapper different to that downloaded with the Package Manager, using the xp driver on the smc CD (strange but true), trying to use the Zydas driver zd1211, zd1211b or zd1211rw (even though they should have worked with the Accton chipset on this SMCWUSBG), this applied to both the Zydas driver from internet and the zydas driver from Package Manager.

Thursday, 24 May 2007

Read AND Write access to windows partitions (NTFS) from PCLinuxOS

By default PCLinuxOS supports Read Only access to windows disk partitions formated as NTFS. This was quite inconvenient to me because I have a 250Gb external disk (USB) already formated with NTFS that I use to store my pictures, films, backups, etc.

Fortunatelly, there is a workaround to have Read and Write access to NTFS in PCLinuxOS. It is called ntfs-3g and can be installed from the PCLinuxOS pakect manager. Doing the following:
  1. Open the "Packet Manager" from your "pannel" (the bar on the bottom of the screen). If you are not in a root session (as you should!) type the root password to open the Packet Manager.
  2. Once open, click on "Search" and type: ntfs
  3. Right click on "ntfs-3g" and select "Mark for Installation"
  4. Click on "Apply" and follow the instructions if any.
Now you are ready to have read/write access to your NTFS drives.

Let suppose you have a NTFS drive: /dev/sda1
  1. Make sure that it is not already mounted. You can safely issue a: "umount /dev/sda1" to make sure it is unmounted, or you can check with "mount -l".
  2. Find a mounting directory (or "point" in the linux jargon). If you do not have one already make it yourself, for example you could create the directory /media/ext_disk
  3. Issue the following command to mount the drive:
    mount -t ntfs-3g /dev/sda1 /media/ext_disk
The system will give you a warning about needing the linux kernel 2.6.20 (PCLinuxOS 2007 is still on, when are they going to port it to 2.6.20?). There is no fix for this, and in theory it is NOT SAFE to run it like, this, but so far I haven't had any problems yet (only 3 days playing with it, I'll try to report back later on).

If you want the NTFS to be read/write from boot time then you need to add the following line in /etc/fstab (modified for your drive and mount point, of course):

/dev/hda1 /media/disk ntfs-3g defaults 0 0

You are done! Now you can read/write to NTFS... but because of the warning above please play it safe and if things go wrong please remember that you were warned :-)

I later found another alternative. Install ntfs-config from the Packet Manager and the run the command "ntfs-config" follow the instructions and it will configure your NTFSs for write access.

Network printers in multiple boxes

This is an update to the previous entry about network printers from multiple linux boxes.

The previous post was correct, but it possible is easier to just install the printers on each linux box. Otherwise it becomes necessary to address the printer with the IP address of the computer where the printers were installed and where CUPS is running.

For example, if the IP of the computer where the printers where installed is, to access the MFC5440CN printer you will need to address the printer like MFC5440CN@ and so you will also need to put the brpcfax command like this (see previous posts about brpcfax) to print from OpenOffice and Firefox:

brpcfax -P MFC5440CN@

Another obvious disadvantage of this method is that you need to have the computer with IP on when you want to print from another computer. Also, that computer will need a static IP address or you will need to reconfigure the printer name when the IP changes (reboot, power failure, expiry, etc).

To install the printer in another box just follow the standard instructions as in the previous post about the printer installation.

Monday, 21 May 2007

Making printers available in PCLinuxOS Network

Now that I have two PCLinuxOS boxes running on the network, it seems that to make the printers available to the computer where I did not install the drivers nor the CUPS (C Unix Printing System) server, I need to add to the file /etc/cups/cupsd.conf the following:

AuthType None
Order Deny,Allow
Deny From None
Allow From All

The the CUPS server needs to be restarted. I did it issuing from a root terminal the command "cupsdisable" and then "cupsenable"

This seemed to have done the trick...

Monday, 14 May 2007

Configuration to mount usb memory sticks

Today I'll explain how to configure the system to mount a usb memory stick so we can read and write from an user account, instead of just from the root account.

I have now two computers running PCLinuxOS, one with a HD installation (my old PII 300Mhz) and one with the LiveUSB instalation (the not so old PIV Dual Core 3GHz). As I have been working on the PII before I completed the installation and configuration of the LiveUSB, I wanted to transfer all my work (including Thunderbird mails and folders) to the LiveUSB so I could use it in the PIV.

But then I run into trouble when connecting the USB memory stick to the old PII. First, although I could mount and see and write to the USB memory from user root, when I was logged as other user i suffered different problems, from not been able to mount the usb memory stick, to been able to mount it but not read, or been able to read but not write. This different combination of problems were happening as I was changing configurations trying to fix the problem.

If you have run into this problem, you might have tried to put in the /etc/fstab file an entry for the usb device. I did that but it is not a good idea because it locks the usb mounting point to a particular usb drive "letter" and number, so DON'T do something like "/dev/sda1 /mnt/usb vfat defaults 0 0".

As I was googling and learning, I found that there is a special file system for usb that precisely provides the functionality to make the usb file systems mount automaticall without the need to indicate a specific device name and mount point.

In the /etc/fstab file there is already an entry to provide this functionality, which is:
none /proc/bus/usb usbfs defaults 0 0

But that entry was not good enough for me because I could mount and read the two partitions in my USB memory stick (one vfat and the other ext2), but I could not write to them (at least not to the ext2 because the truth is that I didn't try to write to the vfat).

So googling a bit more I learnt the options that I could use in fstab and after a few trials I found the combination that allowed me to write to the usb memory stick with my standard user. What I did was to replace the line mentioned about from the /etc/fstab with the line:
none /proc/bus/usb usbfs dev,suid,user,rw 0 0

Be careful because I believe that the order of the options is important, for example if you put the "dev" option after the user and rw options I believe it overrides them and set it back to nouser (only root can mount) and ro (read only).

With that modified fstab, I re-inserted the usb memory stick and I was able to write with my standard account. Also, if I issue a "mount" command from a root terminal window I get the following for my usb memory stick:

/dev/sda1 on /media/usb type vfat (rw,nosuid,nodev,sync,uhelper=hal,flush,uid=501,utf8,shortname=lower)

/dev/sda2 on /media/disk type ext3 (rw,nosuid,nodev,sync,uhelper=hal,data=ordered)

Which initially looks correct to me.

These guidelines, I believe, will be also useful to anyone connecting through USB a storage device, like for example a external USB HD.

It it was useful to you this post, please send me a comment or link to it.

Sunday, 13 May 2007

Configuring Brother Multifunction printer MFC-5440CN for Open Office and Firefox on PCLinuxOS

This entry explains how to install the multifunction printer Brother MFC-5440CN on PCLinuxOS to work in an integrated way with Firefox and Open Office with all its functions, that is Network printing, print to FAX and scanner.

The instructions are probably valid with small modifications for other Linux distros. Also the intructions are probably valid for other Brother multifunction printers by just downloading the correct drivers for your printer from the Brother website support for Linux.

We are going to download all the drivers first and then install them.

  1. Go to webpage

  2. Click on “click here” besides the “LPR Printer driver”

  3. Click on “Please be sure to install the LPR driver”

  4. Search for printer MFC-5440CN (or whatever other Brother model you have) and click on the “Download” button on the second column (for Mandriva)

  5. Accept the legal stuff (don't know what it says! :-) ) and save the file (to the Desktop for example)

  6. Go back two webpages (i.e. to the “Brother CUPS driver”

  7. Click on “Drivers for Red Hat / Madriva (Mandrake) / SuSE

  8. Search for printer MFC-5440CN (or whatever other Brother model you have) and click on the “Download” button on the second column (for Mandriva)

  9. Accept the legal stuff (don't know what it says! :-) ) and save the file (to the Desktop for example)

  10. So go back to the URL in point 1 and click on “click here” esides where it says “SANE Scanner Driver”

  11. Choose the brscan or the brscan2 driver depending on your printer (list of models is there). For MFC-5440CN the driver is brscan2

  12. On the table for Red Hat / Mandriva ... download the driver brscan2 for 32bit version. Accept legal and save.

  13. Go back to the webpage in point 1.

  14. Click on the “Click here” besides the “LPR PC-FAX send driver”

  15. Download the driver for Mandriva

  16. Go back to the webpage in point 1.

  17. Click on the “Click here” besides the “CUPS Wrapper PC-FAX send”

  18. Download the RPM installer package

  19. Go to the URL in step 1 and leave it openend, we will need it later

Installation of the Drivers

  1. Installing the LPR Driver (need for the subsequent CUPS wrapper)

    1. open a terminal as root (or open a normal one and issue a “su”)

    2. Go to the folder where you stored the drivers. If you left them in Desktop they will be in /home//Desktop, if you are root, they will be on /root/Desktop.

    3. type
      rpm -ihv –nodeps MFC5440CNlpr-1.0.2-1.i386.rpm
      (or what ever driver is for your printer)

    4. Leave the terminal window open, we will need it later.

  2. Installing the CUPS wrapper

    1. type
      apt-get install tcsh
      type “y” to confirm the installation
      This is very important because the rpm package has a script that needs csh which is not default in PCLinuxOS. To run a csh script you can use tcsh that is csh compatible (extension).

    2. Now we need to fix an error in the PCLinuxOS tcsh. Type
      vi /etc/profile.d/10pclinuxos-release.csh
      (or use your favourite editor)
      Then change the line “setenv META_CLASS $META_CLASS” to “setenv METACLASS”

    3. type
      rpm -ihv --nodeps cupswrapperMFC5440CN-1.0.0-1.i386.rpm

    4. If it gives you an error sayin “already installed” then type
      rpm -ihv --nodeps –force cupswrapperMFC5440CN-1.0.0-1.i386.rpm
      You might get this error if you tried to install this package before you found this tutorial :-)

    5. In your web browser open “http://localhost:631” (the CUPS web interface)

    6. Click on “Printers”, then on “Modify Printer” on the MFC5440CN printer

    7. Optionally indicate location, click “Continue”

    8. Select device “Brother MFC-5440CN (Brother MFC-5440CN) where is the actual IP address assigned to your printer. Then click contiue.

    9. Select Make “Brother” and click “Continue”

    10. Select Model “Brother MFC-5440CN CUPS v1.1 (en) and click on “Modify Printer”

    11. In a few seconds the page will reload. Click on “Print Test Page”. If you have followed all the steps it will print!

  1. Installing the SANE drivers

    1. Go back to your root terminal and type exit if you where still on tcsh (that is, if you left the terminal as it was from the previous step).

    2. make sure that you have the latest version of xsane by typing
      apt-get install xsane
      and installing it if necessary

    3. type
      rpm -ivh brscan2-0.2.3-0.i386.rpm

    4. type
      brsaneconfig2 -a name=BRD_SCANNER model=MFC-5440CN
      where is the ip address of your printer that you can double check on http://localhost:631 if you do not remember.

      Be careful that the model has be typed exactly as above (or whatever model you have typed with the same “notation”).

    5. You can check that the configuration is right by typing:
      brsaneconfig2 -q
      and you sould see something like
      0 BRD_SCANNER “MFC-5440CN”

    6. You can try also that it works with the application xsane tha is on “Start->Multimedia->Graphics->Xsane”. If you press SCAN it should start directly to scan without needing to configure anything else!

  2. Installing the LPR FAX drivers

    1. In the root terminal type
      rpm -ivh --nodeps brmfcfaxlpd-1.0.0-1.i386.rpm

  3. Installing the CUPS Wrapper for PC-FAX

    1. In the root terminal type
      rpm -ivh --nodeps brmfcfaxcups-1.0.0-1.i386.rpm

    2. Now you will see in the CUPS webpage the printer BRFAX

    3. Click on “Modify Printer” for the BRPFAX

    4. Click on “Continue”

    5. Select the Device “Brother MFC-5440CN (Brother MFC-5440CN) click continue

    6. Select the Make “Brother” click continue

    7. Select Model “Brother BRMFCFAX for CUPS (en)”

    8. click on “Modify Printer”

  4. Configuring printing to FAX

    1. This is unfortunatelly not that easy as it should be. It is not possible to print directly to the BRFAX

    2. To configure printing from firefox do he following

      1. Go to File->Print

      2. select the printer PostScript/default

      3. select properties

      4. In the “print command” replace “lpr” to brpcfax. This is only needed the first time.

      5. Now you can print to fax clicking on “Print”. This is the only step you will need when you want to print again (and selecting the PostScript/default if it is not already)

      6. This will display a java dialog to enter he number to dial. Enter and click on Send. It should send the fax!

      7. If you have trouble printing to fax it may be because brpcfax needs root permisions and you are with another account. If this happens then modify the command for the postscript/default to “sudo brpcfax”. You will also need to add your user to the sudo list for this command (not included in this tutorial but google for sudo and you will see that it is easy, if i have more time I'll include it here)

    3. To configure printing from Open Office you need to do

      1. You need to run spadmin doing from the termina window (may be there is a way to open it from the Desktop, but I didn't try):

        cd /usr/lib/ooo-2.2/program

        This will open a window with the Printer Administration for Open Office.

      2. Click on “New Printer”

      3. Leave selected the default option “Connect a fax device” and click on Next

      4. Leave selected the option “The default printer” and click next

      5. Now enter the following command
        brpcfax -P BRFAX -o Paper=A4 fax-number=(PHONE) (TMP)
        and Next

      6. Now you can set the name of the fax printer for OO, you can leave the default name Fax printer.

      7. Click on Finish and the Close

Now the fax is configured to be used from Open Office, to test it open OOWriter type something and the Print to “Fax Printer” (or whatever name you gave it in step 6 above). Once you print, a new window will appear requesting the fax number, enter it and click on OK. Your MFC should then start dialing!

If it does not work you might need to add to the command in spadmin a “sudo “ before the brpcfax. You will also need to give permitions to your user to execute with sude the command brpcfax (not covered here but easy to find in google).

I hope that this article has been useful I would like to hear your comments...