Linuxtipstricks – Just another /linux/blog

June 27, 2009

How to use Facebook chat in Ubuntu (Pidgin)

Filed under: user tipstricks — Antonio Portuesi @ 10:23 am
Tags: , , , , , , ,

If you want to enable Facebook Chat for Pidgin in Ubuntu you need to install Facebook Chat for Pidgin plugin that now is included in the official repositories.

This is a Facebook chat plugin for Pidgin, it simply connects to the new Facebook Chat IM service without the need for an API key as many other services require.

Currently the plugin can log into the Facebook servers, get the buddy list, send and receive messages, add and remove friends, receive notifications and search for Facebook friends.
Moreover you can set your Facebook status too.

Now open a console session and type:

sudo apt-get install pidgin-facebookchat

insert your root password and Ubuntu will make everything itself without asking you anything else.

Let’s get into it and enjoy your facebook world!

May 16, 2009

How to manage Trash can or Recycle bin in Linux Desktop graphic environment

Filed under: user tipstricks — Antonio Portuesi @ 7:31 pm
Tags: , , , , , , , , , , ,

In every modern linux distros (OpenSuSE, Ubuntu, Mandriva, …) we use the graphic environment (GUI) almost all day.

Linux GUIs as Gnome, KDE or Enlightment, have a trash can where your erased files go when you delete them from a Desktop utility.

Now if you want to get rid of that from your console, you have to know that the trash can is only another folder in the file system structure, as you can figure out, and it is located at:

user@pc:~$ $HOME/.Trash

so you can send any file to Trash just moving them to there, as an example, lets suppose you have a file in your home directory called readme.txt and want to move it to the trash can (recycle bin if you prefer)

user@pc:~$ mv $HOME/readme.txt $HOME/.Trash/

Whenever you may want to restore it, just move the same file to the original location or to any other you like, just like the following:

user@pc:~$ mv $HOME/.Trash/readme.txt $HOME/

and you are done.

If you want to clean your trash can/recycle bin, just type this line

user@pc:~$ rm -rf $HOME/.Trash/*

and press enter in your keyboard.

That’s all!

May 2, 2009

How to use a swap file to increase temporarily your swap memory

Filed under: user tipstricks — Antonio Portuesi @ 11:04 pm
Tags: , , , , ,

Sometimes, it can be very useful to increase the available swap memory using a file, so we could have a memory boost in a snap without prepare a dedicated swap partition.
Let’s do it!

The following line would create a swapfile of 4 gigabytes using a blocksize of a megabyte (1048576).
user@pc:~$ dd if=/dev/zero of=/swapfile bs=4194304 count=1000

Then make the file as a swapfile
user@pc:~$ mkswp /swapfile

Now we have to activate the swapfile…
user@pc:~$ swapon /swapfile

…and verify that the same has been activated.
user@pc:~$ swapon -s

That’s all!

April 4, 2009

How to permanently fix skype audio problem in Ubuntu

Filed under: user tipstricks — Antonio Portuesi @ 7:44 pm
Tags: , , , , , , , , , , ,

I just downloaded and tried the last Ubuntu beta release (9.04 – Jaunty Jackalope)
The first package I set up was skype 2.0, everything went great except for the audio call feature.
I adopted the same solution well known for the previous distro (8.04 – Intrepid Ibex) as well as you can do following the lines below:

user@pc:~$ killall pulseaudio

user@pc:~$ sudo apt-get remove pulseaudio

user@pc:~$ sudo apt-get install esound

user@pc:~$ sudo rm /etc/X11/Xsession.d/70pulseaudio

That’s all.

Reboot the system and get free calls with skype again.

October 19, 2008

How to restore GRUB in your MBR if Windows changed it

Filed under: user tipstricks — Antonio Portuesi @ 7:29 pm
Tags: , , , , , , , , , ,

Once upon a time it was a GRUB (GRand Unified Bootloader) menu showing up itself after a normal Bios POST…

Then you said: Why should I do not another Windows release test?

It is over, during the last setup step Windows installer overwrite the MBR (Master Boot Record) and you cannot make a OS choice at boot time anymore.

And now?

Before you start please note that if you are not confident in what you are doing or in repairing or recovering from the above listed process, then do not step to the outlined instructions. Working with MBR is easy in almost all situations, this process does not carry out data loss, but there still exists a (however minimal) risk about that, so you should back up your data before attempting to modify your hard disk settings.

I cannot help you troubleshoot problems you could have following this tutorial.

Follow these steps, get back the control and come back a dual boot user.

First of all clear your mind and do not forget that this method puts GRUB back on the MBR of the hard drive instead of in the root partition. This is good for most of you, but not if you already have an alternative boot manager as Boot Magic or System Commander or Acronis OS Selector.

If you have installed GRUB into the root partition instead of the MBR, the commands are a little different. Here there is the procedure:

Boot from a Live CD, (Ubuntu, OpenSuSE, Mandriva, Gentoo, Fedora and so on)

Open a terminal. Go on as SuperUser (or use sudo command) and enter root password as requested.

user@domain:~$ sudo grub
user@domain:~$ password for user:

Then type:

grub> find /boot/grub/stage1

You will get a system response like “(hd0)” or in my case “(hd0,6)”

grub> find /boot/grub/stage1
(hd0,6)

Go on typing:

grub> root (hd0,6)

and:

grub> setup (hd0,6)

Pay attention here and stay focused: other troubleshoot instructions suggest you to type “(hd0)”, and that is good if you want to write GRUB to the MBR and not on the root partition. So this is up to you.

The final command let you exit the grub shell:

grub> quit

Now reboot the system and remove the bootable live media.

user@domain:~$ sudo reboot

I hope this guide will help you to gain control of you boot procedure.

October 5, 2008

How to create a separate home partition in Linux (Ubuntu, OpenSuSE, Mandriva, Gentoo, Fedora and so on)

Filed under: user tipstricks — Antonio Portuesi @ 4:26 pm
Tags: , , , , , , , , , , , ,

This simple guide is just another way to make a separate /home partition if you already installed Linux with a embedded /home partition (aka /home folder inside your / partition).

Getting a separate /home partition allows you to reinstall your Linux distro (Ubuntu, OpenSuSE, Mandriva, Gentoo, Fedora and so on) and retain all your personal files and settings. This is for your convenience and you should seriously think on it as soon as possible if time really matters to you. Do not forget to run a complete back up of your data before go trough.

You are strongly encouraged to use a self booting live CD for this process, for those reasons:

a) In order to resize your existing root partition, it needs to be unmounted. The only way to unmount it is for it not to be in use, which means you cannot boot to your regular linux environment while resizing it so you need a external and autonomous system as a live CD or a bootable USB device.
b) If you damage your linux system by accident, you can use for sure the live CD to restore your old settings and, in a very bad situation, at least recover your important data.

Before you start please note that if you are not confident in what you are doing or in repairing or recovering from the above listed process, then do not step to the outlined instructions. Creating a separate /home partition involves resizing at least one existing partition. In almost all situations, the resizing process of partitions does not carry out data loss, but there still exists a (however minimal) risk of data loss, so you should back up your data before attempting to modify your hard disk partitions.

I cannot help you troubleshoot problems you could have following this tutorial.

Now, after you made the new target partition will host your /home open a the terminal, I’m going to mount /dev/sda1 and /dev/sda2 by pasting in these commands (please remember to change the partition device names to the ones appropriate for your setup)

sudo mkdir /first
sudo mkdir /second
sudo mount -t ext3 /dev/sda1 /first
sudo mount -t ext3 /dev/sda2 /second

Now we are going to copy all the content from the original /home to the new target partition…

cd /first/home
find . -depth -print0 | cpio --null --sparse -pvd /second/

…and to get a backup copy of /home too, useful in a troubleshoot process:

sudo mv /first/home /first/home_backup
sudo mkdir /first/home

Right now, after you made a backup copy of fstab, we will specify how the system should use the brand new partition as /home:

sudo cp /first/etc/fstab /first/etc/fstab_backup

sudo gedit /first/etc/fstab (if you are a Gnome lover) or

sudo kedit /first/etc/fstab (if you are a KDE lover).

The /etc/fstab should be shown in the text editor.

Add the next line at the end of the file and remember to double check the right name of your partition before save the file and close the editor:

/dev/sda2 /home ext3 nodev,nosuid 0 2

In order to avoid error messages after reboot with the new /home partition you should set the proper ownership typing:

sudo chown user_managed:user_managed /home/user_managed -R

If everything is ok and you are running a system without problems you could delete the old /home directory and get some free space on your disk:

sudo rm -rf /home_backup

If you incur some issue you can restore the old /home by changing back the fstab removing the line you added before as described above.

Create a free website or blog at WordPress.com.