Plex Home Theatre on Debian Wheezy

Plex Home Theatre on Wheezy requires packages from 2 additional repos, and a specific Ubuntu font package. The following instructions illustrate this:

  • Add repos:

sudo apt-get install curl

sudo curl http://shell.ninthgate.se/packages/shell-ninthgate-se-keyring.key | sudo apt-key add -

echo "deb http://www.deb-multimedia.org wheezy main non-free" | sudo tee -a /etc/apt/sources.list.d/deb-multimedia.list

echo "deb http://shell.ninthgate.se/packages/debian wheezy main" | sudo tee -a /etc/apt/sources.list.d/plex.list

sudo apt-get update

sudo apt-get install deb-multimedia-keyring
(press Y to confirm)

sudo apt-get update

sudo apt-get dist-upgrade

cd /tmp && { curl -O http://mirrors.kernel.org/ubuntu/pool/main/u/ubuntu-font-family-sources/ttf-ubuntu-font-family_0.80-0ubuntu2_all.deb ; cd -; }

sudo dpkg -i /tmp/ttf-ubuntu-font-family_0.80-0ubuntu2_all.deb

  • Install Plex Home Theatre

sudo apt-get install plexhometheater

Filebot on Debian Wheezy

In Debian Wheezy AMD64, the default version of Java is OpenJDK 6. In order to switch Oracle’s v8 Java, do the following:

# su -
# echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list
# echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
# apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
# apt-get update
# apt-get install oracle-java8-installer

And confirm that you’re using the correct Java implementation:

$ java -version
$ javac -version

java version “1.8.0_25”
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

Next, download the Filebot deb, and install:

sudo dpkg --force-depends -i filebot-*.deb

CIFS on Debian Wheezy

I’ve reproduced this reported bug - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=641894 - on my Waldorf machine, and have arrived at the following solution:

As root, open the existing /etc/fstab file and comment-out your existing CIFS mount(s)

Unmount all existing cifs mounts:

# sudo umount -a -t cifs

Install autofs:

# sudo aptitude install autofs

Open (as root) new file /etc/auto.master:

# sudo vi /etc/auto.master

If you want the mounted directories under /data, add the following line:

/data /etc/auto.misc --timeout 60 --ghost

The “ghost” option ensures that even unmounted directories are always visible. Remove this if you prefer to only see the directory when you enter the path to the mounted directory.

Open (as root) new file /etc/auto.misc:

# sudo vi /etc/auto.misc

Add line(s) at the end for your mount directories in a similar format to your /etc/fstab file:

downloads1 -fstype=cifs,rw,username=ootput,password=<cifs_pass>,uid=1000,gid=1000 ://192.168.1.2/downloads2

  • where ‘downloads1’ refers to a local mountpoint under /data, and ‘downloads2’ to the remote cifs share, respectively.

Start the autofs service:

# sudo service autofs restart

Additionally, I enabled all SysRq functions to address stalled shutdown procedures by adding to /etc/sysctl.conf:

kernel.sysrq=1

CrunchBang on Thinkpad X220

Desktop Replacement
Hardware Modifications
Upgrade BIOS From USB
About CrunchBang
System Modifications

Desktop Replacement:

It has been over two and a half years since my last Debian-related post so I thought it necessary to provide an update. I have since donated my desktop machine to a worthy cause in favour of the more-mobile Thinkpad platform. My semi-retired Debian desktop is now providing headache-free internet access at the local library, where one of the librarians had long been toying with the idea of using open source. The successful implementation of my machine prompted their acquisition of a further two Ubuntu machines.

My new Thinkpad, on the other hand, has been running CrunchBang Linux (#!) for over a year and a half, and I could not be happier. Although not a pure Debian system, #! is still a lean derivative.

Hardware Modifications:

Hardware changes I’ve made so far include: installing an Intel 30GB 525s MLC mSATA SSD drive to act as my system drive; and running 2 x 4 GB Corsair PC3-10600 DDR3-1333 RAM in dual channel mode.

Upgrade BIOS From USB:

After grabbing the latest BIOS-update bootable iso from the Lenovo support site, it is necessary to extract its [otherwise hidden] contents via a perl script called geteltorito.pl.

To fetch the script:
$ wget 'http://userpages.uni-koblenz.de/~krienke/ftp/noarch/geteltorito/geteltorito.pl'

Then, extract the contents of the downloaded *.iso file to any new target file:
$ perl ./geteltorito.pl /path/to/_bios_update_cd.iso > /path/to/_target_image_.img

To write the image to your USB (located at /dev/sdX):
$ sudo dd if=/path/to/_target_image_.img of=/dev/sdX bs=512K

Then hit F12 at bootup to choose the bootable medium.

About CrunchBang:

Out-of-the-box, #! does everything I need it to do on a laptop (wifi management; power-saving; keyboard accessibility-support,) at a fraction of the resources required were I to customize a larger/slimmer distribution to suit my needs. Were I to install Debian, I would have arrived at my ideal setup at a much later date.

Crunchbang provides a superb arsenal of open-source productivity applications, and I found myself bored witless during post-install. It defaults to using Openbox - which is not exactly a tiling WM that I’m accustomed to using - but I have made peace with that by implementing split-panes in tmux which, considering the smaller LCD screen real-estate, works reasonably well.

For work-purposes, I have implemented KVM + Qemu to manage a guest Windows XP OS - the guide I used can be found here - and I have been able to leverage the power of this fantastic little unit to conduct business.

System Modifications:

System changes I’ve made so far include: switching from grub2 to syslinux (see here); colourizing init feedback (see here); mounting system paths on the SSD drive with TRIM support (with fstab: -o discard); enabling Thinkpad-specific battery savings (with tlp and thinkpad-smapi); relocating /var paths and browser profiles to tmpfs (with profile-sync-daemon).

To get wifi working again after a system suspend-resume event, my executable /etc/pm/sleep.d/20_fix_wifi contains:
case "${1}" in resume|thaw) rmmod iwlwifi && modprobe iwlwifi ;; esac

Additionally, I had CrunchBang show verbose shutdown messages by modifying /etc/slim.conf to show:

xserver_arguments -nolisten tcp -novtswitch

As my Crunchbang box is essentially a Debian Wheezy machine, I will henceforth address it as my debian box in all future blog entries.

Non-Free and Contrib Packages in Debian

I installed Debian’s vrms package a few weeks back, and completely forgot about it until I received an email earlier today:

Subject: Cron  test -x /usr/sbin/anacron || 
( cd / && run-parts --report /etc/cron.monthly )

/etc/cron.monthly/vrms:
              Non-free packages installed on tolstoi

acroread Adobe Acrobat Reader: Portable Document Format file vi
acroread-data data files for acroread
acroread-dictionary-en English dictionary for for acroread
acroread-l10n-en English language package for acroread
dvdrtools DVD writing program
firmware-linux Binary firmware for various drivers in the Linux kernel
firmware-linux-nonfree Binary firmware for various drivers in the Linux 
                       kernel
firmware-ralink Binary firmware for Ralink wireless cards
p7zip-rar non-free rar module for p7zip
rar Archiver for .rar files
sun-java6-bin Sun Java(TM) Runtime Environment (JRE) 6 (architecture
sun-java6-fonts Lucida TrueType fonts (from the Sun JRE)
sun-java6-jre Sun Java(TM) Runtime Environment (JRE) 6 (architecture
sun-java6-plugin The Java(TM) Plug-in, Java SE 6
ttf-xfree86-nonfree non-free TrueType fonts from XFree86
w64codecs win64 binary codecs

               Contrib packages installed on localhost

flashplugin-nonfree Adobe Flash Player - browser plugin
ttf-mscorefonts-installer Installer for Microsoft TrueType core fonts

I don’t have many non-free packages installed, and I have yet to find better - or more open - alternatives to rid my system completely of such packages: Adobe and Sun Java are required for work; and the codec package is simply too comprehensive to ignore.

Smoother Fonts in Debian

To display smoother fonts on an LCD in Debian, as root:

# dpkg-reconfigure fontconfig-config

In the dialog windows that follow, have:

1
2
3
4
Font tuning method for screen: Autohinter
Enable subpixel rendering for screen: Automatic
Enable bitmapped fonts by default? No

SSL and SASL for Irssi

Freenode now officially supports SSL connections and SASL certificate authentication on all servers. From the FAQ page:

Accessing freenode Via SSL:

freenode now provides SSL client access on all servers. If your client is not configured to verify SSL certificates, then you can simply connect, with SSL enabled, on port 6697, 7000 or 7070.

This site provides instructions on how to enable secure connections to Freenode with Irssi on Debian.

Dual-card ALSA Configuration

Sound in Linux can be a pain to get right. Thusly, I’ve attached my (functional) configuration for multiple soundcards in ALSA for reference below:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# Set default sound card
# Useful so that all settings can be changed to a different card here.
pcm.av710spdif {
type hw
card 2
device 1
}
pcm.realtek {
type hw
card 0
# device 0
}
pcm.!default {
type plug
slave.pcm "av710duplex"
}
pcm.monitor {
type plug
ttable.0.10 1 # digital mix left
ttable.1.11 1 # digital mix right
slave.pcm "av710spdif"
}
# Allow mixing of multiple output streams to this device
pcm.av710output {
type dmix
ipc_key 1024
ipc_perm 0660 # Sound for everybody in your group!
slave.pcm "av710spdif"
slave {
# This stuff provides some fixes for latency issues.
# buffer_size should be set for your audio chipset.
format S32_LE
period_time 0
period_size 1024
buffer_size 8192
rate 44100
}
bindings {
0 0
1 1
}
}
# Allow reading from the default device.
# Also known as record or capture.
pcm.av710input {
type dsnoop
ipc_key 2048
slave.pcm "av710spdif"
slave {
# This stuff provides some fixes for latency issues.
# buffer_size should be set for your audio chipset.
format S32_LE
period_time 0
period_size 1024
buffer_size 8192
rate 44100
}
bindings {
0 0
1 1
}
}
# This is what we want as our default device
# a fully duplex (read/write) audio device.
pcm.av710duplex {
type asym
playback.pcm "av710output"
capture.pcm "av710input"
}
# Allow mixing of multiple output streams to this device
pcm.realtekoutput {
type dmix
ipc_key 3096
ipc_perm 0660 # Sound for everybody in your group!
slave.pcm "realtek"
slave {
# This stuff provides some fixes for latency issues.
# buffer_size should be set for your audio chipset.
# format S32_LE
period_time 0
period_size 1024
buffer_size 8192
rate 44100
}
bindings {
0 0
1 1
}
}
# Allow reading from the default device.
# Also known as record or capture.
pcm.realtekinput {
type dsnoop
ipc_key 4096
slave.pcm "realtek"
slave {
# This stuff provides some fixes for latency issues.
# buffer_size should be set for your audio chipset.
# format S32_LE
period_time 0
period_size 1024
buffer_size 8192
rate 44100
}
bindings {
0 0
1 1
}
}
# This is what we want as our default device
# a fully duplex (read/write) audio device.
pcm.realtekduplex {
type asym
playback.pcm "realtekoutput"
capture.pcm "realtekinput"
}

Debian 5.0 on Desktop

Back in 2002 - when I first got interested in Linux - I recall briefly accessing a Debian package/distro repository on Rice University’s network. Of course, as I had no previous knowledge of Linux, I couldn’t make sense of what I was looking at. Fast forward seven years, and Debian 5.0 (Lenny) is released to the public (earlier this year). The documentation required to install Lenny, though copious, was more accessible, and support was offered by friendlier community channels. In seven years, Linux had become much more mainstream, and Debian itself had gone from strength to strength.

A few days ago, I resolved to experiment with this “archaic” version of Linux, and I downloaded the network installer. Having used Linux From Scratch and Gentoo, I found Lenny to be incredibly easy to install, and it didn’t take long before I was staring at the default Gnome Desktop. I cannot say whether Debian will come with its fair share of problems, and it is too early to claim that I will stay with Debian forever, but so far I am loving it. Debian is fast, solid, reliable, and an absolute pleasure to work with.