Binary clock on linux terminal

Here is how we can create a binary clock on the Linux terminal. We will need to install the package binclock which can be done in the debian based systems

$ sudo apt-get install binclock

Now launch a terminal and run the command

$ binclock

 photo binclock.png

To understand the output add the option “-n”

$ binclock -n

 photo binclock_2.png

The binary time is in the format HH:MM:SS. The first column represents the first number of HH the second column the second number of HH and so on.

binclock by default provides the output in color which can be turned of by adding the option –color=off

$ binclock –color=off

 photo binclock3.png

Category: Linux | Comments Off on Binary clock on linux terminal

Creating pencil sketch of an image in linux using pinta

Here is how we can create the pencil skethc of any image using the software pinta in linux.

If you do not have pinta installed, you can install it using the package manager. In debian based systems we can run

apt-get install pinta

Now launch pinta, In debian it would be listed under Applications->graphics, might be different for other distros.

Now click on

file->open

 photo open.png

Browse the image for which the pencil sketch is need to be made, and click on open. Let us take the image of our beloved tux for creation of a pencil sketch.

 photo tux.png

Now click on

Effects->Artistic->Pencil Sketch.

 photo menu.png

The following menu will pop.

 photo pencil_menu.png

Pencil tip size: Higher this value more dark the image looks.
Color range: Higher the value more mix of white and balck will appear in the image.

As the change in these options are done, the changes in the image can be seen in the backgroud. Which ever values are satisfctory click ok for those and the pencil sketch image is ready. Here is the pencil sketch image of tux.

 photo tux_pencil.png

Category: Linux | Comments Off on Creating pencil sketch of an image in linux using pinta

10pt loadable: Metric (TFM) file not found

While using latex in debian 6.0 we might come across the following error.

10pt loadable: Metric (TFM) file not found

This is because the font the latex is trying to use is not installed in the system

The workaround for the problem is to install the package

texlive-fonts-recommended

In debian we can do it using the command

$ sudo apt-get install texlive-fonts-recommended

After installing the package the above error should not appear while using latex.

Category: Linux | Comments Off on 10pt loadable: Metric (TFM) file not found

searching in pdf files using grep : pdfgrep

Just as we use grep to search for patterns in a text file we can use pdfgrep to search for strings in a pdf file. In debian based systems we can install the package from the package manager or from the terminal using

sudo apt-get install pdfgrep

Once installed we can use this command from the terminal to search for the strings in pdf files. The syntax for use of the command is

$ pdfgrep [option]

Let us say we are searching for string “ioctl” in a pdf file name ch03.pdf (which is the third chapter from Linux device drivers book) .

$ pdfgrep ioctl ch03.pdf int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long); The ioctl system call offers a way to issue device-specific commands (such as formatting a track of a floppy disk, which is which is neither reading nor writing). Additionally, a few ioctl commands are recognized by the kernel without referring to to the fops table. If the device doesn’t provide an ioctl method, the system call returns an error for any request that method, the system call returns an error for any request that isn’t predefined (-ENOTTY, “No such ioctl for device”). = scull_llseek, .read = scull_read, .write = scull_write, .ioctl = scull_ioctl, .open = scull_open, .release = scull_release, .read = scull_read, .write = scull_write, .ioctl = scull_ioctl, .open = scull_open, .release = scull_release, }; check this field for read/write permission in your open or ioctl function, but you don’t need to check permissions for read or by changing both the current and default values using ioctl at runtime. Using a macro and an integer value to allow both in ) here, and the rest in the section “Using the ioctl Argument” in Chapter 1; they use some special,

It lists out all the lines that contain the string “ioctl”. To make the output look more easier to read we can prefix each line with the page number on which it occurs using the option “-n”.

$ pdfgrep -n ioctl ch03.pdf 10: int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long); 10: The ioctl system call offers a way to issue device-specific commands (such as formatting a track of a floppy disk, which 10: is neither reading nor writing). Additionally, a few ioctl commands are recognized by the kernel without referring to the 10: to the fops table. If the device doesn’t provide an ioctl method, the system call returns an error for any request that 10: the system call returns an error for any request that isn’t predefined (-ENOTTY, “No such ioctl for device”). 12: .llseek = scull_llseek, .read = scull_read, .write = scull_write, .ioctl = scull_ioctl, .open = scull_open, .release = 12: .read = scull_read, .write = scull_write, .ioctl = scull_ioctl, .open = scull_open, .release = scull_release, }; 12: check this field for read/write permission in your open or ioctl function, but you don’t need to check permissions for 21: or by changing both the current and default values using ioctl at runtime. Using a macro and an integer value to allow 23: in ) here, and the rest in the section “Using the ioctl Argument” in Chapter 1; they use some special,

If we want to count the number of occurrences instead of viewing the lines on which they appear we can use the option “-c”

$ pdfgrep -c ioctl ch03.pdf 10

We can also prefix each line of output with the name of the file in which the line appears, which is useful when searching in multiple files, by using the option -H.

Category: Linux | Comments Off on searching in pdf files using grep : pdfgrep

Installing xfce on debian

The debian distros by default come loaded with gnome desktop, but with the freedom available in linux that does not prevent us from trying other desktop environments on debian.

One of the popular Desktop Environments XFCE, known to run well is lower hardware configurations. (http://xfce.org)
This can be installed in debian just like installation of any other package.

Open the synaptic package manager search for xcfe4 ( or which ever version is available in the distro) , click on mark for installation and then click on apply.

or Open the terminal and type

$ sudo apt-get install xfce4

Once the installation is done,logout of the the current gnome session.
In the login screen click on the user account for login.

At the bottom center there will be three options, the language, the country and the third the Desktop environment to be used. Click on xcfe and login.
The desktop will boot into the new xfce environment.

Category: Linux | Comments Off on Installing xfce on debian

Creating fire animation using gimp in linux

Here are the steps to create an animation, using gimp, as if an image is on fire as shown below.

To be able to create the animation we will need gimp along with the additional gimp packages, i.e. gimp animation packages gimp-gap and gimp-plugin-registry . To install these extra packages in debian based systems run the command

sudo apt-get install gimp-gap sudo apt-get install gimp-plugin-registry

Note: In the post we will add the fire effect to the image of a logo the same can be done to any other image.

Once the installation is successful, launch gimp and go to

file->create->logos->BasicII

Type the text for which the fire animation has to be added, we have used the text Fire. Choose any color of your preference.

We should see a window as below.

Now click on one of layers to which the animation has to be added and go to

Fx-Foundry->animaton->Fire animaton

In the menu that is shown we can choose

How many frames of fire animation has to be added, more the number of frames more detailed the fire will look

Overlap flames: How many frames of fire flames will overlap with each other.

Gradient: The color of the flames

Framerate: How fast should the flames appear, smaller the number faster the flames will appear

Angle: The angle of the flames

Distance: How high should the flames be, bigger the number higher the flames, hence the fire appears bigger.

Background: The image on which the flames should appear.

Now click OK and wait for gimp to do its magic. Once done, we should see a new window as below.

To see the animaton in a preview click on filter->animation->playback

Click on the play icon to see the animation.

If it is satisfactory then close the preview and save the animation by clicking

file->save as

Enter a file name with .gif as extension and from the file type options at the right bottom choose .gif and click on save.

A prompt will be shown confirming whether we need to save the file as animation or single image, select save as animation and click on “Export”

In the next window we can choose whether the animation should run once or continously by checking the loop forever box.We can also specify the delay between frames in case it is not mentioned in the layer attributes.

Now click on save. The fire animated image should be ready to use.

Category: Linux | Comments Off on Creating fire animation using gimp in linux

Creating fire animation using gimp in linux

Here are the steps to create an animation, using gimp, as if an image is on fire as shown below.

To be able to create the animation we will need gimp along with the additional gimp packages, i.e. gimp animation packages gimp-gap and gimp-plugin-registry . To install these extra packages in debian based systems run the command

sudo apt-get install gimp-gap sudo apt-get install gimp-plugin-registry

Note: In the post we will add the fire effect to the image of a logo the same can be done to any other image.

Once the installation is successful, launch gimp and go to

file->create->logos->BasicII

Type the text for which the fire animation has to be added, we have used the text Fire. Choose any color of your preference.

We should see a window as below.

Now click on one of layers to which the animation has to be added and go to

Fx-Foundry->animaton->Fire animaton

In the menu that is shown we can choose

How many frames of fire animation has to be added, more the number of frames more detailed the fire will look

Overlap flames: How many frames of fire flames will overlap with each other.

Gradient: The color of the flames

Framerate: How fast should the flames appear, smaller the number faster the flames will appear

Angle: The angle of the flames

Distance: How high should the flames be, bigger the number higher the flames, hence the fire appears bigger.

Background: The image on which the flames should appear.

Now click OK and wait for gimp to do its magic. Once done, we should see a new window as below.

To see the animaton in a preview click on filter->animation->playback

Click on the play icon to see the animation.

If it is satisfactory then close the preview and save the animation by clicking

file->save as

Enter a file name with .gif as extension and from the file type options at the right bottom choose .gif and click on save.

A prompt will be shown confirming whether we need to save the file as animation or single image, select save as animation and click on “Export”

In the next window we can choose whether the animation should run once or continously by checking the loop forever box.We can also specify the delay between frames in case it is not mentioned in the layer attributes.

Now click on save. The fire animated image should be ready to use.

Category: Linux | Comments Off on Creating fire animation using gimp in linux

Steam For Linux Now Available To All Users

Steam for Linux screenshotValve has just announced that Steam for Linux (beta) is now available to all Steam users, just in time for the Steam Winter sale which starts today:
The Steam for Linux beta client is now available to all Steam users, so if you’ve been patiently waiting for an invitation to join us, consider yourself officially invited!

With a growing catalog of Linux-supported games, an active Steam for Linux community group, and a new GitHub bug reporting repository, the timing’s right to jump in and share your feedback.
If you’ve already downloaded and installed Steam for Linux beta, you should redownload and install the latest deb available on its website, because Steam now has its own Ubuntu repository that’s going to be used for updates. Well, at least in theory, because as soon as I’ve installed the new deb and launched Steam, it started to download an update through the client.
Supported games include Serious Sam 3: BFE, Team Fortress 2, Killing Floor and others. For a list of games supported by Steam for Linux, see THIS page.

Steam for Linux Ubuntu window borders
In other Steam-related news, a recent Steam client update brought Joystick hotplug and multi-monitor support. Oh, and the Steam Skin Manager about which we’ve written a few days ago, has added an option to use native window borders for Steam (screenshot above).

Download Steam for Linux

Ubuntu / Debian / Linux Mint, etc.: Download Steam for Linux beta (deb). The deb is for 32bit but it works on 64bit because Ubuntu supports multi-arch.

The Steam download page should automatically detect your OS and offer a deb file for download but in case that doesn’t work properly, here’s a direct Steam deb download link.
If you can’t install Steam using Ubuntu Software Center, place the Steam deb file in your home directory, open a terminal and copy/paste the following command:sudo dpkg -i steam_latest.deb
The GPG key for the Steam Ubuntu repository isn’t added when installing the deb package, so you might get an error like the one below when running an update:
W: GPG error: http://repo.steampowered.com precise InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY F24AEA9FB05498B7
To fix this, run the following commands in a terminal:
sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys F24AEA9FB05498B7
sudo apt-get update
Also see the getting started with Steam instructions @ Ubuntu wiki.

If you get a dependency error when trying to install the Steam deb in Debian, try THIS.

While Steam is officially supported only on Ubuntu, it can be installed in other Linux distributions such as Arch Linux, Fedora, Fuduntu, Gentoo and others:
– Arch Linux: Steam is available in AUR.

– Fuduntu: install Steam using: “beesu yum install steam”.

– Gentoo: instructions for installing Steam, HERE.

– openSUSE, Fedora and Mandriva users can grab Steam rpm (there are also Fedora packages) from HERE.

Originally published at WebUpd8: Daily Ubuntu / Linux news and application reviews.



Category: Ubuntu | Comments Off on Steam For Linux Now Available To All Users

Download Steam For Linux Skin Manager (Includes Ambiance And Radiance Skins)

Martin Kozub, who has created the first Ubuntu-like skin for the Steam Linux client, has released a simple Skin Manager for Steam (obviously, for the Linux client) which you can use to install or remove skins.
Steam Skin Manager (for Linux)

Steam Skin Manager comes with two skins by default: Ambiance and Radiance which make Steam look close to the default Ubuntu themes. Using them, you’ll get Steam to use the Ubuntu font, thin scrollbars, Ubuntu (Humanity) back and forward arrows, native-looking window buttons displayed on the left and other tweaks. Also, the font should look better using one of these skins.

Steam for Linux - Ambiance SkinAmbiance skin for Steam

Steam for Linux - Radiance SkinRadiance skin for Steam
To use it, close Steam, then launch Steam Skin Manager from the menu / Dash, and select the skin to install: Ambiance or Radiance or install a different skin (here’s an elementary skin). You can also remove the skin that’s currently in use.
Update: Steam Skin Manager can now get Steam for Linux to use native window borders. To get native window borders (re-download and re-install the deb below if you’ve installed a previous version), launch “Steam wb” from Dash / menu, instead of the regular “Steam” launcher:
Steam Native window borders Ubuntu

Download Steam Skin Manager
(deb – available for Debian, Ubuntu, Linux Mint, etc.)
Update: Arch Linux users can install Steam Skin Manager via AUR.

For manual skin installation instructions, see: Steam For Linux: Download The First Ubuntu-Like Skin

If you haven’t installed Steam for Linux (beta) yet, download it from here.

Originally published at WebUpd8: Daily Ubuntu / Linux news and application reviews.



Category: Ubuntu | Comments Off on Download Steam For Linux Skin Manager (Includes Ambiance And Radiance Skins)

How To Get A Global Menu In MATE Desktop

MATE Desktop GlobalMenuMATE GlobalMenu is an applet forked from the old GNOME2 GlobalMenu project, which adds a global menu to the MATE panel.
Mate GlobalMenu is based off the upstream GNOME GlobalMenu v0.7.10 and it only supports GTK2 applications, so don’t expect Firefox, LibreOffice or Qt applications to work with this, but it’s nevertheless an useful addition to the MATE desktop, especially for small screens.
The applet comes with various options:
show the active application icon and/or application titledisplay the menu both on the panel and inside the application window;a “tiny” mode;enable/disable F10 key to access the menu;more.
According to its GitHub page, the applet is supposed to work with the latest stable MATE v1.4 and I can confirm that it works as I’ve tested it with Linux Mint 14 MATE (with MATE 1.4). According to some of our readers (see the comments), it does not work with Linux Mint 13 due to some missing dependencies.

Install MATE GlobalMenu in Ubuntu / Linux Mint MATE / LMDE
MATE GlobalMenu comes with a repository available for LMDE which works with Ubuntu 12.10 or Linux Mint 14 MATE (it doesn’t work with Linux Mint 13, at least not with the default repositories). However, the repository is unfortunately only available for 64bit! To add it and install MATE GlobalMenu, use the following commands:wget http://jas.gemnetworks.com/jasmineaura.gpg.key -O- | sudo apt-key add –
echo “deb http://jas.gemnetworks.com/debian debian main” | sudo tee /etc/apt/sources.list.d/mate-globalmenu.list
echo “deb-src http://jas.gemnetworks.com/debian debian main” | sudo tee -a /etc/apt/sources.list.d/mate-globalmenu.list
sudo apt-get update
sudo apt-get install mate-globalmenu
Arch Linux users can install MATE GlobalMenu via AUR.

For Ubuntu 12.04 / Linux Mint 13 or other Linux distributions, you’ll have to compile it from source. See the MATE GlobalMenu GitHub page for more info and source code.

Important:

Once installed, reload the MATE panels:
killall mate-panel
Then add the MATE GlobalMenu applet to the panel and enable the applet using the following command:
mateconftool-2 –set /apps/mate_settings_daemon/gtk-modules/globalmenu-mate-panel –type bool true
And then log out and log back in to avoid some crashes that might occur (those errors only show up when enabling the applet, after the logout it should work as expected) and also to get the applet preferences to work, or else you’ll get an empty preferences dialog.

thanks to lffl.org for the info!

Originally published at WebUpd8: Daily Ubuntu / Linux news and application reviews.



Category: Ubuntu | Comments Off on How To Get A Global Menu In MATE Desktop