Category Archives: Linux

Bash shell output to printer or PDF

Very often I need to print output of man page or save it to PDF, and I need results fast so I can continue debugging my application or whatever I am doing that needed me to browse man pages. If you want to print shell command output you obviously need working printer or if you want to create PDFs you need cups-pdf package(on Debian based distros use apt-get install cups-pdf as root or with prefix "sudo" if you are Ubuntu derivative user). As an example I will print to PDF ls shell command output:

man -t 1 ls | lpr -P PDF

If you are printing to real printer you would use its name instead of "PDF". Lets do the same thing with my printer named "ML-1620":

man -t 1 ls | lpr -P ML-1610

To print to default printer you just omit -P switch altogether like this.

man -t 1 ls | lpr

Cheers!

Ubuntu Maverick 10.10 no menu bar in some apps

Some applications exhibit strange behavior on latest Ubuntu Maverick. They show no menus. Applications I have discovered are Filezilla, Audacity, Codeblocks and Adobe Acrobat Reader 9.x when user has more than two pdfs open. This usually happens when user tries to install Canonical Unity thing, and because it is very unstable when installed from Maverick repositories, troubles follow along with its installation. Fix you ask? Here it is...

You must remove appmenu-gtk package. I haven't discovered any loss of functionality doing so. Appmenu thing will probably be used in next Ubuntu version for global menu thing in Unity enviroment. For Ubuntu 10.10 i see no reason for leaving in on your system except if you don't like menu bar in your apps. Just put this in your terminal and be on your way:

sudo apt-get remove appmenu-gtk

If you have any problems with this quick fix you can leave anonymous comment by clicking on the "comments" link in the upper right corner of this article.

Logitech webcam and "cannot set freq 16000 to ep 0x86" (Ubuntu bug #459445)

Some Logitech web-cams have serious problems all of the last kernel revisions (somewhere since 2.6.26 kernel revision). Sometimes when user starts its Linux OS things with web-cam go bad. Symptoms are "Waiting for sound system to respond" when clicking at the sound icon in system tray and ton of "cannot set freq 16000 to ep 0x86" in your /var/log/kern.log. What solves this problem when this occurs is removing snd-usb-audio kernel module from kernel and plugging it back. Cause of this bug is still unknown, and some say it is a bug in some Logitech webcam firmwares which gets triggered by something in Linux boot process. Lets work around it on Debian, Ubuntu and its derivatives...

Continue reading

Compiz NVIDIA and ATI games auto switch off/on scripts

Nvidia LogoLast week I've stumbled upon this article with the title "The Cost Of Running Compiz" that bashes Compiz Fusion for killing Linux gamers (is this oxymoron or what?) frame rates. Doctor is in the house. Read on...

It would be ideal that you can have Compiz with ton of eye candy and glitch free 3D games. We know that doesn't work. But instead wouldn't it be possible to have our eye candy Compiz disabled while gaming and re enabled when returned to desktop? Sure. Peace of cake. Here's the idea and the steps to do so...

Continue reading