how to solve (some) graphical issues with putty, UTF8, and ncurses

Hello everybody,

I’m writing this article to help all those people that may have had problems with text garbled, mismatched or other kind of graphical issues with all those software that uses the famous ncurses libraries (libncurses5). It all started when I was using (via puTTY) my favorite command line log parsing tool: the great  multitail (go out there and take it if you don’t know it) I started noticing some odd errors: part of the text was garbled, some of the lines were wrong in size or were substituted by wrong characters, as you can see in the screenshot:

screenshot
multitail in a centOS environment

This problem happened when using puTTY on a CentOS 6.6 system, with locale set on UTF-8,  libncurses version 5.x and multitail at 6.4.1

This is the result of multiple problems and some steps are required to fix all the issues :

  1.  Download the latest version of puTTY (0.64 as of today)
  2. Make sure that under Windows -> Translation  and Connection -> Data you have everything as in the images :
    Remote character set: UTF-8 and "use Unicode line drawing code points"
    Remote character set: UTF-8 and “use Unicode line drawing code points”

    Terminal-type string: putty
    Terminal-type string: putty
  3. Then, you have to set an environment variable to tell the ncurses libraries to use UTF-8 :

export NCURSES_NO_UTF8_ACS=1

you should also make it stick (echo export NCURSES_NO_UTF8_ACS=1 >> ~/.bashrc )

This should solve all your issues with UTF-8 and the ncurses libraries.

Btw, this short guide wouldn’t have been possible without the help of Folkert…so thank you !

As usual, I hope this was useful to somebody.

Advertisements

How To Boot and Run Linux from a USB Pen Drive [Easy Way]

Hello,

this time I’m gonna show you two easy ways to install and run two common linux distributions from a pen drive using both Windows Xp or Vista or a Linux Distribution, and wizard procedures. It’s like a “Live” distribution, but from a USB drive. The two distributions are Fedora Core 9 (or 8 ) and BackTrack (what is BackTrack ?!? Take a look at this ), both with the persistence feature…what is the “persistence feature” ??? Well, is the possibility to store the changes you’re making to the system (in fact, it’s NOT exactly like a Live distribution)…anyway…

Fedora Core 9 (2 Gb Pen drive is enough, 4 Gb is better )

The Windows’s Way…

1. Insert the pen drive, and make sure it’s empty

2. Download the lastest version of the “liveusb-creator” from here then extract the zip file to a directory and run ” liveusb-creator.exe ”

3. Choose the Fedora Distribution you prefer ( the 9 is really better ! ), choose the USB Drive, then the dimension of the “Persistent Overlay”, the space left to store the modifications to the system, or the files you make. (for 4 gb units, “choose the greatness”…2047 Mb, for 2 Gb… 1024 Mb…less or more… )

4. BUTTON : “Create the Live USB”

5. Wait a couple of hours…

That’s all…now you should have your distribution full working…

The Linux’s Way…

1. Insert the pen drive, mount it and make sure it’s empty

1b. Install YUM if you haven’t got it yet… (your system probably has it already installed…)

2. Open a terminal windows or get a shell, go to an empty directory ( you need a couple of Gb’s free storage space), and give

# yum -y install syslinux PyQt4 git $ git clone git://git.fedorahosted.org/git/liveusb-creator 
# cd liveusb-creator 
# ./liveusb-creator

3. Choose the Fedora Distribution you prefer ( the 9 is really better ! ), choose the USB Drive, then the dimension of the “Persistent Overlay”, the space left to store the modifications to the system, or the files you make. (for 4 gb units, “choose the greatness”…2047 Mb, for 2 Gb… 1024 Mb…less or more… )

4. BUTTON : “Create the Live USB”

5. Wait a couple of hours…

That’s all…now you should have your distribution full working…you SHOULD…this is still beta version software…so no one is really sure about that…

Backtrack 3 Final (2 Gb Pen drive is enough, 4 Gb is better )

The Windows’s Way…

1. Insert the pen drive and make sure it’s empty

2. Download the [ USB Version (Extended) ] from the official site

3. Extract the whole .iso file to the USB Drive (feel free to use Winrar )

4. Then open the root folder of the drive (ex. G:\ ), go to “boot” folder

5. Run bootinst.bat and follow the onscreen istructions (just press ENTER if everything is ok )

6. That’s all…. should be working…

The Linux’s Way…

1. Insert the pen drive, mount it and make sure it’s empty

2. Download the [ USB Version (Extended) ] from the official site

3. Extract the whole .iso file to the USB Drive (feel free to use the extractor you prefer…like Ark)

4. Then open the root folder of the drive (ex. /home/media/usb1 or /mnt/sda1 ), go to “boot” folder

5. Run bootinst.sh (double click on the icon or “./bootinst.sh” to the shell) and follow the onscreen istructions (just press ENTER if everything is ok )

6. That’s all…. should be working…

Hope this was useful…. Happy Holidays…

Guide: Install Canon Mp150 & Mp160 Printers in Linux

Ok, welcome this time I’m gonna talk about a *simple* driver installation…

So first of all a brief description of the problem…

The Mp150 Printer installed in Fedora Core 7, Fedora Core 8, Ubuntu 7.04 Feisty Fawn, is NOT WORKING…using the standard drivers it simply prints blank, or completly white pages, even if in the *official* linux printing resource database, it is given as “Perfectly Working”…

Solutions:

1_ Use and Install Turboprint driver, FULL WORKING but ….. you MUST PAY…to have them working…

2_

Follow this simple guide….

This guide is full working for both the Mp150 & Mp160 series… and, even if IT IS a STEP by STEP guide for Fedora Core 7 it should be easily adapted to others linux distribuctions…(at least those rpm and gnome based)

so,

first of all, what do you need ? This time I’m not giving direct rpms links, just to avoid mistakes, and make the guide more easy…

Install Cups (usually already installed, it’s better if 1.3.4 or newer)

Install Gutenprint (please use the lastest, at least the 5.0.1, do not use the old one included in fedora’s 7 CD)

Install gutenprint-foomatic

Install the Mp160 Printer Drivers ver. 2.70 avaiable from Canon (RPM and Source code avaible — they’re useful even for Mp150 — file names are cnijfilter-common-2.70-1.i386.rpm & cnijfilter-mp160-2.70-1.i386.rpm)

What to do now ?

For Fedora 7 Distribuction

1- Connect the Printer

2-Click on “System” -> “Administration” -> “Printing” (system-config-printer)

3-Then if everything is ok, you should see your printer “MP150”, so click on it’s name.

4-Then Near “Make and Model” Click Change

5-Now choose “Canon” -> then look for “Mp160 ver2.70” and choose this one.

6->Confirm the changes, and choose to change all the previous configuration

The printer now should be WORKING !!!

What to do if…

if you can’t find your printer in cups…

You’re probably experiencing some problems CUPS-Related, take care of them using CUPS documentation

if you are not using using rpm based distribution…

Install from source…(probably you need urpm)

if you can’t find “Mp150 ver. 2.70”, between your Canon Drivers in CUPS)

Do a step back, returning to Manifactures page… -> Choose “Provide a .ppd file” -> look for “canonmp160.ppd” it should be in /usr/share/cups/model… anyway it comes from the canon drivers…)

if you’re not using gnome…

Use your printer manager…and hope for the best…

if you’re tring to share the printer using Samba and/or Webmin…

You need to change an option… from Samba page in Webmin

choose “Windows to Unix Printing” -> and “CUPS” as Unix Print Style

As usual, hope it’s useful…