Posts Tagged ‘Gnome’

Linux Currency convert GUI tool KeuroCalc / Convert world currencies Desktop Linux application, Convert USD to EUR

Thursday, April 25th, 2013

keurocalc Linux convert us dollars to euro and to rest of major world currencies

If you happen to run a small business or you're just an adventurer who use Linux for his notebook Desktop. Sooner or later you will end up needing Linux software to convert between world currencies. Some might argue that such a software is obsolete since already there are the Google Currency Converter and plenty of other (online) web currency converter sites. However for people like to use desktop applications like me it is much better to use a separate desktop tool which do currency convertion. If this is the case with and you happen to use Debian GNU / Linux, Ubuntu Fedora or any other main stream Linux distribution on your Linux powered Laptop or Tablet you will be surely happy to know about KEuroCalc – Universal Currency Converter. As all "K"-named starting Linux apps unfortunately keurocalc is using QT KDE graphic library and thus whenever used on GNOME it starts a bunch of KDE services (kedinit,klauncher, kded), however the load of this few on any modern notebook or PC is neglectably low so for most users the only disadvantage of kerocalc might be interface is looking a bit different compared to rest of Gnome GTK+ programs.

To install keurocalc on deb based Linuces e.g. – Debian / Ubuntu, ArchLinux ..:

noah:~# apt-cache show keurocalc|grep -i description -A 3

Description: universal currency converter and calculator – binary package
 KEurocalc is a universal currency converter and calculator.
 It downloads latest exchange rates directly from the
 European Central Bank and the Federal Reserve Bank of New York.
 

noah:~# apt-get install --yes keurocalc

Reading package lists… Done
Building dependency tree      
Reading state information… Done
The following NEW packages will be installed:
  keurocalc
0 upgraded, 1 newly installed, 0 to remove and 23 not upgraded.
Need to get 0 B/87.8 kB of archives.
After this operation, 319 kB of additional disk space will be used.
Selecting previously deselected package keurocalc.
(Reading database … 393466 files and directories currently installed.)
Unpacking keurocalc (from …/keurocalc_1.0.3-2_amd64.deb) …
Processing triggers for hicolor-icon-theme …
Processing triggers for man-db …
Processing triggers for menu …
Processing triggers for gnome-menus …
Processing triggers for desktop-file-utils …
Setting up keurocalc (1.0.3-2) …
Processing triggers for menu …

On Fedora, CentOS and rest of RPM based Linux distros keurocalc is installable too out of default package repositories:

[root@fedora ~]# yum -y -q install keurocalc
....

 

Here is a snapshot of keurocalc GUI interface;

Linux Universal Currency Converter Keurocalc

Keurocalc Linux universal currency converter settings screenshot

As you see from settings screenshot, information about rates can be obtained from 2 sources; – European Central Bank and New York Federal Reserve Bank. I give a try also to Euro, no network access (fixed rates only) method but unfortunately by choosing it you can only convert between Fixed Currencies (currencies which are already not in use – in EU member states who dropped their local currencies in favor of EURO).

I've tested the program and it works good, the disadvantage is convertion between some of the World currencies of countries with non-transparent planned (Soviet like) economies for example Belarus is not among app list of convertable currencies.

deb Linux: How to add support for Bulgarian, Russian, Belarusian, Ukrainian, Serbian, Macedonian, Bosnian language cyrillic localization to Xfce, GNOME, KDE Desktop

Monday, March 18th, 2013

If just installed Ubuntu or Xubuntu and choose as a default language English by mistake and you happen to live in Bulgaria, Russia, Ukraine, Belarus or any other cyrillic speaking / writting country and you want to make the desktop graphical environment to display menus in mother language Cyrillic. Here is how;

To add cyrillic localization, native support in GUI environment for major Dsektop Graphic Environments (XFCE, GNOME, KDE …) run in terminal:

For Bulgarian Cyrillic language Desktop support:

linux:~# apt-get install language-pack-bg

Четене на списъците с пакети… Готово
Изграждане на дървото със зависимости      
Четене на информацията за състоянието… Готово
Следните допълнителни пакети ще бъдат инсталирани:
  firefox-locale-bg language-pack-bg-base
Следните НОВИ пакети ще бъдат инсталирани:
  firefox-locale-bg language-pack-bg language-pack-bg-base
0 актуализирани, 3 нови инсталирани, 0 за премахване и 2 без промяна.
Необходимо е да се изтеглят 0 B/1048 kB архиви.
След тази операция ще бъде използвано 3533 kB допълнително дисково пространство.
Искате ли да продължите [Y/n]? Y
Selecting previously unselected package language-pack-bg-base.
(Reading database … 287291 files and directories currently installed.)
Unpacking language-pack-bg-base (from …/language-pack-bg-base_1%3a12.04+20130128_all.deb) …
Selecting previously unselected package language-pack-bg.
Unpacking language-pack-bg (from …/language-pack-bg_1%3a12.04+20130128_all.deb) …
Selecting previously unselected package firefox-locale-bg.
Unpacking firefox-locale-bg (from …/firefox-locale-bg_19.0.2+build1-0ubuntu0.12.04.1_i386.deb) …
Processing triggers for software-center …
Updating software catalog…this may take a moment.
INFO:softwarecenter.db.pkginfo_impl.aptcache:aptcache.open()
Software catalog update was successful.
Инсталиране на firefox-locale-bg (19.0.2+build1-0ubuntu0.12.04.1) …
Инсталиране на language-pack-bg (1:12.04+20130128) …
Инсталиране на language-pack-bg-base (1:12.04+20130128) …
Generating locales…
  bg_BG.UTF-8… up-to-date
Generation complete.
 

Two packages language-pack-bg and language-pack-bg-base packages add to system localization files which in Linux are in the format of .mo files. Here is list of 2 packs file content:

 

linux:~# dpkg -L language-pack-bg

/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/language-pack-bg
/usr/share/doc/language-pack-bg/copyright
/usr/share/doc/language-pack-bg/changelog.gz
/usr/share/locale-langpack
 

 

linux:~# dpkg -L language-pack-bg-base

/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/language-pack-bg-base
/usr/share/doc/language-pack-bg-base/copyright
/usr/share/doc/language-pack-bg-base/changelog.gz
/usr/share/locale-langpack
/usr/share/locale-langpack/bg
/usr/share/locale-langpack/bg/LC_MESSAGES
/usr/share/locale-langpack/bg/LC_MESSAGES/Linux-PAM.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/pidgin.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/findutils.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/mutt.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/help2man.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/pppconfig.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/jade.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/recode.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/wdiff-gnulib.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/software-properties.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/grub.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/cracklib.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/ggzcore.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/libapt-inst1.4.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/system-service.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/gwibber-service-sohu.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/mlocate.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/lynx.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/dnsmasq.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/apparmorapplet.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/gettext-tools.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/binutils.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/hello.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/quota.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/ld.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/libvisual-0.4.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/friendly-recovery.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/gnupg2.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/git-gui.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/bash.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/apturl.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/sharutils.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/ubuntuone-control-panel.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/pulseaudio.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/hello-debhelper.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/hunspell.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/dctrl-tools.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/gwibber-service-sina.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/popt.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/powertop.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/xdiagnose.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/ubuntuone-client.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/debian-tasks.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/nano.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/lvm2.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/ecryptfs-utils.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/duplicity.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/ubuntu-wallpapers.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/dselect.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/debconf.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/mountall.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/JabberBot.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/net-tools.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/apport.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/libidn.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/newt.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/tar.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/gnupg.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/coreutils.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/make.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/libapt-pkg4.12.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/kerneloops.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/ldm.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/ufw.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/pidgin-libnotify.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/pppoeconf.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/acl.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/python-apt.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/gutenprint.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/MoinMoin.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/usbcreator.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/launchpad-integration.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/example-content.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/avahi.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/transmission-gtk.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/xkeyboard-config.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/dpkg-dev.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/libgpg-error.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/human-theme.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/grep.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/sane-backends.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/NetworkManager.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/libvirt.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/ubuntu-sso-client.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/app-install-data.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/dpkg.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/whois.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/system-config-kickstart.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/gprof.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/zeitgeist.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/shared-mime-info.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/virt-manager.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/bison-runtime.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/wget.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/quilt.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/command-not-found.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/jockey.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/attr.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/ltsp-login.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/kcm_gtk.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/alsa-utils.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/aspell.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/fetchmail.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/man-db-gnulib.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/devscripts.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/xscreensaver.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/unity-2d.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/compiz.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/apt.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/gODBCConfig.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/libc.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/plasma_applet_menubarapplet.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/update-manager.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/psmisc.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/screen-resolution-extra.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/unattended-upgrades.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/adduser.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/sysstat.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/checkbox.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/apt-listchanges.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/ubuntuone-installer.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/upstart.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/upower.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/tasksel.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/byobu.mo
/usr/share/locale-langpack/bg/LC_MESSAGES/language-selector.mo
/var
/var/lib
/var/lib/locales
/var/lib/locales/supported.d
/var/lib/locales/supported.d/bg
 

 

Above .mo files are  binary files, generated from plain text .po / .pod files. In free software OS .po files are the most common language translation files, where for each different language a set of .po files exist. Translators usually translate from English to respective language using a GUI text editor called poedit. Once translation is made from those .po files .mo binaries are generated and shipped as localizations for program or group of programs. Below is edit of one of Polish translation of lang file belonging to CUPS Printing service.

poedit gnu linux xubuntu screenshot editing cups .po language plain text file

Once .po files are created, generation of .mo files can be done in various way, however usually Linux system uses msgfmt – (compile message catalog to binary format). In order to generate .mo file out of lets say cups_pl.po;

hipo@linux:~$ msgfmt cups_pl.so
hipo@linux:~$ ls -al *.mo
-rw-rw-r-- 1 hipo hipo 31988 Mar 18 12:38 messages.mo

Anyways, here is how to add Cyrillic support for rest of Major cyrillic speaking countries, issue;

For Russian Cyrillic language Linux Desktop env support;

linux:~# apt-get install --yes language-pack-ru
...

For Belarusian Cyrillic Linux Desktop;

linux:~# apt-get install --yes language-pack-be

For Linux Desktop in Ukrainian;

linux:~# apt-get install --yes language-pack-uk

For Linux Desktop in Serbian language;

linux:~# apt-get install --yes language-pack-sr
...

For Graphic Environment in Macedonian;

linux:~# apt-get install --yes llanguage-pack-mk
...

For Linux GUI in Bosnian;

linux:~# apt-get install --yes language-pack-bs
...

For Kyrgyz language Linux localization;

linux:~# apt-get install --yes language-pack-ky

Whether, you are using Linux Desktop internationalization on some other Cyrillic related language, which I'm missing here please feel free to drop me a comment how you install it? I

 

Linux Mint 14 – “Nadia”: how to Display Trash icon on Desktop

Wednesday, March 13th, 2013

Recently Linux Mint is taking lead among preferred Linux distributions. From my little experience with it mainly installing it on friends PCs I should say Mint develops done a great job to make it more graphically convenient for users migrating from Windows OS.

Though it is generally intuitive, there is one little thing that might be useful for novice Mint user – where from to make Trash icon.

There are two ways to do it.

1. Is by installing / launching gnome-tweak-tool

Linux Mint 12 desktop trashbin screenshot

I personally prefer gnome-tweak-tool, cause it has plenty of nice options related to how GUI environment, behaves. I believe even non Linux-Mint GNOME 3 users should take a look at gnome-tweak-tool if already haven't as it allows user to tailer plenty of desktop nice stuff.

2. Through [Main Menu]

-> Preferences -> Desktop Settings -> Desktop -> Desktop icons

Linux Mint desktop how to visualize trash bin on desktop screenshot

Get more peaceful night sleep on Ubuntu, Mint and Xubuntu Linux using gtk-redshift

Monday, March 11th, 2013

gtk redshift Xubuntu Linux screenshot sleep peacefully when using computer at late

If you want to have more peaceful night sleep when working on Ubuntu or other Debian based Linux distro, be sure to have gtk-redshift installed.
It is a little program that simply changes the color gamma of screen and makes your screen look more reddish at night. According to many scientific research done on how we humans react, whether using computer late at night. It is concluded that less bright colors and especially reddish color gamma relaxes our eye strain and thus makes it easier for us to get a sleep quickly once in bed. gtk-redshift is available in latest Ubuntu 12.04 as well as on other Ubuntu derivatives (Xubuntu, Mint Linux) etc.

Easiest way to install it is via respective GUI Package Manager or via good old Synaptic (GUI aptitude frontend).
I personally prefer to always install Synaptic on new Desktop Linux PCs, use it as package GUI frontend, for the simple reason it offers one very similar "unified" package Installer outlook across different Linux distros.

The quickest way to use GUI version of Redshift is to install with apt:

root@xubuntu:~# apt-get install --yes gtk-redshift
....

To further use it it needs one time to be run with color gamma paraments, launch it first time via terminal with:
user@xubuntu:~$ gtk-redshift  -l 52.5:13.4

It is a good idea to make a tiny shell script wrapper with good settings for gtk-redshift and later use this shell wrapper as launcher :

root@xubuntu:~# echo '#!/bin/sh' >> /usr/local/bin/gtk-redshift
root@xubuntu:~# echo 'gtk-redshift' >> /usr/local/bin/gtk-redshift
root@xubuntu:~# chmod +x /usr/local/bin/gtk-redshift

From then on, to launch it you can directly open it via terminal

user@xubuntu:~$ /usr/local/bin/gtk-redshift

To make the program permanently work, make it run via respective GUI environment startup . In GNOME add it start-up from:

user@xubuntu:~$ gnome-session-manager

Important note to make about gtk-redshift is that on some older monitor screens, very early in morning the screen becomes too red, making screen look like displaying on very old long time used CRT monitors. For people working in fields like; Web Design, Architecture, or any drawing twisted colors effect will be annoying and will probably interfere with your perception of colors. However for programmers, system administrators and people who use computer mainly for typing and reading gtk-redshift is huge blessing.

Enjoy ! 🙂
 

Tracking daily Tasks (Work) with TimeTracker on Debian GNU / Linux with GNOME environment

Thursday, January 31st, 2013

Linux task tracking time and task tracking on Linux desktop Ubuntu Debian Fedora time tracker (hamster) task manager tool

Whether you're a self employed free-lancer, a manager using Linux as a desktop or just a freaky enthusiast concerned of tracking, optimizing and future spending his time efficiently you will definitely need to know of existence of GNOME little tool called Time Tracker.

Time Tracker is installed on Debian GNU / Linux by installing a package hamster-applet.
The Official name under which time tracker is popular is Project Hamster – check out site here.
hamster-applet version installed on my Debian stable Squeeze as of time of writing is a bit obsolete cause Hamster Project Time Tracking tool is official part of GNOME and already Debian Squeeze GNOME version is about 2 years old (still running GNOME 2.30.2).  In future Debian releases and current Debian unstable releases, the package under which it is installed is hamster-time-tracker

Below is package description;

hipo@noah:~$ apt-cache show hamster-applet | grep -i desc -A 7
Description: time tracking applet for GNOME
 Project Hamster helps you to keep track of how much time you spend on various
 activities during the day.  Whenever you move from one task to another, you
 change your current activity in the GNOME applet.
 .
 It can present graphical statistics of how long you have spent on each task,
 and may be useful for project management or keeping employee timesheets.
Homepage: http://live.gnome.org/ProjectHamster
I've not tested it on Fedora and RPM based Linux distributions but I assume there Time Tracker should be installed as part of GNOME.

Hamster Time Tracker can be set as applet in GNOME as well as can be run straight from gnome-terminal with:

$ hamster-standalone

or

$ gnome-time-tracker

Hamster Time Tracker is programmed in Python and uses GNOME GTK2 interface, actually above 2 commands are python scripts.

To use GNOME applet in GNOME2, just add it to GNOME panel by pressing on Panel with right mouse button and selecting;

Add to Panel -> Project Hamster

Below is example, of Time Tracker applet in action. No Activity indicates there is no current started work on Task. It is pretty easy to add new Tasks and bind tags to it. Type Activity (type), the tags and click Start Tracking. Activity is tracked from this moment until stopped.

Hamster time-tracker linux task manager application

Time Tracker supports also Task tagging as well as sorting separate tasks into task Categories, this is done by pressing on little paper with pencil icon located right of each task.

Standalone application hamster-standalone, also has support for statistics, however to generate statistics for your Tasks and work habits you need to use the soft and have data for at least 1 week time. To get statistics follow use menus:

Tracking -> Statistics


It  has also nice Task reporting embedded to get Report through pressing CTRL+0;

Tracking -> Overview

overview Task reporting time tracker Debian Linux

Using Save Report button reports, can be exported to HTML files, so it is quite easily to export statistics over worked time to lets say a Samba Share, or hard disk configured to be visible via WebServer so you can get information about your work efficiency via Web.

Program also supports automatic stop of certain Task tracking in case if computer is inactive for a while. For those who tend to remember what kind of task is active, there is embedded auto reminder timer to set from Preferences

hamster time-tracker preferences screenshot Debian GNU Linux

WorkSpaces
tab from preferences allows configuring Time Tracker to automatically stop / start Task on Switch Workspace action.

Time Tracker is good software for anyone looking for good Task Management (non-centralized) software for Office Company environment working with Free Software. Hamster Project – Time Tracker still lacks support for centralized server reporting auto-upload and multiple employees stats generation however if from multiple computers reports are send to e certain e-mail account to process reports it will be relatively easy and cheap to embed it for multiple Office employees Task Tracking and preparing Employee worked Tasks hours / efficiency in Weekly, Monthly, Quarterly reports. For big projects, where planning and GANTT charts are required it is useful to use reports from Time Tracker together with Linux Project Planning (Microsoft Planner) like tools – Trac, Gantt Project or Task Juggler

 

Linux webcam take pictures from tty console or terminal / How to make pictures of yourself using plain console and web-camera

Saturday, December 15th, 2012

how to take webCAM console / terminal pictures on gnu linux (Debian, Ubuntu, Fedora)

I'm a great command line enthusiast, I share the believe of many other command line geeks thinking keyboard is the quickest way to access a computer. Historically keys were first and mouse second and I think there is definitely a good reason for that. Thus today I was curious if it is possible to take pictures from my external web-camera on my Debian GNU / Linux? I did a quick research and this little article springed out as result.

The answer is YES! It is possible and besides that there are many ways to take a webcamera picture using the console; Lastly it is very easy to achieve even for novice Linux buddies 😉 My little research on the topic show me there are 4 straightforward ways one can use to use his extended or embedded WebCam to take pictuers – using (vlc, mplayer, camshot, fswebcam and ffmpeg).

1. Taking a webcam picture using vlc

Invoke vlc with following arguments:

# vlc -I dummy v4l2:///dev/video0 --video-filter scene --no-audio --scene-path /home/hipo --scene-prefix webcam-taken-picture-prefix --scene-format png vlc://quit --run-time=1

I've prepared a little wrapper script, for the sake of simplifying the long and hard to remember vlc options. Below is the script;

#!/bin/sh
# This little script will take picture whilst in gnome-terminal / mlterm or any console tty
# As program uses vlc you need to have vlc properly configured and installed
# as well as the webcam video be properly working (detected by Linux kernel)
# licensed under GPLv2 script modified by hip0 14.12.2012
# Path where to store taken snapshots
STORE_PATH=/home/hipo
# Device locatation of webcam many webcams have default device in /dev/video0
WEBCAM_DEV=/dev/video0
# Stored grabbed picture filename prefix
FILE_NAME_PREF=image_prefix
# gets the current date and adds to set filename prefix
date_cur=$(date +%k_%d_%m_%Y|sed -e 's/^ *//');
vlc -I dummy v4l2://$WEBCAM_DEV --video-filter scene --no-audio --scene-path $STORE_PATH --scene-prefix $FILE_NAME_PREF.$date_cur --scene-format png vlc://quit --run-time=1
echo "WebCam picture taken and stored in $STORE_PATH/$FILE_NAME_PREF.$date_cur*.png";
echo '';
echo "To view picture in Gnome with Eye of GNOME type: eog $STORE_PATH/$FILE_NAME_PREF.$date_cur*.png";

You can also download copy of the webcam_take_picture_from_console.sh script here.

As you see the script uses, vlc's (dummy interface), and –video-filter-scene option to make the snapshot. The script can be stored in let's say /usr/local/bin/webcam_take_picture.sh and aliased through ~/.bashrc with some short alias, i.e.:

alias console-picture='/usr/local/bin/webcam_take_picture.sh'

Then at any time, when you run console-picture you will have a short way to make pictures of your room, your friends or whatever needed. One good application of script is whether you're in coffee with friends and you want to take a snapshot of them without them realizing (assuming, the webcam is embedded) 🙂

Another great application is whether you want to take a snapshot of the WebCam, from another shell script or little application using dialog ncurses interfaces etc.

Even just for the sake of fun it is so nice to take a picture from webcam, whether in plain tty console bash shell 🙂

One small note to make here is webcam_take_picture_from_console.sh should be run as non-root user (for security reasons vlc developers made smartly VLC this way), running it as root drops an err:

>VLC is not supposed to be run as root. Sorry.
If you need to use real-time priorities and/or privileged TCP ports
you can use /usr/bin/vlc-wrapper (make sure it is Set-UID root and
cannot be run by non-trusted users first).
 

By default, vlc resolution used is the automatically set to the maximum supported to the camera, with mine this is 640×480 SRGB
The quality of pictures taken is a bit low but my camera is a cheap one and even with some GUI program snapshot taking programs like GNOME's cheese, taken pictures are with low quality (though I think the brightnes of the ones taken with vlc is a bit poorer than the ones done with cheese).

Happily it is possible to correct picture brightness and lightning with v42l-ctl (v42l-ctl is not installed by default and on Debian you will have to install deb pack v4l-utils), e.g.:

apt-get install --yes v4l-utils
....

Further, check out the possible options available with:

v4l2-ctl -L - (list all possible options)

and to set a concrete option do:

v4l2-ctl -c <options>=<value> (set an option)
 

I don't have a BSD (FreeBSD, NetBSD, OpenBSD) at hand, but with a working supported Webcam, correct location to the webcam /dev/  and installed VLC from ports :

vlc -I dummy v4l2:///dev/video0--video-filter scene --no-audio --scene-path $STORE_PATH --scene-prefix $FILE_NAME_PREF.$date_cur --scene-format png vlc://quit --run-time=1

should be working fine as well.
If someone has access to a BSD with a working installed webcam, please test it and drop a comment to confirm if working …

2. Creating pictures from WebCamera using mplayer cmd

Theoretically mplayer, should be able to take snapshots from the Cam with:

mplayer -vo png -frames 1 tv://

There is possibility to pass output webcam picture (resolution) dimensions too:

mplayer tv:// -tv driver=v4l:device=/dev/video0:width=320:height=240:outfmt=rgb24 -frames 1 -vo jpeg

 

With my "NoName" (Eltron Technology) webcam the produced images were filled up with solid green color  (maybe due to bug of my webcam used driver). Normally it should be working; I've seen many posts around claiming using both of above cmd lines to produce pictures normally, but not for me.

3. Making pictures with WebCamera (camshot) console tool

I've seen around also another tiny tool (camshot) especially written to take pictures from webcam. The tool is available only to be compiled from source (whether source is fetched through Subversion repo (SVN)). I took a minute to test it as well, e.g.:

 

hipo@noah:~Desktop$ svn checkout http://camshot.googlecode.com/svn/trunk/ camshot-read-only

hipo@noah:~/Desktop/camshot-read-only$ make
....
hipo@noah:~/Desktop/camshot-read-only$ ls
arguments.c  arguments.o  camera.h  camshot  image.h  main.c  Makefile  shmem.h  shmem_test.c
arguments.h  camera.c     camera.o  image.c  image.o  main.o  shmem.c   shmem.o

hipo@noah:~Desktop/camshot-read-only$ ./camshot
Letting the camera automaticaly adjust the picture:..........Done.
Command (h for help): h

Commands:
    x    Capture a picture from camera.
    h    Prints this help.
    q    Quits the program.

Command (h for help): x
Command (h for help): q

 

Don't know why, but for me camshot did not produce, any output picture from webcam. Maybe my Webcam which is a cheap (all OS) compatible one is not detected fine by the tool? As you see from above help output there are not many options so it is definitely something with webcam detection or just it needs some kind of little "hack" in the source to make it working, I was lazy to further investigate so I leave it.

4. Making pictures from terminal using fswebcam

fswebcam is not so popular as vlc and mplayer, but is existent from default repostiries on both Debian and Ubuntu Linuces. Here is it how it is described when pkg info requested with apt-cache:

apt-cache show fswebcam | grep -i descrip -A 8
Description: Tiny and flexible webcam program
 Fswebcam is a tiny and flexible webcam command-line program for capturing
 images from a V4L1/V4L2 device. It accepts a number of formats, can skip
 the first (possibly bad) frames before performing the actual capture, and
 can perform simple manipulation on the captured image, such as resizing,
 averaging multiple frames or overlaying a caption or an image.
Homepage: http://www.firestorm.cx/fswebcam/
Tag: implemented-in::c, role::program

To use it first install it with apt-get or yum (yes it is available also for RedHat based Linux distros via yum).
Depending whether on Debian or Fedora etc. do:

apt-get install --yes fswebcam
.....

or

yum -y install fswebcam
....

fswebcam's syntax is much easier than all of rest cmd tools available around; to create picture from webcam;

# fswebcam -r 640x480 --jpeg 85 -D 1 web-cam-shot.jpg
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
Delaying 1 seconds.
--- Capturing frame...
Captured frame in 0.00 seconds.
--- Processing captured image...
Setting output format to JPEG, quality 85
Unable to load font 'luxisr': Could not find/open font
Disabling the the banner.
Writing JPEG image to 'web-cam-shot.jpg'.

I liked supports, saving in multiple formats, can set resolution and is probably the number 1 choice for anyone looking for high level of customization of cam taken picture.. Saying this I think fswebcam is definitely the tool of choice as it is written with the one and only aim to take webcam pictures from console.

5. Capturing picture from Webcam using ffmpeg

With ffmpeg, there are plenty of things possible;
Just to mention few interesting ones, I've written about earlier, ffmeg is capable of;

convert .OGG vorbis to MP3 
convert .FLV to .AVI and .AVI to .FLV
convert .AVI .MP4 and .FLV to OGG Vorbis (Free Format)
convert .OGG video to .FLV Video
extract sounds / music from .FLV to a MP3 / MP4
Add .SRT and .SUB files subtitles to Flash Videos

Along with all this, interestingly ffmpeg can get content using command line from WebCamera (nomatter if it's a VIDEO stream or just a Picture snapshot).

The syntax to take a picture with it is:

ffmpeg -f video4linux2 -i /dev/v4l/by-id/usb-Etron_Technology__Inc._USB2.0_Camera-video-index0 -vframes 1 output-picture.jpeg

The precise /dev/(v4l – video 4 linux) assigned to different cameras will differ so in order to find what kind of /dev, to use ls it:

# ls -al /dev/v4l/by-id/*

lrwxrwxrwx 1 root root 12 Dec 14 22:40 /dev/v4l/by-id/usb-Etron_Technology__Inc._USB2.0_Camera-video-index0 -> ../../video0

The picture resolution taken on my Eltron Technology Webcam is same like with vlc – the cam optimum 640×480, the quality and brightness gamma is also identical to pics taken using VLC.
 
Therefore if you're wondering if one tool, might make a better pictures from command line than the other the answer, according to my tests is they produce identical quality and all can be customized easily for different set of resolution. It is possible thought, this is not so with other Web Cam models, if you happen to read this post and take the time to try taking pictures with 5 methods and some of the 5 progs is making superior pictures, please drop a comment with the tool you used and the WebCam exact version as detected in dmesg or lsusb

As a sort of Outtro, from purely functional / usability point of view I think fswebcam is probably be the tool of choice for mostly all as it is most simple, easily customizable and especially crafted for creating webcam console shots. That's all Enjoy, taking pics from GUI terminal or console 🙂 

P.S. – I know there are plenty of people who have written on the topic, so this article is nothing new under the sun, but as I couldn't find a post synthesizing in one all of the 5 methods I've come up with this little article. Feedback is mostly welcome
Happy picturing 😉

Save ( Extract ) only images from PDF files on GNU / Linux in console and in GNOME nautilus

Wednesday, November 14th, 2012

extract only pictures / ( images ) from PDF / PDF save only images

Some time ago, I've blogged how it is possible to dump a PDF individual pages into JPG / PNG etc. pics.

Today interestingly, I've learned it is possible to not only dump single or whole PDF document pages into pictures but also to selectively dump only the pictures contained within  PDF file into JPEGs.

Dumping only PDF (contained) images into external JPEG files is doable on GNU / Linux with pdfimages.

1. Extracting pictures from PDF in text console / terminal

pdfimages is part of poppler-utils deb package, if for some reasons you don't have pdfimages on ur system install poppler-utils with;

apt-get install --yes poppler-utils

To extract images of a certain PDF from terminal / console command line it is as simple as:

pdfimages -j pdf-file-name.pdf prefix-of-output-file

pdfimages
will extract all pictures, but bear in mind with some PDF versions it might incorrectly dump some text pages thinking it is pictures too. Also with some PDFs which contain scanned very old paper documents (as pictures) trying to force pdfimages to dump it will just provide you with all pages of the PDF in JPGs. Option -j instructs dumping images from PDF in JPEG picture format, whether the second argument will save pictures in files like: prefix-of-output-file-000.jpg, prefix-of-output-file-001.jpg, prefix..-file-002.jpg etc.

2. Adding GNOME nautilus capability to extract images from PDF files

Enabling extracting images in nautilus is possible with one non-default nautilus plugin  nautilus-scripts-manager

nautilis-scripts-manager is very nice, but I'm sure many Linux users did not know it yet. It makes possible to add any custom shell script that does an opeartion to be visible in nautilus via one extra menu Scripts. As not normally needed on most Linux distributions, it is not installed by default so you have to install it:

noah:~# apt-get install --yes nautilus-scripts-manager

Below is a Screenshot from my nautilus Scripts menu (my locale is in Bulgarian), so Scripts word is in Cyrillic "Скриптове" 🙂

nautilus scripts menu screenshot - allowing users to add custom shell scripts to run in GNOME desktop extract pictures from PDF Linux

After nautilus-scripts-manager is installed. To use it in your user home directory you will have to create ~/.gnome/nautilus-scripts, i.e.

$ mkdir ~/.gnome2/nautilus-scripts

Any script placed inside can be then invoked via the newly appeared nautilus "Scripts" menu. Thus to use extract_images_from_pdfs.sh from GUI place it there.

Download the following extract_images_from_pdfs.sh shell script

$ cd ~/.gnome2/nautilus-scripts
$ wget -q https://www.pc-freak.net/files/extract_images_from_pdfs.sh
$ chmod +x extract_images_from_pdfs.sh

If you prefer to copy paste script content:

$ cat ~/.gnome2/nautilus-scripts/extract_images_from_pdf.sh
#!/bin/bash
# Extracts image files from PDF files
# For more information see www.boekhoff.info
## Added check for $1 existence and $1_images dir
existence check by hip0
# https://www.pc-freak.net/blog/
if [ $1 ]; then
if [ ! -d ./$1_images ]; then
mkdir -p ./"$1_images"
fi
pdfimages -j "$1" ./"$1_images"/PDFimage
gdialog --title "Report" --msgbox "Images were successfully extracted!"
exit 0
fi

 

Well that's all. Once you select a PDF and you click with last mouse button on it selecting Scripts -> extract_images_from_pdf.sh a new directory containing the filename prefix of the selected PDF with _images will appear. For exmpl. if pictures are extracted from PDF named filename.PDF in same directory where the file is present you will get new filename_images folder with all pictures dumped from the PDF.

I've learned about pdfimages existence from Sven Boekhoff's blog which btw has plenty of interesting other stuff

 

Well that's it hope this helps, someone. Comments are welcome 🙂

Make Pulseaudio play multiple sound streams in Gnome 2.26

Friday, September 4th, 2009

I’ve recently upgraded my Debian as you’ve probably red in my previous posts, anyways. I’ve noticed that after the upgrade I couldn’t play parallel sound streams of let’s say rhythmbox and audacious. So logically I started looking for a fix. First I tried to install the paprefs debian package. That nice gtk interface for configuring pulseaudio includes a menu called Simultaneous Output there I’ve ticked the Add virtual output device for simultaneous output on all local sound cards hoping that this would solve my issues. However that was no go, so I googled around looking for a solution and I came upon The following forum thread discussing howto solve the simultaneous sound issues. I tried some of the solutions proposed there and figured out the fix for me. Here is the solution itself: 1. I’ve created .asoundrc file in my home directory ~/.asoundrc containng:

pcm.pulse {
type pulse
}
ctl.pulse {
type pulse
}
pcm.!default {
type pulse
}
ctl.!default {
type pulse
}

I needed to restart my gnome session in order to make the changes in .asoundrc noticeable to pulseaudio although probably simply restarting the pulseaudio server would be a solution that won’t require to restart your current gnome session.Cheers! 🙂
END—–

Debian Linux how to remove Xorg, Gnome / KDE, GDM and other graphical environment packages from a server

Wednesday, October 17th, 2012

Lets say by mistake you install a package and apt installs as a package dependency a whole bunch of Xorg, GDM GNOME 2 / 3 (desktop environment) along with whole other multitude of meta packages just like, lets say xinit , nautilus, totem, gedit,remmina etc.:
Mistakenly installing a graphical environment happens common (at least in my experience as admin happed many, many times). Often installing GUI by mistake is done on already well configured productive server, serving thousand of HTTP, SQL and Mails daily.
Having a started GDM login on the server takes some from the CPU time and also is extends possibilities for security breach to the server, so as always if something is not used it is better to wipe it off …

Here are some apt-get remove commands which will (COMPLETELY) remove Xserver ( Xorg ), Graphical Login Manager (GDM), GNOME desktop environment and their surrounding stuff:


# apt-get remove xorg
# apt-get remove nautilus-data nautilus-sendto libnautilus-extension1
# apt-get remove desktop-base
# apt-get remove python-gnomedesktop
# apt-get remove gdm3
# apt-get remove totem seahorse remmina gedit-common gconf2 epipha gedit-common gconf-defaults-service xauth
# apt-get remove epiphany-browser-data evolution-webcal gconf2
# apt-get remove nautilus-data nautilus-sendto libnautilus-extension1
# apt-get remove x11-common
# apt-get autoremove --purge gnome*

Here something worthy to mention is in Debian and (its deb based linux erivatives including Ubuntu), there are the so called metapackages. For those who don’t know what a meta-package is?; it is a package linked to a group of packages. Actually the meta package itself is a pre-selected Packages ready to install / remove with apt, aptitude or rest of “intelligent” package management utils available for Debian.
Once a meta-package is installed, all linked package dependencies; be it binaries or libraries as well as the proper configurations are downloaded and installed.

Very useful thing hence is listing all install-able metapackages; to list all available metapackages in Debian Linux use:


# apt-cache search metapackage
....

.....
......

As of time of writing this post there are 276 apt installable metapackages existent on Debian Squeeze 6.0.5 Linux:


# apt-cache search metapackage|wc -l
276

Another more general way to see the basic types of metapackages, installable is via tasksel (tasksel is run and used during initial Debian Installer via install CD);
In tasksel, there are few meta-packages; Actually tasksel is very handy for sysadmins who install new servers :). Here is list of available meta-packs through it:


# tasksel --list-tasks
i web-server Web server
u print-server Print server
i dns-server DNS server
u file-server File server
u mail-server Mail server
u database-server SQL database
i ssh-server SSH server
u laptop Laptop
u manual manual package selection
u desktop Graphical desktop environment
i web-server Web server
u print-server Print server
i dns-server DNS server
u file-server File server
u mail-server Mail server
u database-server SQL database
i ssh-server SSH server
u laptop Laptop
u manual manual package selection

It is possible to also view sub-packages contained within, each of tasksel meta-packs, i.e..:


# tasksel --task-packages desktop
twm
eject
openoffice.org
xserver-xorg-video-all
cups-client
openoffice.org-help-en-us
hp-ppd
avahi-daemon
system-config-printer
openoffice.org-thesaurus-en-us
cpufrequtils
myspell-en-us
xdg-utils
pm-utils
cups
cups-bsd
xorg
iceweasel
xserver-xorg-input-all
hplip
desktop-base
alsa-base
libnss-mdns
browser-plugin-gnash
xterm
anacron
alsa-utils
cups-driver-gutenprint
foo2zjs
hpijs
gimp
menu
kerneloops
openoffice.org-gcj
libgl1-mesa-dri
foomatic-db-engine

Actually using tasksel is much more “intelligent” way to remove GNOME, GDM and Xorg from a server. It will completely wipe out everything previously installed for running Desktop Environment on the host.
To remove desktop environment with tasksel:


# tasksel remove desktop

Ncurses progress bar will appear displaying all removed packages …
In my case, during trying to figure out what packages I need to remove ImageMagick as long as few other packages got removed as dependencies so I had to install them over with:


apt-get install --yes imagemagick libice6 php5-imagick libxvmc1 \
libzbar0 libxt6 libsm6 libxres1 libxtst6 libxvmc1 x-ttcidfont-conf libxxf86dga1

For people who need to remove KDE desktop environment from a host to be used as a server, check out KDE meta-packages:


apt-cache search metapackage|grep -i kde

You can remove all KDE related meta-packs within a bash loop, like so:


for i in $(apt-cache search metapackage|grep -i kde|awk '{ print $1 }'); do \
apt-get remove $i; done

It is also usually good idea, once all packages are removed the RC Remove Candidate deb packagse are removed too – if you don’t know what is RC I suggest you read my previous post here

Removing all rc‘s from system can be done with:


# for i in $(dpkg -l | grep -i '^rc' | awk '{ print $2 }'); do \
dpkg --purge $i; \
done

Though, I tested this if you follow my tutorial be careful, something might break and some essenail package or lib for (your custom) services might be removed. Be careful what is offered to uninstall only approve it if you’re 1000% sure; Please don’t count me responsible if apt- removes something which breaks your productive server 🙂