Monthly Archives: March 2011

Ubuntu / Debian environment variables and starting scripts at boot

Love your environmentEnvironment variables are very important aspect of Linux based operating systems. They are used by system to adjust its own behavior according to what you have specified during operating system installation and after that you can use it to tweak you system even more. Environment variables take form of name=value and you can view list of current environment variables by issuing following command on your favorite Linux terminal:

printenv

Some environment variables are set by the root user for all users on one PC, but every one of those users can have its own environment variables. Now lets see how should we assign lets say "en_US.UTF-8" value to environment variable named "LC_ALL" (by the way this is the way to tweak you environment locale setting for things like time and date format and things like that). Typically you will assign environment variable like this:

export LC_ALL=en_US.UTF-8
Continue reading

Start shell script on Network Manager successful connection

The other day I was writing a script that needed to do its job only when specific network interface is triggered (wireless broadband ppp0 in my case). Pinging Google every 10 seconds to detect Internet access was out of the question. There is a more elegant way to do this. If you are interested please proceed.

Do you know that authors of Network Manager built option to trigger scripts right into this great application. To use this option you need to write bash script with some specific bash variables and put it to "/etc/NetworkManager/dispatcher.d/" directory. Specific variables are necessary to receive instructions from Network Manager about network interface that triggers execution of your script and should it be executed on "up" or "down" operation on that interface.

Continue reading

Remote CLI access to Ubuntu Linux PC using web browser through authenticated HTTPS

Shellinabox

Lets say you need to access your Ubuntu Linux PC at your home from the other PC behind very restrictive firewall. Lets also say that all you have access to is port 80 (http) and port 443 (https). Lets unlock this situation. Ill show you how to setup Shell In A Box with additional layer of security with Apache2 SSL. Prerequisite for the following guide is that you have fully working Apache 2 installation on you Ubuntu system. If you need instructions for this, you can find them on one of my older posts:

Ubuntu Netbeans and LAMP server with Xdebug as non-root user

In this post I'll mostly give you CLI commands without to much explanation so it is up to you to go trough the procedure and adjust it according to your own setup. Reason for this approach is that the procedure is a bit longer and there could be 10 pages explanation for all of this. Of course I'll give basic explanation for most important commands. So lets get down to business...

Continue reading

Ubuntu Evince with panning hand for scrolling PPA

I use Wacom Bamboo One tablet in my every day computing and I'm very satisfied with its performance when connected to my Ubuntu PC. But one thing I miss when compared to mouse is panning hand. When using tablet it is easiest to scroll by grabbing you document up or down. But, your application must support such "panning hand" GUI interface. With Firefox i use "Grab and Drag" addon and that's about all I need from my browsing experience when it comes to scrolling with my tablet. Most of the other desktop applications do not support "panning hand" and there isn't much we can do about it except grabbing source and getting our hands dirty. IRIE Shinsuke agrees, so he patched Gnome document viewer Evince with "panning hand" patch grabbed from Evince mailing lists. This patch unfortunately hasn't been accepted for inclusion to Evince (don't know why). Fear not, IRIE is here with Ubuntu PPA for Evince with "panning hand". So read on to find out how to obtain you copy:

Continue reading

Font smoothing in Debian 6.0 Squeeze like in Ubuntu

Debian LogoDebian is great operating system, but lets face it: fonts are ugly on any Linux distribution except Ubuntu. That's OK if you ask me. Why? When I hear word "Debian" my first association is reliable server environment, and I guess you don't need fine tuned font smoothing on white on black terminal. What if you really like having Debian on your desktop, and you also like having normal eyesight? Debian user Hadret who describes him self as "Atheist, Debian GNU/Linux user and a philologist to be" has Ubuntu patched versions of libxft2 and libcairo2 - the libraries that control how fonts are looking, in his Debian repository. All you need to do to fix you Debian font situation is to add his Debian repository to your sources list and do regular apt-get update procedure. Here are the necessary commands to do all of that:

su
echo "deb http://hadret.rootnode.net/debian/ unstable main" | tee -a /etc/apt/sources.list
echo "deb-src http://hadret.rootnode.net/debian/ unstable main" | tee -a /etc/apt/sources.list
wget -O - http://hadret.rootnode.net/debian/duckbill.key | apt-key add -
apt-get update
apt-get dist-upgrade

After you restart you PC you fonts should look much better than before and you should also feel much better about using great Debian operating system.