Linuxtipstricks – Just another /linux/blog

July 4, 2009

Ho to reset Ubuntu password (Kubuntu, Xubuntu, gOS, Mint and other Ubuntu based OSs)

Filed under: user tipstricks — Antonio Portuesi @ 9:47 pm
Tags: , , , , , , , , , ,

What if you lost your account password?
Before you destroy your linux installation check this out:

switch on your computer, and as soon as you can, strike the Esc key on your keyboard to display GRUB menu;

highlight and select the recovery mode;

your distro will boot into a recovery shell and, after you get a console prompt, type:

user@pc:~$ passwd user

where the user is your username;

choose, enter and confirm a new password when prompted;

restart your machine:

user@pc:~$ reboot

and take a deep breath.

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!

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.

March 7, 2009

How to add a user to the sudo list

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

When you set up Ubuntu or Kubuntu or some other Ubuntu-like distro, during the installation process it automatically will add the first user to the sudo group, allowing that user to make changes as the super user (aka root aka administrator if you come from Windows environment) by typing in the related password.
However, if you want to give someone else superuser privileges (please think on it) on your Linux system, you’ll have to give it a specific sudo access.

That is very easy to do. Just run:

user@pc:~$ sudo usermod -G admin username

That’s all!

If you prefer the graphic way of doing things, open System -> Administration -> Users and Groups.
Select the user you want to add to sudo, and click Properties.
Under the User privileges area, check the box “Executing system administration tasks” and you’ll be done.

February 21, 2009

How to finding out which directory is the largest on your device

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

How many time did you try to know exactly which is the living-to-eat-some-space directory on your hard drive?

No matter what system/distro you have, that could be a issue for you as a faithful user of Ubuntu, OpenSuSE, Slackware, Gentoo and so on.

Either you have a unique partition or a multi partition system the following code might be useful for your purpose.

user@pc:~$ du -S | sort -n

Have a try and reclaim your free space!

December 13, 2008

How to find out who has a file open in Linux

Filed under: user tipstricks — Antonio Portuesi @ 1:28 pm
Tags: , , , , , , , , ,

How often do mounts and umounts operations fail because you cannot determine who or what is using that device? How many times can you not eject a DVD because someone or something has it still open? How many times have you experienced a file manager that keeps a directory open even after you have navigated out of that directory and clicked the refresh button several times?

Let’s use the fuser tool to find out soething useful for our purpose.

Example 1:

user@pc:~$ fuser -mu /home

/home:                5525c(user)  5601m(user)  5607c(user)  5614c(user)  5685c(user)  5739c(user)  5740c(user)  5742c(user)  5743cm(user)  5744cm(user)  5766m(user)  5778m(user)  5789c(user)  5795c(user)  5799c(user)  5801c(user)  5803cm(user)  5805cm(user)  5806m(user)  5921m(user)  6001cm(user)  6005cm(user)  6076(user)  9391cm(user)  9395c(user)

Example 2:

user@pc:~$ fuser -mu /media

/media:               5514rce(user)  5525re(user)  5586rce(user)  5587rce(user)  5593rce(user)  5595rce(user)  5601rce(user)  5604rce(user)  5607re(user)  5613rce(user)  5614re(user)  5617rce(user)  5685re(user)  5738rce(user)  5739re(user)  5740re(user)  5742re(user)  5743re(user)  5744re(user)  5747rce(user)  5757rce(user)  5759rce(user)  5762rce(user)  5766rce(user)  5772rce(user)  5778rce(user)  5789re(user)  5795re(user)  5799re(user)  5801re(user)  5803re(user)  5805re(user)  5806rce(user)  5811rce(user)  5921rce(user)  6001re(user)  6005re(user)  6032rce(user)  6071rce(user)  6076rce(user)  8712rce(user)  9391re(user)  9395re(user)

Now you get the owner and the related process id. For rurther information about a listed process you can research deeper using ps ax.

November 29, 2008

How to open files with gedit using the right click menu in Ubuntu

Filed under: user tipstricks — Antonio Portuesi @ 3:55 pm
Tags: , , , , , , , ,

Many times it could be useful to open and edit a file in a straightforward way with a mouse click without any further action.

Let’s open a terminal window and type in the following command, which will create a new script file in our nautilus scripts directory

user@pc:~$ gedit ~/.gnome2/nautilus-scripts/Open\ file\ with\ gedit

Write the following script lines:

filesall=””
while [ $# -gt 0 ]
do
files=`echo “$1″ | sed ‘s/ /\?/g’`
filesall=”$files $filesall”
shift
done
gedit $filesall&

Save the script and close gedit, then execute the already known command to make the script executable:

chmod u+x ~/.gnome2/nautilus-scripts/Open\ file\ with\ gedit

Now when you right click a file in gnome environment, you should see the related context menu item “Open file with gedit”

November 1, 2008

How to check if Linux kernel supports IPv6

Filed under: user tipstricks — Antonio Portuesi @ 3:35 pm
Tags: , , , , , , , , , ,

As we know, IPv6 addresses are classified into three types:

  1. Unicast addresses: A unicast address identifies a single network interface. The protocol delivers packets sent to a unicast address to that specific interface. Unicast IPv6 addresses can have a scope which is reflected in more specific address names: global unicast address, link-local address, and unique local unicast address.
  2. Anycast addresses: An anycast address is assigned to a group of interfaces, usually belonging to different nodes. A packet sent to an anycast address is delivered to just one of the member interfaces, typically the “nearest” according to the routing protocol’s choice of distance. Anycast addresses cannot be identified easily: they have the structure of normal unicast addresses, and differ only by being injected into the routing protocol at multiple points in the network.
  3. Multicast addresses: A multicast address is also assigned to a set of interfaces that typically belong to different nodes. A packet that is sent to a multicast address is delivered to all interfaces identified by that address. Multicast addresses begin with the first octet being one (1) bits, i.e., they have prefix FF00::/8. The four least-significant bits of the second address octet identify the address scope, i.e. the span over which the multicast address is propagated.

What if I would like to start using IPv6 on a Linux system? How could I test, whether my Linux server system is IPv6 ready or not? If not, how could I enable IPv6 support under Ubuntu, OpenSuSE, Mandriva, Gentoo, Fedora and so on?

Many people know that Linux kernel has IPv6 support since 1996 release. All you need to do is compile kernel with IPv6 networking support. However, there is a so easy way to find out if Linux kernel is already compiled with IPv6 settings.

Check if the current running kernel supports IPv6 taking a look at your /proc-file-system:

user@pc:~$ cat /proc/net/if_inet6

Following lines should be shown:

user@pc:~$ 00000000000000000000000000000001 01 80 10 80 lo
user@pc:~$ fe800000000000000219d1fffe2abaa8 02 40 20 80 ath0

ipv6 module has IPv6 protocol stack for Linux. If above cat command fails the IPv6 module is not loaded.

Just type the following command:

user@pc:~$ sudo modprobe ipv6

Now to test again if all is ok write on your console:

user@pc:~$ lsmod | grep ipv6

that generates an output like that:

user@pc:~$ ipv6 411425 18

Now your system is ready for IPv6 jobs.

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.

Next Page »

Create a free website or blog at WordPress.com.