Posts Tagged Debian
Installing SubDownloader on Raspberry Pi
Posted by Luis Gallardo in Linux on 10/04/2013
I’ve already install XBMC as my media center and also qbittorrent Web as my “download” center. But one piece was missing: a subtitle downloader program. I knew about subdownloader, so I decide to give it a try on my Rasperry Pi but it is not on Raspbian repos…what can you do?
Easy, just add Debian’s official repos for Sid and install it. Remember, Debian supports lot of architecture, even armhf. Let’s see how to do it…
Installing
- Edit file /etc/apt/sources.list to include sid’s repos:
deb http://ftp.debian.org/debian/ sid main contrib non-free
- Update the package list:
aptitude update
- Install SubDonwloader:
aptitude install subdownloader
- Edit file /etc/apt/sources.list to delete sid’s repos (it’s enough by commenting the line with #):
#deb http://ftp.debian.org/debian/ sid main contrib non-free
- Update the package list one more time:
aptitude update
Now you can run the program on your Rasperry Pi locally or using ssh…but keep in mind it would run a little slow. Enjoy it!
Reference: SubDownloader project page
Mobile repository on Debian
Posted by Luis Gallardo in Linux on 07/03/2013
If by chances you have a slow connection but in another place have a better connection (school, university, work, etc.) and have a computer with Debian which on the same architecture (x86, x64, etc.) with almost the same software selection, you can do this little trick to carry part of the downloaded packages:
Computer with good connection
Update and upgrade the computer with good connection:
root@dell~# aptitude update aptitude safe-upgrade
On Debian and alike distros the downloaded packages are stored in /var/cache/apt/archives, so you can copy the content of that directory into a pen-drive or external hard drive:
cp -r /var/cache/apt/archives /media/usb0
Computer with poor connection
Update the package list. Despite you have a poor connection , you still need Internet to retrieved the package’s information:
root@cupcake:~# aptitude update root@cupcake:~# aptitude safe-upgrade The following packages will be upgraded: bind9-host dnsutils evolution-data-server evolution-data-server-common gdm3 gnome-shell gnome-shell-common google-chrome-stable gvfs gvfs-backends gvfs-bin gvfs-common gvfs-daemons gvfs-libs host icedtea-netx icedtea-netx-common krb5-locales libbind9-80 libc-bin libc-dev-bin libc6 libc6:i386 libc6-dev libc6-i386 libc6-i686:i386 libcairo-gobject2 libcairo2 libcamel-1.2-33 libdbus-glib-1-2 libdns88 libebackend-1.2-2 libebook-1.2-13 libecal-1.2-11 libedata-book-1.2-13 libedata-cal-1.2-15 libedataserver-1.2-16 libedataserverui-3.0-1 libglib2.0-0 libglib2.0-0:i386 libglib2.0-bin libglib2.0-data libgssapi-krb5-2 libgssapi-krb5-2:i386 libisc84 libisccc80 libisccfg82 libk5crypto3 libk5crypto3:i386 libkrb5-3 libkrb5-3:i386 libkrb5support0 libkrb5support0:i386 liblwres80 libperl5.14 libproxy0 libssh-4 libxen-4.1 libxenstore3.0 locales multiarch-support openssh-client openssh-server perl perl-base perl-modules python python-minimal vim vim-common vim-runtime vim-tiny xserver-xorg-video-nouveau The following packages are RECOMMENDED but will NOT be installed: xserver-xephyr 73 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 103 MB of archives. After unpacking 16.6 MB will be used. Do you want to continue? [Y/n/?] n
Here you can see it needs to download 103 MB. Say no by typing “n”, and copy the packages from the pen-drive to /var/cache/apt/archives/:
# cp -R /media/C6A7-9F3C/archives/* /var/cache/apt/archives/
Now update the package list and try to upgrade the packages one more time:
root@cupcake:~# aptitude update root@cupcake:~# aptitude safe-upgrade The following packages will be upgraded: bind9-host dnsutils evolution-data-server evolution-data-server-common gdm3 gnome-shell gnome-shell-common google-chrome-stable gvfs gvfs-backends gvfs-bin gvfs-common gvfs-daemons gvfs-libs host icedtea-netx icedtea-netx-common krb5-locales libbind9-80 libc-bin libc-dev-bin libc6 libc6:i386 libc6-dev libc6-i386 libc6-i686:i386 libcairo-gobject2 libcairo2 libcamel-1.2-33 libdbus-glib-1-2 libdns88 libebackend-1.2-2 libebook-1.2-13 libecal-1.2-11 libedata-book-1.2-13 libedata-cal-1.2-15 libedataserver-1.2-16 libedataserverui-3.0-1 libglib2.0-0 libglib2.0-0:i386 libglib2.0-bin libglib2.0-data libgssapi-krb5-2 libgssapi-krb5-2:i386 libisc84 libisccc80 libisccfg82 libk5crypto3 libk5crypto3:i386 libkrb5-3 libkrb5-3:i386 libkrb5support0 libkrb5support0:i386 liblwres80 libperl5.14 libproxy0 libssh-4 libxen-4.1 libxenstore3.0 locales multiarch-support openssh-client openssh-server perl perl-base perl-modules python python-minimal vim vim-common vim-runtime vim-tiny xserver-xorg-video-nouveau The following packages are RECOMMENDED but will NOT be installed: xserver-xephyr 73 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 2,474 kB/103 MB of archives. After unpacking 16.6 MB will be used. Do you want to continue? [Y/n/?]
As you can see, now it needs 2,4 MB, much less than originally needed and it will last much less in downloading with a poor connection like the Venezuela’s 3G networks (put here your preferred mobile operator’s name).
How to build Debian and Ubuntu mirrors using debmirror
Posted by Luis Gallardo in Linux on 06/12/2012
Here I explain how to set up a mirror for Debian an Ubuntu repositories, on a Debian server. The steps explained next can be found on other sites, except how to deal with the repository’s keyrings. For instance, on the Ubuntu’s tutorial they explain how to install the keyrings assuming the server you are installing the mirror has Ubuntu running, but what if it’s running on a Debian server?
Installing debmirror
As I mentioned, I used debmirror for mirroring both distros. There are other programs, like apt-cacher, but I chose debmirror because I wanted to mirror all Debian and Ubuntu repos. So, in order to install debmirror just type the following as root:
aptitude install debmirror
Installing the keyrings
Now it’s time for installing the repositories’ keyrings. Because I wanted a mirror for Debian and other for Ubuntu, I had to download both keyrings packages and import the keyrings from them:
Debian
To install the keyrings for Debian’s repos the latest debian-archive-keyrings must be downloaded, for instance from testing:
# wget http://ftp.us.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2012.4_all.deb
Then the package’s content must be extracted in the root’s home directory:
# dpkg-deb -x debian-archive-keyring_2012.4_all.deb ~
And finally import the keyrings:
# gpg --no-default-keyring --keyring /home/repo/keyrings/debian/trustedkeys.gpg --import /root/usr/share/keyrings/debian-archive-keyring.gpg gpg: keyring `/home/repo/keyrings/debian/trustedkeys.gpg' created gpg: key B98321F9: public key "Squeeze Stable Release Key " imported gpg: key 473041FA: public key "Debian Archive Automatic Signing Key (6.0/squeeze) " imported gpg: key 65FFB764: public key "Wheezy Stable Release Key " imported gpg: key 46925553: public key "Debian Archive Automatic Signing Key (7.0/wheezy) " imported gpg: Total number processed: 4 gpg: imported: 4 (RSA: 4) gpg: no ultimately trusted keys found
Ubuntu
On Ubuntu I did something similar. I downloaded the latest ubuntu-keyring package up-to-date, from quantal’s repos:
# wget http://pa.archive.ubuntu.com/ubuntu/pool/main/u/ubuntu-keyring/ubuntu-keyring_2012.05.19_all.deb
Then I proceed to extract the package content in the root’s home directory and import the keyrinngs:
# dpkg-deb -x ubuntu-keyring_2012.05.19_all.deb ~# gpg --no-default-keyring --keyring /home/repo/keyrings/ubuntu/trustedkeys.gpg --import /root/usr/share/keyrings/ubuntu-archive-keyring.gpggpg: keyring `/home/repo/keyrings/ubuntu/trustedkeys.gpg' created gpg: key 437D05B5: public key "Ubuntu Archive Automatic Signing Key " imported gpg: key FBB75451: public key "Ubuntu CD Image Automatic Signing Key " imported gpg: key C0B21F32: public key "Ubuntu Archive Automatic Signing Key (2012) " imported gpg: key EFE21092: public key "Ubuntu CD Image Automatic Signing Key (2012) " imported gpg: Total number processed: 4 gpg: imported: 4 (RSA: 2) gpg: no ultimately trusted keys found
The debmirror script
On Ubuntu
The script is an adaptation of the the one at Ubuntu’s documentation, I saved as /home/repo/scripts/debian.sh with the following values:
#!/bin/sh# Don't touch the user's keyring, have our own instead export GNUPGHOME=/home/repo/keyrings/ubuntu # Architecture. For Ubuntu can be i386, powerpc or amd64. arch=i386,amd64 # Minimum Ubuntu system requires main, restricted # Section (One of the following - main/restricted/universe/multiverse). section=main,multiverse,universe,restricted # Release of the system (Quantal, Precise, etc) release=quantal,quantal-security,quantal-updates,quantal-backports,precise,precise-security,precise-updates,precise-backports # Server name, minus the protocol and the path at the end server=us.archive.ubuntu.com # Path from the main server, so http://my.web.server/$dir, Server dependant inPath=/ubuntu # Protocol to use for transfer (http, ftp, hftp, rsync) proto=http # Directory to store the mirror in outPath=/home/repo/mirrors/ubuntu # Start script debmirror -a $arch \ --no-source \ --md5sums \ --progress \ --passive \ --verbose \ -s $section \ -h $server \ -d $release \ -r $inPath \ -e $proto \
On Debian
For Debian I used other parameters and save it as /home/repo/scripts/debian.sh with this values:
#!/bin/sh
# Don't touch the user's keyring, have our own instead
export GNUPGHOME=/home/repo/keyrings/debian
# Architecture (i386, powerpc, amd64, etc.)
arch=i386,amd64
# Section (main,contrib,non-free)
section=main,contrib,non-free
# Release of the system (squeeze,lenny,stable,testing,etc)
release=squeeze
# Server name, minus the protocol and the path at the end
server=ftp.us.debian.org
# Path from the main server, so http://my.web.server/$dir, Server dependant
inPath=/debian
# Protocol to use for transfer (http, ftp, hftp, rsync)
proto=http
# Directory to store the mirror in
outPath=/home/repo/mirrors/debian
# Start script
debmirror -a $arch \
--no-source \
--md5sums \
--progress \
--passive \
--verbose \
-s $section \
-h $server \
-d $release \
-r $inPath \
-e $proto \
$outPath
Note: On both cases you have to make the scripts executable, check the connection with the chosen servers and check if you have enough space available for hosting the mirrors.
Scheduled job (crontab)
Once the scripts are working, you can create a cron for keep the mirrors synced. For example, to run he scripts at midnight every day you can put the following in the /etc/crontab:
0 0 * * * root /home/repo/scripts/debian.sh 0 0 * * * root /home/repo/scripts/ubuntu.sh
Publishing the mirrrors
I published the mirror via http with Apache, the web server:
aptitude install apache2
By default on Debian, Apache uses /var/www as root directory. Thus in order to set the mirrors just make the symbolic links to that directory:
# ln -s /home/repo/mirrors/ubuntu /var/www/ # ln -s /home/repo/mirrors/debian /var/www/
Setting the clients
On the client side, you have to edit the /etc/apt/sources.list file according to the Linux version used on the client.
On Ubuntu
For Ubuntu precise (12.04) you have to put something like this in the /etc/apt/sources.list file:
deb http://192.168.1.1/ubuntu/ precise main restricted universe multiverse deb http://192.168.1.1/ubuntu/ precise-updates main restricted universe multiverse deb http://192.168.1.1/ubuntu/ precise-backports main restricted universe multiverse deb http://192.168.1.1/ubuntu/ precise-security main restricted universe multiverse
In this case the IP addresses 192.168.1.1 belongs to the server hosting the mirrors, which were published via http with Apache. Change to other IP or a DNS entry according to your configuration.
On Debian
For Debian Squeeze you must have the following in your /etc/apt/sources.list:
deb http://192.168.1.1/debian squeeze main contrib non-free deb http://192.168.1.1/debian-security squeeze/updates main contrib non-free
For both cases after doing these changes you have to update the package list:
aptitude update
Once the package list has been updated you can use those repositories.
What to do after installing Ubuntu 12.04?
Posted by Luis Gallardo in Linux on 01/05/2012

I’m sure you were thinking I was tell you: install Debian!…but no, this time I’m going to be more condescend thus I’m going to give you a tip. After installing Ubuntu one thing you can do to feel you are using Debian is open a terminal and type this:
sudo apt-get install aptitude sudo aptitude update
Now you will be using the Debian’s default console package management .
But what are the differences between aptitude and apt-get / apt-cache?
That doubt was already commented on this article aptitude vs. apt-get
User password vs. root password
Another thing you can do is to assign a password to root
sudo passwd root
After this you can log in as root and forget about sudo, in addition you will separating the installing user from the real system administrator role.
Installing SubDownloader on Debian
Posted by Luis Gallardo in Linux on 01/11/2011
In my last article I explained how to watch movies on Android from a multimedia server like MediaTomb, and one things I commented was the possibility of use subtitles in the video player. But, where can we get those subtitles from? There are specialized pages that offer different subtitles versions, just by looking up the exact title movie, download it and try it to see if it is synced with the video.
Can’ t this process be automated? Yes, the answer is SubDownloader, and is what I will explain how to install on Debian.
Installing
- Edit file /etc/apt/sources.list to include sid’s repos:
deb http://ftp.debian.org/debian/ sid main contrib non-free
- Update the package list:
aptitude update
- Install SubDonwloader:
aptitude -t sid install subdownloader
- Edit file /etc/apt/sources.list to delete sid’s repos (it’s enough by commenting the line with #):
#deb http://ftp.debian.org/debian/ sid main contrib non-free
- Update the package list one more time:
aptitude update
Now you can run the program by going to Applications > Multimedia > SubDownloader
Reference: SubDownloader project page
Android’s notification on your PC
Posted by Luis Gallardo in Android, Linux on 26/08/2011

By a friend’s recommendation I got Remote Notifier, an application that let you Android phone send notifications to your PC. The proyect has binaries files for Windows, Mac OSX and Linux. Here I leave the instructions for installing it in Linux.
Installing in GNU/Linux Debian (and spin-offs)
- In the phone: Download from the Android Market Remote Notifier.
- In the PC: Download and install package Android Remote Notifier
Installing in Windows
No idea, I don’t use Windows
Setting and usage
- In the phone::
When launching Remote Notifier the next windows will pop up:

Here you can set some stuff lije the notification methods, evente to be notified, as is show in the next picture:

Set them according to your needs.
- In Linux
Go to Applications > Accessories > Android Notifier Desktop

At the panel of your desktop you will see an icon like this one:

You will see a window with several options. By choosing Preferences you will see a screen like the one shown below::

To integrate the notifications to to Gnome/Unity select Libnotify. Other options like the list of devices, notification actions, and so on can be set according to your needs.
Notifications
Now when you have an incoming calll you will see the notificacion on your PC as shown in the first image of the article. And the battery status will be shown as follow:

Now you don’t miss any important call or message!!!
Reference: android-notifier
Automating wpa_supplicant on Debian
Posted by Luis Gallardo in Linux on 12/08/2011

We already saw how to set wpa_supplicant by hand on a text console, but there’s a extra step left: how to set your wireless connection to get up automatically with the wp_supplicant parameters. On Debian based distributions you can achive this by editing file /etc/network/interfaces in two ways, the first one like this:
iface wlan0 inet dhcp
wpa-ssid Galaxia
wpa-psk acafbf83bd7256506f3b08137dfe2763f9456dc41c8718297e6838ce5a32a64e
The other way, the more elegant in my humble opinion, is by putting a line to refer the wap_supplicant setting file which provides those parameters:
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
File /etc/wpa_supplicant/wpa_supplicant.conf has the wireless network information to connect to, and it was previously generated as explained on this post: Setting wireless connexion in the comand line interface.
On other distributions you must set wpa_supplicant, run it an then ask the network parameters to the dchp server.
Reference: How to use a WiFi interface
Enabling JDownloader’s downloads in Debian
Posted by Luis Gallardo in Linux on 31/12/2010
After installing JDownloader from the project page using the Ubuntu’s repository for Maverick, that at the moment Debian Testing is not so outdated. When launching the application everything seams okay except that it couldn’t download any file. Checking the error in a terminal this what it said:
PreDupeChecked: no mirror found!
On Internet I came across a page where suggested this solution (it must be executed as root):
echo 0 > /proc/sys/net/ipv6/bindv6only
It looks like the application has an issue with ipv6. After setting this option all download worked perfectly!!
Reference
Playing mp3 files in Amarok 2.3.x
Posted by Luis Gallardo in Linux on 18/12/2010
Sometimes I play around with my computer, so from time to time some things end up misconfigured. I tried to fix a codec issue with Kdeinlive and I broke the mp3 support on Amarok. After uninstalling and installing Amarok back (you know, the Windows way) it didn’t solve the problem. I had to do a research to know what I did so I came across some sites where commented that Amarok 2.3.x introduced an extra abstract layer called Phonon which communicates with the old-fashioned GStreamer plugins. In short, if you want to have mp3 playing support in Amarok you mus install the following packages:
aptitude install amarok phonon-backend-gstreamer gstreamer0.10-plugins-ugly
It is worth installing the other GStreamer plugins:
aptitude install gstreamer0.10-plugins-bad gstreamer0.10-plugins-really-bad
Now you can enjoy your music collection!!
References
C/C++ Develoment tools for Eclipse on Debian
Posted by Luis Gallardo in Linux, Programming on 15/12/2010
If you like Eclipse and want to write programs in C or C++ in Linux you can download the C/C++ development tools, or if you are like me that install everything (or almost everything) from Debian’ s repositories you can do the following:
- Add the Sid repos to the /etc/apt/sources.list file, for instance:
- Update the package list and install the C/C++ component:
- Once you have finished to install the component, and avoid installing enything else from Sid (remember it’s the unstable branch of Debian), undo the change to the /etc/apt/sources.list file:
- Update the package list one more time:
deb ftp.us.debian.org/debian sid main contrib non-free
aptitude update aptitude install eclipse-cdt
#deb ftp.us.debian.org/debian sid main contrib non-free
aptitude update
Now you can write C/C++ programs from Eclipse on Debian as you can appreciate on the above picture.








Planeta Linux
Follow me