[CONTEXT]
In order to check the information of your CPU, memory and Disk usage.
[HOW]
To check your CPU information, just execute
$ cat /proc/cpuinfo
or
$ lscpu
To check your Memory information, just execute
$ cat /proc/meminfo
To check your Disk Usage information, just execute
$ df -h
[SOURCE]
man proc
man df
Monday, December 2, 2013
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
$echo 'set bell-style none' >> ~/.inputrc
Monday, August 12, 2013
Managing your e-books
[CONTEXT]
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.
[HOW]
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
[SOURCE]
http://calibre-ebook.com/
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.
[HOW]
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
[SOURCE]
http://calibre-ebook.com/
Managing your latex bib files in linux
[CONTEXT]
You want a program to manage your Latex bibliography file.
[HOW]
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
[SOURCE]
http://home.gna.org/kbibtex/
You want a program to manage your Latex bibliography file.
[HOW]
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
[SOURCE]
http://home.gna.org/kbibtex/
Wednesday, August 7, 2013
Digital TV and Radio in Linux
[CONTEXT]
You are looking for a program to play webTV and WebRadio on Linux
[HOW]
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
[LINKS]
http://code.google.com/p/freetuxtv/
http://database.freetuxtv.net/site/index
You are looking for a program to play webTV and WebRadio on Linux
[HOW]
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
[LINKS]
http://code.google.com/p/freetuxtv/
http://database.freetuxtv.net/site/index
Sunday, July 28, 2013
How to synchronize Multiple Dropbox Accounts in your computer
[CONTEXT]
You have multiple accounts in dropbox. (Assume that you have alredy install dropbox on your computer).
[WHEN]
You want to synchronize all your dropbox account files in your computer at the same time.
[HOW]
$ mkdir ~/dropbox-mte
DropboxAltStarter.sh
Name: 2nd instance of Dropbox
Command: /home/Username/DropboxAltStarter.sh
Click Ok."
[SOURCE]
http://www.maketecheasier.com/run-multiple-dropbox-accounts-in-mac-and-linux/2010/05/24
You have multiple accounts in dropbox. (Assume that you have alredy install dropbox on your computer).
[WHEN]
You want to synchronize all your dropbox account files in your computer at the same time.
[HOW]
- Create the alternative folders for your additional account, for example
$ 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,
DropboxAltStarter.sh
#!/bin/bash HOME=$HOME/.dropbox-mte /usr/bin/dropbox start
- Executable permissions
$chmod 755 ~/DropboxAltStarter.sh
Include DropboxAltStarter.sh in your starter.
Name: 2nd instance of Dropbox
Command: /home/Username/DropboxAltStarter.sh
Click Ok."
[SOURCE]
http://www.maketecheasier.com/run-multiple-dropbox-accounts-in-mac-and-linux/2010/05/24
Labels:
configuration,
Dropbox,
linux,
multiple accounts
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
Source
http://forums.debian.net/viewtopic.php?f=7&t=82716
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
Source
http://forums.debian.net/viewtopic.php?f=7&t=82716
Sunday, April 21, 2013
Play encrypted DVD
[CONTEXT]
Playing encrypted DVD, sometimes you can recieved a error message like
libdvdread: Encrypted DVD support unavailable.
[WHEN]
You want to play encrypted DVDs with Linux.
[HOW]
As root
Edit your /etc/apt/source.list, adding this line
deb http://www.deb-multimedia.org 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
[SOURCE]
http://www.cyberciti.biz/faq/debian-linux-squeeze-installing-libdvdcss2-command/
http://www.deb-multimedia.org/
[OTHERS ALTERNATIVES]
http://theos.in/desktop-linux/linux-playing-encrypted-dvd/
http://www.cyberciti.biz/faq/howto-ubuntu-linux-playback-dvd/
Playing encrypted DVD, sometimes you can recieved a error message like
libdvdread: Encrypted DVD support unavailable.
[WHEN]
You want to play encrypted DVDs with Linux.
[HOW]
As root
Edit your /etc/apt/source.list, adding this line
deb http://www.deb-multimedia.org 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
[SOURCE]
http://www.cyberciti.biz/faq/debian-linux-squeeze-installing-libdvdcss2-command/
http://www.deb-multimedia.org/
[OTHERS ALTERNATIVES]
http://theos.in/desktop-linux/linux-playing-encrypted-dvd/
http://www.cyberciti.biz/faq/howto-ubuntu-linux-playback-dvd/
Mount a remote file system using ssh
[CONTEXT]
Access a remote file system
[WHEN]
You want to transfer files from/to a server which you have a ssh access
[HOW]
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]
e.g.
$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
e.g.
$fusermount -u /home/user/remote/
[SOURCE]
http://www.debianadmin.com/mount-a-remote-file-system-through-ssh-using-sshfs.html
Access a remote file system
[WHEN]
You want to transfer files from/to a server which you have a ssh access
[HOW]
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]
e.g.
$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
e.g.
$fusermount -u /home/user/remote/
[SOURCE]
http://www.debianadmin.com/mount-a-remote-file-system-through-ssh-using-sshfs.html
Tuesday, February 12, 2013
Give bash prompt an interactive value with a script
[CONTEXT]
Bash script to automatically give an interactive value to prompt.
[WHEN]
For instance, you need to execute a sudo command on user logon, and you need to do it through a script.
[HOW]
Edit a bash script with the following content:
Where:
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.
[NOTE]
This is only for reference, you never should write out the root password on a plain text file.
Bash script to automatically give an interactive value to prompt.
[WHEN]
For instance, you need to execute a sudo command on user logon, and you need to do it through a script.
[HOW]
Edit a bash script with the following content:
#!/bin/sh
( echo 'P4ssw0rd
' ) | su - root -c "/sbin/rcnetwork restart"
Where:
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.
[NOTE]
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
[CONTEXT]
Without root access, we cannot put the packages or Latex's style files into the directory /usr/share/texmf/
[WHEN]
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.
[HOW]
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:
$texhash
Source: http://www.math.uiuc.edu/~hildebr/tex/tips-customstyles.html
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
Source: http://wiki.debian.org/NvidiaGraphicsDrivers
Labels:
configuration,
Debian,
Debian 7.0,
How to,
install,
nvidia,
X
Sunday, February 10, 2013
Download videos from YouTube.com
youtube-dl is a script to download videos from youtube
To install this script, type as root
#
and to update it
#youtube-dl --update
To download videos, just type youtube-dl and link direction, for example
$youtube-dl http://www.youtube.com/watch?v=hUYzQaCCt2o
Also you can use this script to extract the audio of theses vidios, for example
$
Source: http://rg3.github.com/youtube-dl/
To install this script, type as root
#
wget http://youtube-dl.org/downloads/2013.08.09/youtube-dl -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
$youtube-dl http://www.youtube.com/watch?v=hUYzQaCCt2o
Also you can use this script to extract the audio of theses vidios, for example
$
youtube-dl --extract-audio --audio-format=mp3 -t
http://www.youtube.com/watch?v=hUYzQaCCt2oSource: http://rg3.github.com/youtube-dl/
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]
[ 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
Source:
Saturday, February 9, 2013
GNU Screen Command
[CONTEXT]
Window manager that multiplexes a physical terminal between several processes, typically interactive shells.
[WHEN]
Pair remote programming/assistance. Using the multiuser mode to do pair programming or create a teaching environment.
[HOW]
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.
[REFERENCES]
http://www.gnu.org/software/screen
GNU Privacy Guard (GPG)
[CONTEXT]
Encryption and Signing
[WHEN]
apt-get update
[ERROR]
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
[SOLUTION]
apt-get install debian-archive-keyring
[REFERENCES]
http://wiki.debian.org/Keysigning
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
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
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
fi
fi
also the root user can have this feature, adding the same lines above in /root/.bashrc
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
fi
fi
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.
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.
Source: http://blog.netflowdevelopments.com/2011/11/19/switch-from-ubuntu-to-debian-and-now-jacksense-doesnt-work/
Source: http://blog.netflowdevelopments.com/2011/11/19/switch-from-ubuntu-to-debian-and-now-jacksense-doesnt-work/
Labels:
Alsa,
configuration,
Debian,
headphones,
jacksense,
sound
Intalling Java plugin
Download the Java from http://java.com/en/download/ (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
- 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/libnpjp2.so .
(replace YOUR_ARCH with amd64 or i386, etc)
Restart your browser.
Test your installation http://java.com/en/download/testjava.jsp
Source: http://java.com/en/download/help/linux_install.xml
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/libnpjp2.so .
(replace YOUR_ARCH with amd64 or i386, etc)
Restart your browser.
Test your installation http://java.com/en/download/testjava.jsp
Source: http://java.com/en/download/help/linux_install.xml
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:
adobereader-enu
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
#./AdbeRdr9.5.5-1_i486linux_enu.bin
# 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:
adobereader-enu
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
#./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 http://suwako.nomanga.net/debian sid main contrib
deb-src http://suwako.nomanga.net/debian sid main
Execute the following commands as root
To install it, add this next lines to /etc/apt/source.list
#bumblebee Nvidia optimus
deb http://suwako.nomanga.net/debian sid main contrib
deb-src http://suwako.nomanga.net/debian sid main
Execute the following commands as root
wget -O - http://suwako.nomanga.net/suwako.asc | 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)
reboot
Make a test
optirun glxgears -info
Source:
http://bumblebee-project.org/
https://wiki.debian.org/Bumblebee#Installation
http://suwako.nomanga.net/
Labels:
Bumblebee,
configuration,
Debian 7.0,
dual graphic card,
install,
nvidia,
Nvidia optimus
Flash Plugin in Debian
Fortunately, we have a Debian package that does the work for me:
flashplugin-nonfree.
Just type as root
aptitude install flashplugin-nonfree
To update:
flashplugin-nonfree.
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.
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
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
e.g.
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
or
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
Source:
http://www.youtube.com/watch? v=mnTj6_kDIeg
http://wiki.xen.org/wiki/Comprehensive_Xen_Debian_Wheezy_PCI_Passthrough_Tutorial
Subscribe to:
Posts (Atom)