Category Archives: Ubuntu 10.04

Terminate unresponsive programs on Ubuntu

Xkill is part of the X11 utilities pre-installed in Ubuntu and a tool for terminating misbehaving X clients or unresponsive programs. You can easily add a shortcut key to launch xkill with the steps below:
– Go to System > Preferences > Keyboard Shortcuts.
– Click the Add button to create a custom shortcut.
– Enter xkill to both the Name and Command boxes and click the Apply button.
– Click on Disabled at the xkill row in the Keyboard Shortcuts window (Disabled is then changed to New shortcut…).
– Press a new key combination, e.g. Ctrl+Alt+X (New shortcut… is then changed to Ctrl+Alt+X).
– Click the Close button.
Xkill is ready for use. Press the above key combination to turn the cursor to an X-sign, move the X-sign and drop it into a program interface to terminate the unresponsive program, or cancel the X-sign with a right-click. AddThis

Changing the default text editor on Ubuntu

There is a few software that will use the editor command to find out what text editor to use. Example commands will be dch to add a new .deb changelog entry, revision control softwares when prompting for commit a message …
There is basically 2 ways for changing the default editor:

1. System Wide
Run Terminal and type:
$ sudo update-alternatives –config editor
And then choose whichever editor you want to be default.

2. User Level
As a user, you cannot change the setting for the whole system, but you can add an alias for editor to let say vim.
Open and edit ~/.bashrc and add:
alias editor=vim
Next time you will open a bash prompt, your default editor will be vim. AddThis

Auto Mount Drives at System Startup on Ubuntu

Ubuntu is capable of reading and writing files stored on Windows formatted partitions, but partitions must be ‘mounted’ before they can be accessed each time you start up the system. With these steps, you can auto mount the drives or partitions without the need to manually mount them for access.
Install Storage Device Manager if it has not been added.
– go to Applications (or Main Menu) > Ubuntu Software Center.
– enter pysdm in the Search Box.
– select Storage Device Manager, click the “Install” button.
– go to System > Administration > Storage Device Manager.
– extend the list of sda and select the sda you want to auto mount, click ‘OK’ to configure.
– click the “Assistant” button.
– uncheck “Mount file system in read only mode” and keep “The file system is mounted at boot time” checked.
– click the “Mount”, “Apply” then “Close” button, and restart the system.
In case you wish to remove the auto-mount of a certain drive or partition, you can similarly use Storage Device Manager to do the setting.

Note: If you need to identify disk partitions by label, paste ls /dev/disk/by-label -g in Terminal, or to view partition sizes and file systems, enter sudo fdisk -l. Disk Utility mentioned in “Name or Label a Partition” also gives you a glance of device numbers, partition types, sizes and labels. AddThis mp3 link

Enable Windows 7 Aero Snap in Ubuntu

In Windows 7, you can click and drag a window to the left or right edge of the desktop and it will fill half of the screen, or snap a window to the top edge of the desktop and it will be maximized.

In Ubuntu, you can click and drag a window to the left, right or top edge of the desktop to achieve the same result.

In addition to CompizConfig Settings Manager, install WmCtrl if not added:
– go to Applications (or Main Menu) > Accessories > Terminal.
– enter sudo apt-get install wmctrl
– enter password when prompted.
– go To System > Preferences > CompizConfig Settings Manager.
– select “General” from the left panel and click “Commands”.
In Command line 0, 1 and 2, paste the following codes:

Command line 0, paste:

WIDTH=`xdpyinfo | grep ‘dimensions:’ | cut -f 2 -d ‘:’ | cut -f 1 -d ‘x’` && HALF=$(($WIDTH/2)) && wmctrl -r :ACTIVE: -b add,maximized_vert && wmctrl -r :ACTIVE: -e 0,0,0,$HALF,-1

Command line 1, paste:

WIDTH=`xdpyinfo | grep ‘dimensions:’ | cut -f 2 -d ‘:’ | cut -f 1 -d ‘x’` && HALF=$(($WIDTH/2)) && wmctrl -r :ACTIVE: -b add,maximized_vert && wmctrl -r :ACTIVE: -e 0,$HALF,0,$HALF,-1

Command line 2, paste:

wmctrl -r :ACTIVE: -b add,maximized_vert,maximized_horz

In the same window, click “Edge Bindings” tab.
Change Run Command 0, 1 and 2 from “None” to “Left”, “Right” and “Top” respectively.
Click “Back” button and select “General Options”, change “Edge Trigger Delay” to about 500. AddThis mp3 link

Name or Label a Partition using Ubuntu

Nautilus file manager shows the root directory as File System for your Ubuntu system partition. If you have other partitions (or volumes), it shows them as xx GB Filesystem if they’re not named or labelled.
Using Disk Utility is one of the effective ways to name a partition easily:
– go to System > Administration > Disk Utility
– select the item Hard Disk.
In the Volumes section, click a partition you want to label then:
– click “Edit Filesystem Label” (Note 1)
In the Label box, enter a name, e.g. Data-Disk, and click Apply.
The file manager should now show the partition label, such as Data-Disk, instead of xx GB Filesystem.

Note 1: If the option for “Edit Filesystem Label” is not shown, click “Unmount Volume” before hand. In case you can’t unmount a volume, try Storage Device Manager to unmount it. See Auto Mount Drives at System Startup.

Note 2: This tip is for naming a partition using Disk Utility, use other advanced features such as format, edit or delete partition with caution as they can delete data on your disk. AddThis mp3 link

Set your Ubuntu Desktop Fully Transparent Panel

When you set the panel to be transparent in the default Ambiance theme in Ubuntu 10.10 or 10.04, you will find that some panel items’ backgrounds are not transparent, but you can make them transparent and consistent with others, following these steps:
– Go to Applications (or Main Menu) > Accessories > Terminal.
– Enter: cp -R /usr/share/themes/Ambiance ~/.themes/
– Enter: gedit ~/.themes/Ambiance/gtk-2.0/apps/gnome-panel.rc (for Ubuntu 10.10) OR gedit ~/.themes/Ambiance/gtk-2.0/gtkrc (for Ubuntu 10.04), to open the file with gedit.
– Search for this line bg_pixmap[NORMAL] = “img/panel.png” (for Ubuntu 10.10) OR bg_pixmap[NORMAL] = “panel_bg.png” (for Ubuntu 10.04)
– Comment out the line by placing a # at the beginning of the line, like this: #   bg_pixmap[NORMAL] = …
– Save the file.
– Go to System > Preferences > Appearance, switch to the other theme and then back to the Ambiance theme.
Note: If you’d like to change to the Radiance theme, replace Ambiance with Radiance in the above command lines, but you’d like to change to the New Wave theme, then enter: cp -R /usr/share/themes/”New Wave” ~/.themes/ in step 2, enter gedit ~/.themes/”New Wave”/gtk-2.0/gtkrc in step 3, search for and comment out this line bg_pixmap[NORMAL] = “Images/Panel/PanelBarLong.png” in steps 4 and 5 respectively. AddThis mp3 link

Maximize internet speed connection in Ubuntu via sysctl

Do you want to maximize your bandwidth? Here are few important settings you should do to speed up your internet and it works in Ubuntu and all Linux operating system via sysctl.
First open a Terminal via Applications->Accessories->Terminal
Type:

sudo gedit /etc/sysctl.conf

Then Paste the Following at the end of the file:

# increase TCP max buffer size setable using setsockopt()
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
# increase Linux autotuning TCP buffer limits
# min, default, and max number of bytes to use
# set max to at least 4MB, or higher if you use very high BDP paths
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
# don’t cache ssthresh from previous connection
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_moderate_rcvbuf = 1
# recommended to increase this for 1000 BT or higher
net.core.netdev_max_backlog = 2500
# for 10 GigE, use this, uncomment below
# net.core.netdev_max_backlog = 30000
# Turn off timestamps if you’re on a gigabit or very busy network
# Having it off is one less thing the IP stack needs to work on
#net.ipv4.tcp_timestamps = 0
# disable tcp selective acknowledgements.
net.ipv4.tcp_sack = 0
#enable window scaling
net.ipv4.tcp_window_scaling = 1

Press Ctrl-S to save, then alt-F4 to exit and then type:

sudo sysctl -p

to apply the settings.

Now, check your speed using speed-test site or download files in the net.

You can disable all these settings by removing these lines you added via:

sudo gedit /etc/sysctl.conf

AddThis mp3 link

Rediscover Prism by Mozilla (Ubuntu, MAC and Windows tips)

In 2007, when Prism was launched, there were some enthusiastic reviews about this application. Then the widget era began and Prism popularity decreased. Anyway, Prism is still a powerful application for all that people who desire to run their more often used web application saving RAM and CPU resources. Prism, based on XULRunner, is multi platform, easy to use and very flexible. To use it on Ubuntu you can launch the Terminal and type:

sudo apt-get install prism

or using the Synaptics Package Manager (System —> Administration —> Synaptics Package Manager). Then go to Applications —> Internet —> Prism and a small windows appears. Now, fill in all the required information: the web application URL, the name you prefer, settings and do not forget to click on the Desktop shortcut option. At this point you will find a new rough icon on your Desktop with the name you chose. The first time you use it, with the right mouse button click on it and go to Properties —> Permissions and Allow executing file as program. If you want to change the icon you have to click on it (with the right mouse button), go to Properties —> Basic and choose your favorite icon clicking the icon on the upper left corner. If all are steps are annoying for you, it is possible to use Prism as add-on for Firefox. In this case, on Firefox, go to Tools —> Add-ons —> Get Add-ons and type Prism on the search bar. You will install Prism as a simple add-on for Firefox. Now, you can automatically generate a Prism application just clicking on Tools —> Convert Website to  Application when you are in the web application page.

On Windows or MAC we suggest to download the standalone package directly from the official web page or install Prism as Firefox add-on following the same steps we described for Ubuntu. If you use the Prism standalone package you have to decompress it in your favorite location. For Windows users: when you set up a new Prism application, try the tray menu option but do not forget to click on the Desktop shortcut or you will not be able to find again the application after you close it.

In my experience, Prism is really useful with all the Google web applications, with Zoho services and Pandora. Try and enjoy it! AddThis mp3 link

How to read yahoo.com (and many others) email accounts on Thunderbird 3.1 (Ubuntu and Windows tips)

Many on line email providers don’t allow you to use their accounts with POP email clients such as Thunderbird 3.1. To solve this “matter” we have a couple of possible solutions: FreePOPs and WebMail. Today, we  will discuss about Webmail that we  tested on Ubuntu 10.04 LTS and Windows XP. WebMail is substantially a  Thunderbird’s add-ons but it is not  featured by Mozilla. Using this add-on you are able to manage Yahoo, Hotmail, mail.com, GMail, Libero, and AOL email accounts. The installation is similar in Ubuntu and Windows;  on both, you have to install the core WebMail add-on and restart Thunderbird then you can add all the other components (Yahoo, Hotmail, etc..) you prefer. Then you have to modify the Thunderbird server settings following the instructions provided by WebMail:

POP
Server Type : POP
Incoming Server: localhost
UserName : username@domain

SMTP
Server Name: localhost
UserName : username@domain

Do not forget to set the Connection Security to None.

Only on Ubuntu, you need also to manually modify the incoming and outgoing ports because when you use Thunderbird through WebMail on Ubuntu, you will have a “could not connect to server local host; the connection was refused” message.  This problem can be easily solved substituting the default ports on both WebMail add-on and Thunderbird ports:

– Thunderbird —> Edit —> Account Settings. Highlight the account you want to manage and go to Server Settings. There you can modify the POP Server Mail port setting it to a number bigger than 1000 (in my case I put 1250). Then go to Outgoing Servers and Edit the SMTP account you want to modify (I changed the default port to 1025).

– Thunderbird —> Tools —> Add-ons —> WebMail —> Preferences and put the same port numbers you have set on the previous step.

All this because ports below 1024 seems to be blocked on Ubuntu (if you know why, please post a comment).

For security, restart Thunderbird and it will immediately download and send your emails. Last but not least, if your on line email account is not supported by WebMail, do not forget to try FreePOPs. AddThis mp3 link

Prey: a multiplatform, open source anti-thefth free software for laptops

What about losing your laptop? Obviously the chances to find it and have it back are very few! But there are several software you can install on your laptop to trace the ip and geo-location of te laptop and with a bit of fortune you could find it. Prey is one of these programs you can use and it is particularly interesting because it is open source and free up to three laptops. After the download of the proper version for your OS (Linux, Windows, Mac OS X or Android) you have to run it on your machine and configure it through a very simple interface (on Ubuntu: Applications —> System Tools —> Prey Configurator). Do not forget to select Enable guest account and Wifi autoconnect to improve the possibilities to trace your laptop. You are also asked to provide an email account where you will receive the geo-location reports if your laptop is stolen. When you activate your Prey account do not forget to fill in the Configuration and Modules tabs. Personally we suggest to switch to ON the following commands: Auto update, Notify new reports and all the commands contained in the left column of the Modules tab. At this point, if your laptop is missed, you have to log in your on-line Prey account and, in the Configuration tab, switch the Missing option on YES. Since this moment, Prey software on your laptop is activated and will start sending reports to your email and to your Prey webpage. Last but not least, to better protect your laptop I suggest to hide or cancel the Prey Configurator icon from the OS menu (in Ubuntu: System —> Preferences —> Main Menu —> System Tools and deselect Prey Configurator). AddThis mp3 link