pages tagged Debianrohieb.namehttps://rohieb.name/blag/tag/Debian/rohieb.nameikiwiki2019-05-05T21:56:21ZThe rohieb.name Debian repositoryhttps://rohieb.name/projects/rohieb-name-repo/2013-11-11T02:30:22Z2013-11-08T23:49:38Z
<h2 id="contents">Contents</h2>
<p>My personal Debian repository currently contains the following software:</p>
<ul>
<li><code>infopoint-html</code>, the <a href="https://rohieb.name/projects/infopoint-html/">Infopoint HTML Viewer</a></li>
</ul>
<h2 id="instructions">Instructions</h2>
<p>On any recent Debian system, open a terminal and do the following:</p>
<ul>
<li>Be root (or use <a href="http://manpages.debian.net/cgi-bin/man.cgi?query=sudo&manpath=Debian+7.0+wheezy&format=html&locale=en"><code>sudo</code></a> in front of the following commands).</li>
<li><p>Add the repository to your <code>sources.list</code> by installing the package
<code>rohieb.name-repo-keyring</code>:</p>
<pre><code># echo "deb http://packages.rohieb.name/debian testing main" > \
/etc/apt/sources.list.d/rohieb.name.list
# apt-get update
[apt-get warns about missing public keys, that’s okay]
# apt-get install -y --allow-unauthenticated rohieb.name-repo-keyring
# apt-get update
</code></pre></li>
<li><p>Double-check the key fingerprint. <code>apt-key fingerprint</code> should contain the
following key and fingerprint, but nothing else under that section:</p>
<pre><code>/etc/apt/trusted.gpg.d/rohieb.name-repo-keyring.gpg
---------------------------------------------------
pub 2560R/86748A36 2013-11-07 [expires: 2017-11-06]
Key fingerprint = 4D51 6412 405B E4A1 328F FCC1 F6D2 9C49 8674 8A36
uid rohieb.name Package Signing Key <packages@rohieb.name>
sub 2560R/E0CD07C7 2013-11-07 [expires: 2017-11-06]
</code></pre>
<p>(If you want to know more about secure APT repositories, read the manpage
for <a href="http://manpages.debian.net/cgi-bin/man.cgi?query=apt-secure&manpath=Debian+7.0+wheezy&format=html&locale=en"><code>apt-secure</code></a>.)</p></li>
</ul>
A Lesser-Known Feature of kill(1)https://rohieb.name/blag/post/a-lesser-known-feature-of-kill-1-/rohieb
CC-BY-SA 3.0
2013-11-08T23:14:00Z2013-11-08T23:14:00Z
<h2 id="problem">Problem</h2>
<p>I was debugging a program, which suddenly died with</p>
<pre><code>QFATAL : TestEdge::testSaveRemove() Received signal 11
</code></pre>
<p>For better understanding of the problem, it would be nice to know what
the meaning of “signal 11” is.</p>
<h2 id="solution">Solution</h2>
<p>I was not so fluent in signal numbers (maybe I should take <a href="http://www.memrise.com/course/158486/unix-signals/">a
course</a>). Of course, I <em>could</em> dig in the <a href="http://manpages.debian.net/cgi-bin/man.cgi?query=signal&apropos=0&sektion=7&manpath=Debian+7.0+wheezy&format=html&locale=en"><code>signal(7)</code> man
page</a>, or in the respective C header (<code>signal.h</code>). However,
while digging in the manpages, I noticed that <code>kill(1)</code> does not only
kill processes, but also does exactly what I want.[^1] Citing from the
<a href="http://manpages.debian.net/cgi-bin/man.cgi?query=kill&apropos=0&sektion=0&manpath=Debian+7.0+wheezy&format=html&locale=en">man page</a>:</p>
<pre><code>-l, --list [signal]
List signal names. This option has optional argument, which
will convert signal number to signal name, or other way round.
</code></pre>
<p>[^1]: At least the version in Debian, which is from
<a href="https://gitorious.org/procps">procps</a></p>
<p>So I could just say:</p>
<pre><code>$ kill -l 11
SEGV
</code></pre>
<p>Ah, segmentation fault. Nice to know <img src="https://rohieb.name/smileys/smile.png" alt=":-)" /></p>
<p>In addition, the man page also mentions a useful parameter <code>-L</code>, which
prints a nice table of signal numbers and mnemonics:</p>
<pre><code>$ /bin/kill -L
1 HUP 2 INT 3 QUIT 4 ILL 5 TRAP 6 ABRT 7 BUS
8 FPE 9 KILL 10 USR1 11 SEGV 12 USR2 13 PIPE 14 ALRM
15 TERM 16 STKFLT 17 CHLD 18 CONT 19 STOP 20 TSTP 21 TTIN
22 TTOU 23 URG 24 XCPU 25 XFSZ 26 VTALRM 27 PROF 28 WINCH
29 POLL 30 PWR 31 SYS
</code></pre>
<p>(Also, the man page also warns about <code>kill</code> probably being a shell
built-in. At least the Bash and zsh built-ins also know <code>-l</code>, but not
<code>-L</code>, so you have to call <code>/bin/kill</code> explicitly.)</p>
Portal on Linux: fix black screen without textureshttps://rohieb.name/blag/post/portal-on-linux-fix-black-screen-without-textures/rohieb
CC-BY-SA 3.0
2013-11-09T04:24:49Z2013-10-29T03:26:12Z
<p><strong>Problem:</strong> I just bought <a href="http://store.steampowered.com/app/400/">Portal</a> for Linux. When I start the game on my
AMD64 laptop with Debian testing, I only see black objects, and a few light
stripes in between. Everything else works, I can hear sound, I can interact with
objects, and I can look and around, in which case the stripes also move in the
right directions, so they seem to be speckles or reflections rendered on
objects, and only the textures are missing.</p>
<p><strong>Solution:</strong> Searching the Steam forums resulted in nothing (who would have
guessed), but <a href="https://01.org/linuxgraphics/comment/358#comment-358">this forum post</a> suggested to update Mesa to version 9.2
and install <code>libtxc-dxtn</code> or <code>libtxc-dxtn-s2tc0</code>. This packages were not
installed on my system, and the description for the package says that it is used
for texture compression, so it seems to be related. So I first tried to install
the i386 version:</p>
<pre><code>aptitude install libtxc-dxtn-s2tc0 libtxc-dxtn-s2tc0:i386
</code></pre>
<p>After restarting Portal, the problem was gone, so I refrained from updating my
Mesa <img src="https://rohieb.name/smileys/smile.png" alt=":-)" /></p>
<p>Before and after images (probably Copyright by Valve, but I consider this to be
fair use):</p>
<div class="gallery">
<table class="img"><caption>Before installing
`libtxc-dxtn-s2tc0`. Only faint lines are visible.</caption><tr><td><a href="https://rohieb.name/blag/post/portal-on-linux-fix-black-screen-without-textures/testchmb_a_000000.jpg"><img src="https://rohieb.name/blag/post/portal-on-linux-fix-black-screen-without-textures/x200-testchmb_a_000000.jpg" width="250" height="200" alt="Before" class="img" /></a></td></tr></table>
<table class="img"><caption>After installing
libtxc-dxtn-s2tc0, everything is great.</caption><tr><td><a href="https://rohieb.name/blag/post/portal-on-linux-fix-black-screen-without-textures/testchmb_a_000002.jpg"><img src="https://rohieb.name/blag/post/portal-on-linux-fix-black-screen-without-textures/x200-testchmb_a_000002.jpg" width="250" height="200" alt="After" class="img" /></a></td></tr></table>
</div>
SSH key authentication with encrypted home directorieshttps://rohieb.name/blag/post/ssh-key-authentication-with-encrypted-home-directories/rohieb
CC-BY-SA 3.0
2019-05-05T21:56:21Z2010-10-08T22:00:00Z
<p>Yesterday, I ran into an interesting problem: I tried to set up <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ssh&sektion=1#AUTHENTICATION">SSH
public key authentication</a> between two of my machines, <code>c3po</code> and
<code>r2d2</code>, so I could log in from <code>rohieb@r2d2</code> to <code>rohieb@c3po</code> without a
passphrase. However, everytime I tried to login to <code>c3po</code>, I was
prompted to enter the passwort for <code>rohieb@c3po</code>, and the debug output
mentioned something that the key could not be verified. More
astonishing, when I established a second SSH connection while the first
was still running, I was <em>not</em> prompted for a password, and debug output
said that key authentication had been sucessful. I googled a bit, and
after a while got to <a href="https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/362427/comments/12">this comment</a> on Launchpad, mentioning problems
when the user on the remote machine had its home directory encrypted
through ecryptfs – which was the case for me. Of course, since ecryptfs
only encrypts the user’s home <em>after</em> he has been authenticated, the SSH
daemon cannot read his <code>~/.ssh/authorized_keys</code> at the first time, and
falls back to password authentication.</p>
<p>The Launchpad comment proposes to first unmount the ecryptfs filesystem,
then store <code>~/.ssh/authorized_keys</code> unencrypted, and then mount the
encrypted home again (<strong>note</strong> that no program should be running that
could try to access your home directory):</p>
<pre><code>$ ecryptfs-umount-private
$ cd $HOME
$ chmod 700 .
$ mkdir -m 700 .ssh
$ chmod 500 .
$ echo $YOUR_REAL_PUBLIC_KEY > .ssh/authorized_keys
$ ecryptfs-mount-private
</code></pre>
<p>This works indeed, but has the drawback that key authentication only
works for the <em>first</em> login, because ecryptfs hides the unencrypted
files when it mounts the encrypted directory on login; and you had to
synchronize the encrypted and the unencrypted version of
<code>authorized_keys</code> everytime you add a new key. To circumvent that, I
simply moved the file to <code>/etc/ssh/authorized_keys/rohieb</code> (with the
file only readable and writable by me, and <code>/etc/ssh/authorized_keys</code>
writeable for all users) and adjusting <code>/etc/ssh/sshd_config</code>
appropriately:</p>
<pre><code>$ sudo vi /etc/ssh/sshd_config # or use your favorite editor instead of vi
[... some lines ...]
AuthorizedKeysFile /etc/ssh/authorized_keys/%u
[... some more lines ...]
$ sudo /etc/init.d/ssh restart
</code></pre>
<h2 id="update">Update</h2>
<p>There is yet a better approach instead, which doesn’t need the SSHd
config to be edited at all:</p>
<ol>
<li>login to the user on the remote machine</li>
<li>create <code>/home/.ecryptfs/$USER/.ssh</code> and put your <code>authorized_hosts</code> there</li>
<li><p>symlink your encrypted version there:</p>
<pre><code>$ ln -s /home/.ecryptfs/$USER/.ssh/authorized_hosts ~/.ssh/authorized_hosts
</code></pre></li>
<li><p>symlink your unencrypted version there (as above, <strong>make sure</strong> no
process wants to write to your home directory in the meantime):</p>
<pre><code>$ ecryptf-umount-private
$ mkdir ~/.ssh
$ ln -s /home/.ecryptfs/$USER/.ssh/authorized_hosts ~/.ssh/authorized_hosts
$ ecryptfs-mount-private
</code></pre></li>
</ol>
<p>The paths are for Ubuntu 9.10 (Karmic Koala) and later. On other
systems, you might want to replace <code>/home/.ecryptfs</code> with
<code>/var/lib/ecryptfs</code>.</p>
ZSNES on AMD64 Ubuntuhttps://rohieb.name/blag/post/zsnes-on-amd64-ubuntu/rohieb
CC-BY-SA 3.0
2019-05-05T21:56:21Z2010-10-05T22:00:00Z
<p><strong>[ Update, 2013-10:</strong> This post post is not up to date anymore. On newer
Debians (since 7.0/wheezy) and Ubuntus (at least since 12.04, Precise Pangolin),
you should be able to install zsnes out of the box: <code>sudo apt-get install
zsnes:i386</code>. For details see the MultiArch documentation for
<a href="https://wiki.debian.org/Multiarch/">Debian</a> and <a href="https://help.ubuntu.com/community/MultiArch">Ubuntu</a>. <strong>]</strong></p>
<p>Before I bought my current hardware, I was working on a 32-bit-based
system, and I really appreciated ZSNES as an SNES emulator. But
unfortunately, my new hardware was an AMD64 system, and there is
currently no ZSNES package for 64-bit Ubuntu or Debian <img src="https://rohieb.name/smileys/sad.png" alt=":(" /> So I decided
to google a bit about the issue, but it took me until now (a year later)
to get ZSNES finally working on my machine. The problem is, if you build
ZSNES on a 64-bit machine, all the application does is segfault at
start, and if you <a href="http://board.zsnes.com/phpBB3/viewtopic.php?p=118067&sid=dd9a2a54d9178eb5009c33586aea703c#p118067">try to compile for 32-bit systems</a>, you get errors
about missing 32-bit libs (in particular, configure does not find a
suitable <code>libsdl</code>). Instead, if you just take the binary which was
compiled on a 32-bit system, and install the <code>ia32-libs</code> package,
everything seems to work—at least I was able to play a few levels of
Super Mario World succesfully <img src="https://rohieb.name/smileys/smile.png" alt=":-)" /> </p>
<p>So here was my idea: take the 32-bit package from the Ubuntu repository,
and just change the Architecture control field, and by this fool dpkg :P
And as it turned out, this idea worked great. You can get the Debian
package here if you want, it <em>should</em> work for Ubuntu Karmic and Lucid,
as well as for Debian testing (<strong>but</strong> I only tested it on Lucid, so
there is no warranty here—but I’m happy to hear if it works :-)):</p>
<ul>
<li><a href="http://rohieb.name/stuff/zsnes_1.510-2.2ubuntu3~ppa1_amd64.deb">zsnes_1.510-2.2ubuntu3~ppa1_amd64.deb</a></li>
<li>SHA1: <code>716bbd37267b477ef02961a7727212619309b83f</code></li>
<li>MD5: <code>452ea5230ad17df1dee649ab4cc6c8c0</code></li>
</ul>
<h2 id="howtoreproduceit">How to Reproduce It</h2>
<p>For the curious people reading here, here is what I actually did:</p>
<ol>
<li><code>wget http://archive.ubuntu.com/ubuntu/pool/universe/z/zsnes/zsnes_1.510-2.2ubuntu3_i386.deb</code></li>
<li><code>ar x zsnes_1.510-2.2ubuntu3_i386.deb</code></li>
<li><code>tar xzf data.tar.gz</code></li>
<li><p>Edit <code>usr/share/applications/zsnes.desktop</code> and added <code>-ad sdl</code> to the
<code>Exec:</code> field, otherwise it would just segfault on the first run:</p>
<pre><code>Exec=zsnes -ad sdl
</code></pre></li>
<li><p>Edit <code>usr/share/doc/zsnes/changelog.Debian.gz</code> and added a new
changelog entry for the version (just copy one of the previous
entries and adapt it)</p></li>
<li><code>tar xzf control.tar.gz</code></li>
<li><p>Edit the <code>control</code> file, changed the <code>Version:</code> and <code>Architecture:</code>
field to <code>amd64</code>, added the <code>ia32-libs</code> dependency, and set myself as
maintainer:</p>
<pre><code>Package: zsnes
Version: 1.510-2.2ubuntu3~ppa1
Architecture: amd64
Maintainer: Roland Hieber <foobar@example.org>
Installed-Size: 4160
Depends: ia32-libs, libao2 (>= 0.8.8), libc6 (>= 2.4), libgcc1 (>= 1:4.1.1),
libgl1-mesa-glx | libgl1, libpng12-0 (>= 1.2.13-4),
libsdl1.2debian (>= 1.2.10-1), libstdc++6 (>= 4.1.1), zlib1g (>= 1:1.2.2.3)
[...]
</code></pre></li>
<li><p>Change the <code>md5sums</code> file for the right values for
<code>usr/share/applications/zsnes.desktop</code> and
<code>usr/share/doc/zsnes/changelog.Debian.gz</code> (I used the <code>md5sum</code>
command and copy-pasted it)</p></li>
<li><code>tar czf control.tar.gz control md5sums postrm postinst</code></li>
<li><code>tar czf data.tar.gz usr/</code></li>
<li><code>ar r zsnes_1.510-2.2ubuntu3~ppa1_amd64.deb debian-binary
control.tar.gz data.tar.gz</code></li>
</ol>
<p>I’m afraid that I can’t put the package into <a href="https://launchpad.net/~rohieb/+archive/ppa">my PPA</a>, Launchpad only
accepts source packages for uploads, and builds the binary packages
itself, both for i386 and AMD64. This approach can not be used here,
since we needed the i386 binary for AMD64.</p>
Greetings from GNOMEhttps://rohieb.name/blag/post/greetings-from-gnome/rohieb
CC-BY-SA 3.0
2013-09-19T05:04:01Z2009-12-26T23:00:00Z
<p>Now this is really useful: there is a <a href="http://www.gnome.org/~seth/gnome-blog/">GNOME panel applet</a> for
writing blog posts (for the Debian/Ubuntu folks: it’s in the package
<code>gnome-blog</code>). Just gotta try it out <img src="https://rohieb.name/smileys/smile.png" alt=":-)" /></p>
<p><strong>Edit:</strong> Unfortunately, there is no possibility to assign tags or
categories this way <img src="https://rohieb.name/smileys/sad.png" alt=":-(" /></p>
Dell Latitude E5500 and Magic SysRqhttps://rohieb.name/blag/post/dell-latitude-e5500-and-magic-sysrq/rohieb
CC-BY-SA 3.0
2013-09-19T05:04:01Z2009-11-16T23:00:00Z
<p>At work I’m using the Dell Latidude E5500 notebook, running on Debian
testing. Today, I had some issues with Xorg which could not detect my
keyboard and mouse, so I tried to do the Magic SysRq tricks (you can
read about it at <a href="https://rohieb.name/(http://en.wikipedia.org/wiki/Magic_SysRq)">Wikipedia</a>). Unfortunatley, to press <code>SysRq</code> (on
<code>F10</code>), I had to use the <code>Fn</code> key, so if I pressed e. g.
<code>Alt</code>+<code>Fn</code>+<code>SysRq</code>+<code>U</code>, the <code>U</code> was detected as <code>keypad 4</code> because of
the <code>Fn</code> key. Luckily, it works as intended if you release the <code>Fn</code> key
after having pressed <code>Fn</code>+<code>SysRq</code>, so to remount all mounted filesystems
in read-only mode, you would actually hold <code>Alt</code>, hold <code>Fn</code>, hold
<code>SysRq</code>, release <code>Fn</code>, press <code>U</code>.</p>
<p>Never thought notebook keyboards were so smart <img src="https://rohieb.name/smileys/smile.png" alt=":-)" /></p>