Tag Archives: Bash

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!

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

BASH Script: Google Earth Linux installation with Fix for ugly fonts

All Linux operating systems with Google Earth 6: I'm very sad to see that this fonts fix doesn't work with Google Earth 6. If you find some other Google Earth ugly fonts workaround please write here so we could once again look at Google Earth with nice smooth fonts. Thanks in advance.

These are the instructions for script attached to this post. It'll download Google Earth from Google servers (if it hasn't been already installed) and tie it to the systems QT files.

Default Google Earth installation flaws

  • Your distributions QT files are generally newer than those provided by Google Earth
  • Google Earth fonts doesn't fit in quite well in standard Gnome and KDE interfaces because Google Earth's QT files are not tweaked to your distribution looks.
  • You have no control over Google Earth's GUI fonts properties. You can't tweak fonts using your distribution's tools like "qtconfig-qt4" because mentioned program have influence only over your distributions QT libraries.

By using this script to install Google Earth you can lead Google Earth to forget its old QT libraries and to use your distributions QT libraries.

Continue reading