Posts filed under ‘Character Encoding(Unicode’

Running Puppy Linux 2.14 on Averatec 2370

Puppy Linux is a live CD distro designed to be small, fast, and bootable from a removable device. I like the idea of a portable OS on a CD or a USB stick that can boot into another computer and leave no trace. I could lug a CD or USB stick instead of a computer. I decided to try installing Puppy Linux on my Averatec 2370 laptop. This is a relatively new machine, so installation may be difficult due to new hardware.

What works out of the box

  • Optical drive
  • Hard drive
  • USB ports
  • Sound

What doesn’t work out of the box but can be configured

  • Wireless
  • Fan
  • Power Management

What doesn’t work out of the box and still needs additonal software

  • Nvidia video – need to download video driver dotpup file

What doesn’t work period

  • 4-in-One SmartCard Reader – there appears to be no drivers currently.

Installing Puppy Linux to a USB Key on an Averatec 2370

  1. Download Puppy Linux from the Puppy Linux site. At the time of this writing, Puppy version 2.14 comes in a SeaMonkey edition and a Unleashed edition. The SeaMonkey is the standard Puppy with its default set of application. The Unleashed version allows you to custom configure your own Puppy live CD. Since Unleashed requires a spare partition and because I really don’t have time to fiddle with setting up a free partition, I am going to use the SeaMonkey edition.
  2. Burn Puppy to a CD. If you don’t have a burner software like Nero, you can download a freeware burner such as CD Burner Pro.
  3. Place the new CD into your computer and boot from the CD.
  4. When the CD boots, you’ll be prompted to enter the boot option. If you just wait, Puppy will boot into the default settings.
  5. Next you’ll be prompted to enter the keyboard layout. Select the one appropriate to your keyboard.
  6. Next you’ll be at the Puppy Video Wizard. You are given the choice for xorg or xvesa. If you select Xorg on the Averatec 2370, it will fail, so select Xvesa.
  7. The graphic should appear. Select the highest resolution at 1024x768x24 and press OK.
  8. Close the Puppy welcome window.
  9. Plug in the USB drive.
  10. Click on the drives icon, find the USB drive you inserted and press Mount.
  11. Select the menu item Menu->Setup->Puppy universal installer. This brings up the Puppy Universal Installer window.
  12. Select USB Flash drive and press OK.
  13. You’ll be prompted to select which drive to install to. Make sure you select the USB drive and press OK.
  14. Click on the normal install button.
  15. Press OK again when asked if you are sure.
  16. Press the CD button when ask where the Puppy files are located.
  17. Make sure the Puppy CD is in the drive, and press OK.
  18. When ask if you want to do with the MBR, select default and press OK.
  19. Select “Just Keep Going” and press OK.
  20. Press the enter key on the final sanity check.
  21. Press the enter key when finished.
  22. The CD will eject. Remove the CD, turn off machine and then turn it back on with the USB key in place. Press F11 when immediately after you switch on the machine. You’ll be prompted with a list of device to boot from.
  23. Select USB.

If everything works, you should end up being prompted to enter the keyboard. Repeat steps 5-7.

Getting the Network card to work with WPA-PSK

Averatec 2370 comes with a RT73 chipset, but Puppy does not automatically detect the right driver, so you have to explicitly install it. In addition, the network wizard does not work, at least not for WPA, so you have to edit the config filie /etc/Wireless/RT73STA/rt73sta.dat. You should also avoid clicking on scan network button. It does list all of the wireless access point in the area, but you can’t pick any of the access points on the listing and you can’t make the window go away.

  1. Click on the Setup icon.
  2. Click on “Connect to Internet by network interface…”.
  3. Click on Load Driver button.
  4. Make sure the Averatec wirelss switch is on. Select rt73 and press OK.
  5. You should get a message that loading has been successful. Press OK.
  6. In the Networ_Setup, you should see a rausb0 button. Normally, you would press the rausb0 and configure the wireless. For some reason, the GUI config does not work, so press the Exit button.
  7. Select Menu->File Managers->uXplor 2-Panel Manager.
  8. Browse to /etc/Wireless/RT73STA.
  9. Right click on the file “rt73sta.dat” and select the menu option “SendTo” and then select “Text Editor”.
  10. Edit the rt73sta.dat file and save. In my case, I have WPA-PSK using TKIP, so I needed to edit the fields SSID, AuthMode, EncrypType, and WPAPSK:
    SSID=<your access point’s ssid>
    WPAPSK=<the key>
  11. Click on the Setup icon.
  12. Click on “Connect to Internet by network interface…”.
  13. Click on the rausb0 button.
  14. Click on the Auto DHCP. There should be a brief pause and then you should get a dialog that the DHCP is successful. You are asked if you want to save the configuration.
  15. Press Yes.
  16. Press Exit to exit network setup.

Launch the browser and attempt to access the internet. The wirelss should now be working.

Installing Nvidia driver

Averatec 2370 comes with Nvidia 6100 video with a maximum resolution of 1280×800, but Puppy linux does not include the driver for the card. Puppy actually has two different Xserver: the standard Xorg and XVesa. XVesa is a light weight version of Xorg but does not support direct rendering and is limited to a resolution of 1024×768. Even without direct rendering, the machine appears fast enough to display movies on XVesa. If you can live witht he lower resolution, sticking with XVesa allow you to avoid tainting your kernal with the Nvidia proprietary driver.

A fellow Puppy user has made the Nividia driver into a dotpup file. Unfortunately, some tinkering is needed to get it to work. The following instructions are based on this post. Some manual editing of the xorg.conf file is needed to get the video working.

  1. Download the Nvidia dotpup file InstallNvidia.
  2. Select Menu->File Managers->Rox-Filter file manager.
  3. Browse to where you download the pup file and click on it to run the installer and press the Run button.
  4. You’ll be prompt to delete the pup file, I would press Yes to get rid of it or it will be save when you shutdown Puppy.
  5. Select Menu->Exit to Prompt.
  6. Type the command installnvidia to bring up the install screen.
  7. Options 1 does not work, so select option 3 to bring up the Puppy video wizard.
  8. Press xorg to bring up a list of monitors.
  9. Select “LCD Panel 1280×800” and press OK.
  10. Select the resolution 1280x800x24 and press OK. This takes us back to the installer screen.
  11. Select option 6 to install the 9629 driver.
  12. Select option 0 to exit to command line.
  13. Edit /etc/X11/xorg.conf.
  14. Scroll to the section “ServerLayout”, you’ll notice a line for “Screen 1” Right of “Screen0”. Delete this line.
  15. Scroll to the section “Monitor” with “Monitor1”. Delete this entire section.
  16. Scroll to the section “Device” with “Card1”. Delete this entire section.
  17. Save the file and exit the editor.
  18. Type modprobe agpgart. If you don’t, startx will fail, and you’ll get error messages about “unknown symbols”.
  19. Type startx to start up the GUI. You’ll notice the Nvidia logo briefly.

Enabling Averatec Power Management

ACPI seems to be enabled by default, but none of the ACPI modules are loaded. As a result, the fan is always on and the cpu runs at full speed, resulting in low battery life. To enable power management, due the following:

  1. edit the file /etc/rc.d/rc.modules.
  2. Locate the line [ ! -d /proc/acpi ] && modprobe apmChange the line to
    if [ -d /proc/acpi ];then
    modprobe ac
    modprobe battery
    modprobe button
    modprobe fan
    modprobe processor
    modprobe thermal
    modprobe powernow-k8
    modprobe cpufreq_conservative
    modprobe cpufreq_ondemand
    modprobe cpufreq_powersave
    modprobe cpufreq_userspace
    modprobe cpufreq_states
    modprobe apm
  3. Save the changes.
  4. run the following command:echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor.

Configuring WMPower to run at Startup to track battery usage
Once the power management layer is in place, you you can run the wmpower application to display your battery level. To get wmpower to startup do the following:

  1. Edit the file /root/.xinitrc.
  2. Locate the line: exec $CURRENTWM
  3. Before this line, add the line:wmpower -no-meddling &The -no-meddling option tells wmpower to display status only. The ampersand is necessary to run the program in the background or the window manager won’t run.

Enabling the Touchpad
While the touchpad on Averatec 2370 is usable with the mouse driver. It is just way too sensitive. What we need to do is to load the Synaptic driver and edit the xorg.conf

  1. Open a command prompt.
  2. Type modprobe evdev
  3. In /etc/rc.d/rc.modules, add the following line to the end# Need to do this for Synaptics Touchpad

    modprobe evdev
  4. Edit /etc/X11/xorg.conf.
  5. In the section “Module”, add the following line to load the Synpatic driver.

    #Load Synaptic Module
    Load "synaptics"
  6. In the section “ServerLayout”, add the following line to make Syanptics the main pointer driver

    InputDevice "Touchpad" "CorePointer"
  7. Add the following section:
    Section "InputDevice"
    Driver "synaptics"
    Identifier "TouchPad"
    Option "Device" "/dev/input/psaux"
    Option "Protocol" "auto-dev"
    Option "MaxTapTime" "0"

    Note that I use MaxTapTime of 0 because I don’t like having a mouse click being generated by a touchpad tap. This often cause lots of problem during editing.
  8. Select Menu->Shutdown->Exit to Prompt to exit.
  9. Type startx to start the window manager. The touchpad should be working now.

Enabling the second USB Mouse
If you plug in a USB mouse into the Averatec 2370, the mouse is not automatically detected. If you examine what is returned by the dmesg command, you’ll notice that the USB device is detected, but there are no message that identifies the device as a mouse. To get it working, you’ll need to install the usbhid (usb human interface device) module and add the second mouse into xorg.conf.

  1. Open a command prompt.
  2. Type modprobe usbhid. If you dmesg, you’ll notice that the name and brand of your mouse is displayed.
  3. In /etc/rc.d/rc.modules, add the following line to the end# Need to do this for USB Mouse
    modprobe usbhid
  4. Edit /etc/X11/xorg.conf.
  5. In the section “ServerLayout”, add the following line to add the USB mouse driver
    InputDevice "USB Mouse" "AlwaysCore"
  6. Add the following section:
    Section "InputDevice"
    Driver "mouse"
    Identifier "USB Mouse"
    Option "Device" "/dev/input/mice"
    Option "Protocol" "auto"
    Option "SendCoreEvents" "true"
  7. Select Menu->Shutdown->Exit to Prompt to exit.
  8. Type startx to start the window manager. The USB Mouse should be working now when you plug it in.

Installing Flash 9

Puppy 2.14 comes with Flash 7, but many of the site requires Flash 8 or later. To install the Flash 9, install the following dotpup.

January 29, 2007 at 2:14 am 6 comments

Soft hyphen broken my XML – a warning about encoding

Suppose you type “Pesto – a receipe” in Microsoft Word. it will automatically replace your dash with a soft hyphen. You can store that string with the soft hyphen in a database field in MS SQL. Suppose you write a program to extract that string from the database and return it as an XML and attempt to display it in the browser, the browser will complain that the XML contains an invalid character. If you use an XML parser, you’ll get an exception.

Dumping the XML file using hexdump (a open source program) reveal the problem. One expects the soft hyphen to be 0xAD, instead the soft hyphen shows up as 0x96. While 0x96 is a displayable character in ANSI (which is the default encoding in windows and MS SQL), it is not a displayable character in unicode. Since most XML are in UTF-8, the 0x96 blows up the viewers and parsers.

Be real careful about copy and pasting from Microsoft Word into the MS SQL database. Be sure what you are copying and pasting is a dash and not a soft hyphen.

August 31, 2006 at 3:36 am 3 comments


February 2020
« Jun    

Posts by Month

Posts by Category