Category Archives: Linux

iftop for Linux bandwidth monitoring

Since I often work remotely (coffices and stuff), I use 3G/4G modems with me to provide some connectivity while I'm out. Adding the VPN services in-between I need to know how much traffic is passing through my network, inbound and outbound.

So iftop was the easiest and lightest thing I found. It's in Fedora's repos (I believe Ubuntu's too) so a simple `yum install iftop` resolved the deps for me with everything.

To run that, a:

iftop -i wlan0

(or whatever your interface is) would start that monitor. The listening would probably require you to sudo before that.

iftop-traffic Digg DZone Facebook Google Google Reader Magnolia reddit SlashDot Technorati

Laggy Flash on Linux – Chrome

Sometimes the Linux Flash player starts lagging in the browser. This doesn't seem to fix it when trying to load Flash through another browser or restarting all browser windows completely.

A quick workaround in Chrome is playing with the Flash libraries. There is a version shipped together with Chrome and you can also use the library from the Flash player itself. If you have configured both .so files and navigate to:

  1. chrome://plugins

Then you will find in the plugins list the Flash options similarly to the following screen:


By switching between the different libraries the lagging issue should get fixed. If not, update your library versions and use that approach when the browser rendering gets buggy again. Digg DZone Facebook Google Google Reader Magnolia reddit SlashDot Technorati

Tether Internet from a mobile 3G in Fedora via Wi-Fi

I've found a great guide for Internet tethering from Ubuntu. You could use the same guide in Fedora with Gnome or other Gnome-related platform.

If you have a UDP (LAN) wired connectivity or a mobile broadband connection, you could create an ad-hoc wifi network that spreads that internet connectivity. Follow the steps, specifically the ad-hoc and automattic settings, as well as adding a specific WEP-protected password, in order to share the Internet connection to another device.

Keep in mind that 'Shared' option is mandatory for the 'server' and you also have to pick 'ad-hoc' type of network from the other device that you use to connect from. Digg DZone Facebook Google Google Reader Magnolia reddit SlashDot Technorati

Fedora on Mate small updates

I did two small updates today on the Fedora Mate setup (using the old Gnome supported release instead of the new terrible desktop environment).

First off, by default in Mate there are no Shutdown or Restart buttons. In order to be able to reboot, you need to wait for 60 seconds to logoff to the login screen and then reboot.

You could fix that by installing the ConsoleKit and activating the service as described here.

Second, since there is no UI to change the background visible on login and for unlocking (the annoying fireworks background), it's located in /usr/share/backgrounds/beefy-miracle/default/standard named 'beefy-miracle.png' (normally), though it's really linked from /usr/share/backgrounds/default.png (which links to the first one). So feel free to replace it and solve your problems. Digg DZone Facebook Google Google Reader Magnolia reddit SlashDot Technorati

Setting up Grails and Postgres on Fedora

On Fedora, install Groovy with yum.

Then, download Grails and follow the guide:

Important: set correct Java and Grails home paths to be used by the engine.

Plain and simple guide for Postgres -

The only difference here was that initdb was called through:

sudo postgresql-setup initdb Digg DZone Facebook Google Google Reader Magnolia reddit SlashDot Technorati

WordPress not resolving hosts – strace magical cure

It's been a week for my WordPress being unable to resolve some external host services via URL address. It was working for a while, couple of months, with no changes by my side, and suddenly the dashboard RSS and stats data stopped responding. The error was: 

RSS Error: WP HTTP Error: Couldn't resolve host ''

I haven't changed the httpd.conf file recently, neither the PHP settings or something. I thought about any possible update settings from my Fedora system, but no clue.

Restarted the apache server few times. The /etc/resolv.conf file was standard. One of the common failures is DNS server change and no flushing/refresh from the Apache. But mine was still there, no changes applied.

The solution was calling the httpd process via strace. It's been auto magic - just call it once via strace, then stop or kill the stracing process and start the server as normally. It worked here.

So, I stopped my apache server (which is in /usr/sbin/httpd here, could be in /usr/local/apache2 or /opt/lampp or somewhere else) and I reincarnated it that way:

strace -f -s 128 -o dbg /usr/sbin/httpd -k start

Once debugging started, the services updated by themselves. I killed the service and ran it again as usual:

/usr/sbin/httpd -k start

and everything went back to normal.

Thanks to maniax for the help Digg DZone Facebook Google Google Reader Magnolia reddit SlashDot Technorati

Evolus Pencil – wireframes and prototyping

During my consequential research and exploration of UML and prototyping tools for Linux I found something I really enjoy way too much than expected. It's the Pencil Project.

Pencil is an open source tool based on Firefox for drawing UI prototypes, schemes, wireframes. It has a pretty interface which is usable and fast, it could be ran over Firefox or as a stand-alone application in most of the operating systems around. I had installed it on my Fedora station and now I enjoy drawing schemes for my clients since then. 

The Pencil project offers some standard shapes for drawing, web components (h1 to h6, lorem ipsum, panels...), UI components from Forms (buttons, labels) and other popular things like tables that you might need to show the basic structure. Using a Windows Form/Frame as a parent component it looks exactly like a standard Swing or Forms application. Also, it has alignment of components by horizontal and vertical coordinates related to previously positioned elements. And so on. It's mandatory to try and use in the future. 

Other more complex charts could be painted as well - it's up to you. Digg DZone Facebook Google Google Reader Magnolia reddit SlashDot Technorati

Linux noob command line hints

I've been working with Linux for a couple of years but I'm not sysadmin so I use the parts of the system that I need at work. Mostly different activities with user interface interactions (which is similar to Windows behavior). However working on remote servers, comparing data, transfering and managing projects requires ssh-ing, some file management, archiving, searching in file system, filtering data, hiding folders etc. Here there are few of the tips I've used in the past days and I find useful:

Create/Extract archive ('z' option could be added as well if working with tar.gz files):

tar cvf archive.tar directory

tar xvf archive.tar

Print/list the content of a tar archive:

tar -tvf archive.tar

Create an archive from a SVN-based project excluding SVN:

tar --exclude=.svn -c -f archive.tar projectdirectory

Works for copying an SVN directory with rsync without .svn subdirectories:

rsync --exclude=.svn -r somedirectory somenewplace

Find differences between 2 directories with changes in each file:

diff -r directory1 directory2

Print only file names of different files in 2 similar directories:

diff -r -q directory1 directory2

Filter the 2 directories comparison and hide the .svn entries from output

diff -r -q directory1 directory2 | grep -v .svn

Copy data directory from local machine to a remote machine via SSH (reverse paths for vise verse):

scp -r yourdirectory

Any tips from you? Digg DZone Facebook Google Google Reader Magnolia reddit SlashDot Technorati