Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Thursday, March 13, 2014

Ubuntu: How to enable spellchecker in LyX

  1. Open the Terminal and install Enchant.
    sudo apt-get install enchant
  2. Open LyX and select Tools > Preferences > Language Settings > Spellchecker
  3. Select Enchant for Spellchecker Engine.
  4. Click on Apply, Save and finally Close.

Wednesday, March 12, 2014

Ubuntu: Missing Date and Time (Clock) in the Indicator Bar

sudo apt-get install indicator-datetime
sudo dpkg-reconfigure --frontend noninteractive tzdata
killall unity-panel-service

Monday, April 8, 2013

Enable Backspace Feature in Firefox on Ubuntu

In order to enable backspace keypress to make Firefox go back one page on Ubuntu:

  1. Launch Firefox browser.
  2. Type about:config in the address bar.
  3. Search for browser.backspace_action and set its value to 0 instead of 2.

Saturday, April 6, 2013

Ubuntu: Run Matlab in Terminal

In order to run Matlab in Terminal, add -nodesktop option.

matlab -nodesktop

Sunday, March 17, 2013

Ubuntu: How to Convert FLV file to MP3 Using ffmpeg

We can download video in FLV format from YouTube using Flashgot Add-On on Firefox web browser.

In order to extract the MP3 from the FLV video file, please follow the following procedure.

First, install ffmpeg software:

sudo apt-get install ffmpeg

Once ffmpeg is installed, convert FLV file to MP3 using the following command:

ffmpeg -i flv_file.flv output_file.mp3

Ubuntu: Install Adobe Reader

sudo add-apt-repository "deb precise partner"
sudo apt-get update
sudo apt-get install acroread

Monday, March 4, 2013

Ubuntu: Install C++ Boost

Command to install C++ Boost packages:

sudo apt-get install libboost-dev libboost-doc

Saturday, January 15, 2011

How to run Java class file on Ubuntu

Let say you compile the following Java codes
public class hello {
    public static void main(String[] args) {
using the following command:
You will get a class file `hello.class`.

However, when you try to run the Java class file using
java hello

like you usually did on Windows, it won't run.
Exception in thread "main" java.lang.NoClassDefFoundError: hello Caused by: java.lang.ClassNotFoundException: hello at$ at Method) at at java.lang.ClassLoader.loadClass( at sun.misc.Launcher$AppClassLoader.loadClass( at java.lang.ClassLoader.loadClass( Could not find the main class: hello. Program will exit.
Actually, to run Java class file on Ubuntu, you need to always specify the classpath, using the `-cp` options.

As an example,
java -cp . hello

The `.` means the current working directory. In other words, you are telling Java to look for `hello class` in the same directory that you invoke the `java` command.

You can also add the current directory to the CLASSPATH, like this:
If you don't like to do that each time you want to run a Java class file, you can set the CLASSPATH permanently in /etc/environment or in ~/.profile.

Wednesday, February 3, 2010

How to configure Pidgin for Google Talk

Pidgin is an easy to use and free chat client that can connect to many chat networks all at once. The supported chat networks are AIM, Bonjour, Gadu-Gadu, Google Talk, Groupwise, ICQ, IRC, MSN, MySpaceIM, QQ, SILC, SIMPLE, Sametime, XMPP, Yahoo! and Zephyr.

But, sometimes Pidgin just don't work with Google Talk. You need to tweak Pidgin in order to make it works.

Here are the steps (as shown in Figure 1):
  1. Click on Account > Manage Accounts, add new Google Talk account. Fill in the Username and Password.
  2. Click to the Advance tab.
  3. Make sure that "Require SSL/TLS" and "Force old (port 5223) SSL are selected.
  4. Type 443 for "Connect port".
  5. Type "" for "Connect Server".
  6. Click on the "Save" button.
Pidgin should now works with Google Talk. By the way, I also figured out that sometimes I need to remove these settings, in order to connect to Google Talk, when I move to different place.

Thursday, November 5, 2009

Ubuntu: Restore panels to default settings

How to restore panels on Ubuntu?

Step 1:

Delete current panel settings.
rm -rf ~/.gconf/apps/panel

Step 2:

Restart the Gnome panel.
pkill gnome-panel
As an alternative, just restart the computer.

Monday, October 26, 2009

Change file format (Dos/Unix) in Vim

Unix and dos (Windows) use different file format. Even though the latest Vim can detect the file format automatically, sometimes you also need to convert your file to the other format, especially if you are sharing the file with your friends.

Fortunately, in vim you can set the file format using a very simple command.

Change the file format to dos

:set ff=dos

Change the file format to unix

:set ff=unix


You can also add those commands in .vimrc file to make Vim starts with the desired format of file.

Prayer times software for Ubuntu

Minbar Prayer Times is a free prayer times software for linux.

Installing Minbar on Ubuntu is easy.
$ sudo apt-get install minbar
After the installation process, you can start Minbar Prayer Times from the Accessories menu.

Minbar Prayer Times
To set the location, click on Preferences, and under the City Details tab, click on "Find City". You should find your city there. If your city is not available, you can find the latitude and longitude via, and enter it manually.

If you can suggest other free prayer times software for Ubuntu, please leave a comment.

Monday, October 12, 2009

How to install GIMP for Linux

These are the commands to install GIMP on various Linux flavour from the distribution package.


apt-get install gimp


yast -i gimp


yum install gimp


urpmi gimp

Saturday, October 3, 2009

How to upgrade Ubuntu 9.04 to 9.10

To upgrade Ubuntu 9.04 to 9.10 is easy.

First, press Alt+F2 to get the "Run Application" (Figure 1). Type in
update-manager -d

and, click Run. 
Figure 1: Run Application
Finally, click Upgrade on "Update Manager" (Figure 2).
Figure 2: Update Manager

Wednesday, September 30, 2009

How to change Shiretoko codename to Firefox

Shiretoko is the development codename for Firefox 3.5.x.

To change the User-Agent identification to Firefox,

  1. Enter about:config in the address bar.

  2. Enter general.useragent.extra.firefox in the field at the top.

  3. Change its value from Shiretoko/3.5.4pre to Firefox.

Friday, September 18, 2009

LaTeX editor with live preview pane for Ubuntu/Linux

Gummi is a lightweight LaTeX editor written in Python/GTK+ released as open-source software under a dual MIT/Beerware license, and was written by a BSc student of Artificial Intelligence at the University of Amsterdam, Alexander van der Mey.

The main feature of Gummi is that the Preview Pane will update as you are typing. In my opinion, this feature is good if you are learning LaTeX.

Give Gummi a try, and tell me your opinion.

Click here to download.

Thursday, September 17, 2009

Resize image using Imagemagick

Imagemagick is a powerful image manipulation program. This tutorial is about resizing image with Imagemagick.

Resize an image to 500px width.
mogrify -resize 500 image.png

Resize an image to 500x300, with aspect ratio preserved.
mogrify -resize 500x300 image.png

Force resize an image to 500x300.
mogrify -resize 500x300! image.png

Resize multiple images.
mogrify -resize 500x300 *.png

How to install Debian packages (.deb files) on Ubuntu

The most easiest way to install a debian packages on Ubuntu, is by double click on the .deb file, and then select Install Package.

However, you could also install a debian package by using a terminal using this command:
sudo dpkg -i package_file.deb

To uninstall, use this command:
sudo dpkg -r package_name

Monday, September 14, 2009

One line command to update Ubuntu

I use this command to update my Ubuntu installation.
$ sudo apt-get update && sudo apt-get upgrade &&
sudo apt-get autoremove && sudo apt-get dist-upgrade

Monday, August 24, 2009

How to determine the linux distribution name or version

There are multiple ways to check what linux distribution and version you are using.

Here are some of them.
$ cat /etc/issue
Ubuntu 9.04 n l
$ uname -a
Linux riza-laptop 2.6.28-15-generic #49-Ubuntu SMP Tue
Aug 18 19:25:34 UTC 2009 x86_64 GNU/Linux
$ lsb_release -d
Description: Ubuntu 9.04