Monday, December 2, 2013

Check infromation of CPU, memory and Hard Drive information

In order to check the information of your CPU, memory and Disk usage.
To check your CPU information, just execute

$ cat /proc/cpuinfo
$ lscpu

To check your Memory information, just execute

$ cat /proc/meminfo

To check your Disk Usage information, just execute

$ df -h


man proc
man df

Friday, October 11, 2013

Removing annoying console beeps

In order, to remove the beep sound of your linux console just type the following command, in your console (in the directory /home/$your_user)

$echo 'set bell-style none' >> ~/.inputrc

Monday, August 12, 2013

Managing your e-books

You have a collection of e-books and you want organize them, make conversion between file types, read them, or even synchronize them with your e-reader.
Calibre is a Software to manage you e-book collection. You can use it as a reader, converter, news reader, among other features.
To install it, we can use the package in Debian's repository
# aptitude install calibre

Managing your latex bib files in linux

You want a program to manage your Latex bibliography file.
Kbibtex  is a really good program to organize and modify your bib files in Latex using a very friendly GUI.

To install it, we can use the package in Debian's repository
# aptitude install kbibtex


Wednesday, August 7, 2013

Digital TV and Radio in Linux

You are looking for a program to play webTV and WebRadio on Linux
One of the options to watch webTV and listen WebRadio is Freetuxtv.
You can also record the channels in different formats.
To install it, we can use the package in Debian's repository
# aptitude install freetuxtv

Sunday, July 28, 2013

How to synchronize Multiple Dropbox Accounts in your computer

You have multiple accounts in dropbox. (Assume that you have alredy install dropbox on your computer).

You want to synchronize all your dropbox account files in your computer at the same time.

  • Create the alternative folders for your additional account, for example
         $ mkdir ~/.dropbox-mte
           $ mkdir ~/dropbox-mte
  • Run from a terminal the following command
        $ HOME=$HOME/.dropbox-mte /usr/bin/dropbox start -i
  • Configure your account and make as default directory ~/dropbox-mte
  • Create a file to launch the new instance of the dropbox deamon for example,

           HOME=$HOME/.dropbox-mte /usr/bin/dropbox start
  • Executable permissions 
           $chmod 755 ~/
  • Include in your starter.
"Go to System -> Preferences -> Startup Applications. Click Add and          include the following:
Name: 2nd instance of Dropbox
Command: /home/Username/
Click Ok."


Monday, June 17, 2013

Fixing the warning: W: Possible missing firmware /lib/firmware/rtl_nic/....

When I had upgraded some programs, I got the following warning:

W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168f-2.fw for module r8169

To fix it you only have to install the firmware-realtek

# aptitude install firmware-realtek


Sunday, April 21, 2013

Play encrypted DVD

Playing encrypted DVD, sometimes you can recieved a error message like
 libdvdread: Encrypted DVD support unavailable.

You want to play encrypted DVDs with Linux.

As root
Edit your /etc/apt/source.list, adding this line

 deb wheezy main non-free

The first package to install is deb-multimedia-keyring.

# apt-get install deb-multimedia-keyring
Install the library  libdvdcss2
# apt-get install libdvdcss2

After this steps, your dvd's player will be able to play DVD



Mount a remote file system using ssh

Access a remote file system  
You want to transfer files from/to a server which you have a ssh access
As root:
install fuse
#apt-get install fuse-utils sshfs ssh
and load its kernel module
#modprobe fuse
add your regular user to fuse's group
#adduser [your-user] fuse
(reboot the machine)
Now using your regular user:
Mount your remote directory:
$ sshfs [user@]host:[dir] mountpoint [options]
$sshfs remote-user@remote.server:/remote/directory /home/user/remote/
(If you only put  ':' is going to be your default directory)
Then, you can manipulate your remote folder as a regular local folder.
Unmount your remote directory
$fusermount -u mountpoint
$fusermount -u  /home/user/remote/


Tuesday, February 12, 2013

Give bash prompt an interactive value with a script

Bash script to automatically give an interactive value to prompt.

For instance, you need to execute a sudo command on user logon, and you need to do it through a script.

Edit a bash script with the following content:


( echo 'P4ssw0rd
' ) | su - root -c "/sbin/rcnetwork restart"

P4ssw0rd is the password for root user
"/sbin/rcnetwork restart" is the command to execute as root user

Take special attention on the new line after the password on the bash script, and also on the single quotes.

This is only for reference, you never should write out the root password on a plain text file.

Installing Latex packages in your home directory

Without root access, we cannot put the packages or Latex's style files into the directory /usr/share/texmf/

We want to install Latex package or style files for all our Latex documents but we are working in computers that we do not have root access.

Create a private tex hierarchy

$mkdir  $HOME/texmf/tex/latex

Put in this directory all your class, style, and package Latex files.
For custom bibtex style files, create the directory texmf/bibtex/bst

$mkdir $HOME/texmf/bibtex/bst

and put your bst files into it.

After any modification of the $HOME/texmf directory, run the command:


Monday, February 11, 2013

Installing the Nvidia Kernel module

As root type
# apt-get install module-assistant nvidia-kernel-common
# m-a auto-install nvidia-kernel${VERSION}-source
# apt-get install nvidia-glx${VERSION} 
and reboot

Sunday, February 10, 2013

Download videos from

youtube-dl is a script to download videos from youtube
To install this script, type as root
#wget -O /usr/local/bin/youtube-dl
#chmod a+x /usr/local/bin/youtube-dl
and to update it

#youtube-dl --update

To download videos, just type youtube-dl and link direction, for example


Also you can use this script to extract the audio of theses vidios, for example

$youtube-dl --extract-audio --audio-format=mp3 -t


Normal users can't connect to X

Suddenly, my user  can't login into X sever, and I got the following error in the file /var/log/Xorg.0.log

[   157.920] (EE) Error compiling keymap (server-0)
[   157.920] (EE) XKB: Couldn't compile keymap
[   157.920] (EE) XKB: Failed to load keymap. Loading default keymap instead.
[   157.944] (EE) Error compiling keymap (server-0)
[   157.944] (EE) XKB: Couldn't compile keymap
[   157.944] XKB: Failed to compile keymap
[   157.944] Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config.
[   157.944]

Just login in a console as root (e.g. atl+f1) and type

#chmod ug+rwx,o+rwt /tmp

then reboot

Saturday, February 9, 2013

GNU Screen Command

Window manager that multiplexes a physical terminal between several processes, typically interactive shells.

Pair remote programming/assistance. Using the multiuser mode to do pair programming or create a teaching environment.

sudo apt-get install screen

1. Change user to the username you want to allow screen access

2. To start up screen:
  screen -S sessionname

3. Now instruct the second/remote user to SSH connect to your host/IP and to attach to the screen
  screen -x sessionname

Both will be able to interact in the same session.


GNU Privacy Guard (GPG)

Encryption and Signing

apt-get update

GPG error: The following signatures were invalid KEYEXPIRED 1337087218
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA

apt-get install debian-archive-keyring


Friday, February 8, 2013

Skype 4.1 AMD64

In the case Skype 4.1 over Debian 7.0, I don't recommend install the deb file, alternatively we can use the tar.bz2 file.
As root:

Install some i386 packages, 
#dpkg --add-architecture i386
#aptitude update
#apt-get install lib32asound2 ia32-libs ia32-libs-gtk
#aptitude install libxss1:i386 libqtwebkit4:i386 libqtgui4:i386
#aptitude install libqt4-network:i386 libsmokeqtxmlpatterns4-3:i386
#aptitude install libqtwebkit4:i386
#dpkg -i skype-debian_4.2.0.11-1_i386.deb

Thursday, February 7, 2013

Adding directories to your PATH variable

Edit your .bashrc as user and add the line:

export PATH=$PATH:/path/to/directory

Enable programmable completion for user

Enable programmable completion for a user:
First install bash-completion package, as root user type

aptitude install bash-completion

and, just add the following lines to the /home/$USER/.bashrc (as $USER)

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion

also the root user can have this feature, adding the same lines above in /root/.bashrc

root with X access

Using Debian Squeeze and others older versions, the root cannot execute X programs from a x-console (like kde-konsole or gnome-terminal).

To allow this just edit your root's .baschrc and add this line

export XAUTHORITY=/home/$SOME_USER/.Xauthority

where  SOME_USER is replaced by a user with X access.

Jacksense in Debian

In Debian squeeze the jacksense in my laptop didn't work. Solution: I installed the latest Alsa driver. In Debian wheezy works fine.

Intalling Java plugin

Download the Java from (in this cases version 7 update 13).

As root user:

- Make a Java directory, for example

mkdir /usr/java

- Uncompress the downloaded file in it

tar zxvf jre-7u7-linux-i586.tar.gz -C /usr/java

- Create the symbolic link from your browser to the java plugin

cd /usr/lib/mozilla/plugins/
ln -s /usr/java/jre1.7.0_13/lib/$YOUR_ARCH/ .

(replace  YOUR_ARCH with amd64 or i386, etc)

Restart your browser.

Test your installation


Wednesday, February 6, 2013

Acrobat Reader in AMD64

While I was installing Acrobat Reader 9.5.3, I've got the following error:

# dpkg -i --force-architecture AdbeRdr9.5.3-1_i386linux_enu.deb
(Reading database ... 179355 files and directories currently installed.)
Preparing to replace adobereader-enu 9.5.3 (using AdbeRdr9.5.3-1_i386linux_enu.deb) ...
Unpacking replacement adobereader-enu ...
dpkg: dependency problems prevent configuration of adobereader-enu:
 adobereader-enu depends on libgtk2.0-0 (>= 2.4).

dpkg: error processing adobereader-enu (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db ...
Errors were encountered while processing:

There is no official AMD64 package, then we have to install some i386 packages, so....

#dpkg --add-architecture i386
#aptitude update

And add all the missing libraries...

#aptitude install -f
#apt-get install libgtk2.0-0:i386  libxml2:i386 libstdc++6:i386

and it is better to download and install the bin file
#chmod +x AdbeRdr9.5.5-1_i486linux_enu.bin

Nvidia Optimus in linux

This Nvidia Optimus technology is a whole new ball game for me, my laptop has two graphics cards, and depending on the requirements, it uses one or another, luckily there is a Linux project called Bumblebee to make it work
To install it, add this next lines to /etc/apt/source.list

#bumblebee Nvidia optimus
deb sid main contrib
deb-src sid main

Execute the following commands as root

wget -O - | apt-key add -
aptitude update 
aptitude install nvidia-glx linux-headers-$(uname -r) nvidia-kernel-dkms
sudo update-alternatives --set glx /usr/lib/mesa-diverted 
aptitude install bumblebee bumblebee-nvidia
adduser $USER bumblebee ($USER is your regular X user)
Make a test
optirun glxgears -info


Flash Plugin in Debian

Fortunately, we have a Debian package that does the work for me:
Just type as root

aptitude install flashplugin-nonfree

To update:
update-flashplugin-nonfree --install

My first post... I really like Linux

I like to use Linux a lot, and my favorite distro is Debian, most of my post of this blog will be my experience on my computers using Debian wheezy.
The idea is to write and share a diary based on the configuration problems that me and some friends have faced installing and configuring programs in Linux, and how to solve this issues.

Installing Kernel header packages in Debian

Just type in a console as root user:

aptitude install linux-headers-$(uname -r)

and this command will install the header of your current kernel

Intalling Debian on an UEFI laptop

I have a ASUS A55V UEFI Laptop. Install Debian linux on it, drove me up to the wall, then, a friend of mine (Bureado) pointed me out this tutorial

My advice: Use the latest CD of Debian Wheezy, run the installation CD without UEFI support, install Debian following the video tutorial without, DO NOT install a boot loader manager, when the installation is finished reboot the machine and use the installation CD with UEFI support, press 'c' to enter to the grub command pront and run the Debian installed


grub> set root=(hd0,gpt2) 

grub> linux /vmlinu_tab_ ro root=/dev/mapper/xen-linux 

grub> initrd /initrd_tab_ g

rub> boot

then login as root and install grub with uefi support

aptitude install grub-efi-amd64


aptitude install grub-efi-ia32

depending on your computer

then (in either case)

grub-install && update-grub 

 Now you have Debian installed with its boot loader manager