Blog/debian-planetPlein de truchttp://blog.lot-of-stuff.info//Blog/debian-planet/Plein de trucikiwiki2016-10-16T12:13:57ZTrying to install Debian on G752VM-GC006Thttp://blog.lot-of-stuff.info//Blog/Posts/Trying_to_install_Debian_on_G752VM-GC006T/2016-10-16T12:13:57Z2016-10-16T09:07:38Z
<p>I'm trying to install Debian GNU/linux on my new ASUS G752VM-GC006T</p>
<p>So what I've discovered:</p>
<ul>
<li>It's <code>F2</code> to have the bios, and in the last bios section, you can directly boot on any device.</li>
<li>It boot on the netinst DVD</li>
<li>netinst can't see the SSD disk</li>
<li>the trackpad doesn't work</li>
<li>after successful install, booting on the fresh install failed. I had to use the recovery tools to install nvidia non-free package to have debian successfully boot.</li>
<li>I mostly use sid on my computer (mostly to test problem, and report them). It was a bad idea: Debian stopped to find its own disk. adding <code>pci=nomsi</code> to the kernel option fix this.</li>
</ul>
<p>So I've a working linux. My problem are:</p>
<ul>
<li>I still can't see the SSD disk from linux</li>
<li>I cannot easily dualboot:
<ul>
<li>linux can't see the SSD where windows is,</li>
<li>windows boot loader don't want to start Debian, because it doesn't want to,</li>
<li>at least, the bios can boot both of them, but there is no "pretty" menu</li>
</ul></li>
<li>the trackpad is not working.</li>
<li>0.5 To feel small today...</li>
</ul>
<p>And the question is: where to report those bug.</p>
<p>First edit: rEFInd seem to find windows and Debian, thanks to <a href="https://rog.asus.com/forum/showthread.php?54491-Installing-Arch-Linux-on-my-G751-JY">blackcat77</a></p>
LudumDare35http://blog.lot-of-stuff.info//Blog/Posts/LudumDare35/2016-04-19T11:39:50Z2016-04-19T11:36:22Z
<h1 id="ludumdare35">Ludumdare 35</h1>
<p>For the Third time, I've submitted a compo to the <a href="http://ludumdare.com/compo/">ludumdare</a>. So I've a <a href="http://vanicat.github.io/geomatrix/">new game</a> (source available on <a href="https://github.com/vanicat/geomatrix">github</a>).</p>
<p>Some note about the technology used:</p>
<ul>
<li>this is a javascript/html5 game,</li>
<li>using the <a href="http://phaser.io/">phaser</a> framework.</li>
<li>Code has been wrote using Emacs and js2-mode,</li>
<li>tested with the <code>python -m SimpleHTTPServer</code> http server.</li>
<li><p>Sound:</p>
<ul>
<li>sfx is mostly recording of real life sound, edited with Audacity, but I've also used <a href="http://labbed.net/software.php?id=labchirp">labChirp</a> (inside wine...).</li>
<li><p>Music is done using <a href="http://boscaceoil.net/">Bosca Ceoil</a>.</p>
<p>Next time I will try <a href="https://lmms.io/">lmms</a>.</p></li>
</ul></li>
<li>Graphics are using <a href="http://www.aseprite.org/">aseprite</a> (mostly) and gimp (very little)</li>
<li>Level has been created using <a href="http://www.mapeditor.org/">Tiled</a></li>
</ul>
<p>Most of those tool are free software, Exception are labChirp (we have no source), and Adobe Air/flash that is used by Bosca Ceoil (but Bosca Ceoil is a free software).</p>
git-annex-on-hubichttp://blog.lot-of-stuff.info//Blog/Posts/git-annex-on-hubic/2015-11-03T21:49:14Z2013-10-28T11:40:17Z
<h1 id="agitannexhookforhubic">A Git annex hook for Hubic</h1>
<p>I've just finished the git annex hook I was writing. It create a
special remote that will use <a href="http://hubic.com/">Hubic</a> as a storage
for git annex's objects.</p>
<p>To use it, you will have to download it from
<a href="https://github.com/vanicat/hubic-swift">github</a>. It depend on</p>
<ul>
<li>ruby (the ruby debian package will do)</li>
<li>mechanize (the ruby-mechanize debian package, you can also use
gems)</li>
<li>dbus (the ruby-dbus package)</li>
</ul>
<p>To use it, you first need to initialize your account.</p>
<p>You need an hubic account, but also a client_id and client_secret,
that you can generate in <code>My account</code> then
<a href="https://hubic.com/home/browser/developers/">Developer</a>. For my hook
to work, you need to use <code>http://localhost:4090/</code> as the
Redirect URI (Domaine de redirection in french)</p>
<p>Credential will be stored in dbus's org.freedesktop.secrets service,
both gnome and kde will give you one. So run <code>hubic-git-annex-hook --init</code>,
it will ask for your hubic username, password, your client id
and your client secret that you just generate, and store them in the
org.freedesktop.secrets service.</p>
<p>Then configure git-annex to use it :</p>
<pre><code>git config annex.hubic-hook /full/path/to/hubic-git-annex-hook $HUBIC_USERNAME $CONTAINER
</code></pre>
<p>the CONTAINER is openstack concept, that contain the files.
Hubic use the container <code>default</code> for its synchronization application,
you should probably use another. If the CONTAINER do not exist, the
hook will create it.</p>
<p>You finally need to create the special remote :</p>
<pre><code>git annex initremote hubic type=hook hooktype=hubic encryption=none
</code></pre>
<p>(you could chose any other name than hubic), you can then
<code>git annex copy --to=hubic</code></p>
Key-transitionhttp://blog.lot-of-stuff.info//Blog/Posts/Key-transition/2015-11-03T21:49:13Z2013-10-05T08:22:41Z
<p>A recent
<a href="http://lists.debian.org/debian-project/2013/10/msg00002.html">discussion</a>
on debian-project remind me I have to do this:</p>
<pre><code>-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1,SHA256
Hello,
I am transitioning GPG keys from an old 1024-bit DSA key to a new
4096-bit RSA key. The old key will continue to be valid for some
time, but I prefer all new correspondance to be encrypted in the new
key, and will be making all signatures going forward with the new key.
This transition document is signed with both keys to validate the
transition.
If you have signed my old key, I would appreciate signatures on my new
key as well, provided that your signing policy permits that without
reauthenticating me.
The old key, which I am transitional away from, is:
pub 1024D/9057B5D3 2002-02-07
Key fingerprint = 7AA1 9755 336C 6D0B 8757 E393 B0E1 98D7 9057 B5D3
The new key, to which I am transitioning, is:
pub 4096R/31ED8AEF 2009-05-08
Key fingerprint = DE8F 92CD 16FA 1E5B A16E E95E D265 C085 31ED 8AEF
To fetch the full new key from a public key server using GnuPG, run:
gpg --keyserver keys.gnupg.net --recv-key D265C08531ED8AEF
If you have already validated my old key, you can then validate that
the new key is signed by my old key:
gpg --check-sigs D265C08531ED8AEF
If you then want to sign my new key, a simple and safe way to do that
is by using caff (shipped in Debian as part of the "signing-party"
package) as follows:
caff D265C08531ED8AEF
Please contact me via e-mail at <vanicat@debian.org> if you have any
questions about this document or this transition.
Remi vanicat
vanicat@debian.org
remi.vanicat@gmail.com
remi.vanicat@ens-lyon.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
iD8DBQFST8iPsOGY15BXtdMRAggfAJ4z5wEpUy8Bcicv9KTGOjsUAZF2xACfYKv9
GWXh8iT1N2Qqjhwtpvx9B3aJAhUDBQFST8iP0mXAhTHtiu8BCPldEADYM9e/22yu
En8lcZ5UUI/eQ5jFgZaxTZ90ShS0vPD/Mgn6xyKoeigA0Bk4ltTjDXA7vEWXLjOK
gbGv3SvffPJIsR1WJmhYtVyNquJXXjyElEBsbxvCJ/awYdU9BFXPqtLlLVCObvSc
bE9xlJhoLdk3bDqSSTO3nqoDa0qgPnJvwKNYIMBrNavGyIW3QT0BRUCKyBssqh+u
P4x8VhpHiR2Ee4LHfRVeJk+5ncvSXYluAohOXka5AnV2GgFQoVYfFqxn2Gh3BMWC
sqf/NUPnFOCSRw++oNP3mBv3jn/jZuo8BcVOECKL+/dO6/3otgO6a/5tUspfnAJA
m/UxBdc2vs7LkZ0wUipIHg10x4154f+hZfx4WuCJ05X0dqcKeh4eJ0zFBvxMyh+A
o2TfifT9WJlyb+Hah/w1MFAXI8cAj5RvwdVgTzcodXpggtpBpdLDvv3G1KYFm/TG
Zev480N6bGrBb3JKgUtAMuTls8+FngYtYg9YKBiajEDM3MVC+H4MiOzVNKV++y/n
YW3z59Oc04ZMi9hV+uR3kwq8D7aUJmc0QFeOGmq7W9LOjvVO+lTf87l3jh2ahxx/
FgiinSZr1YzE+9OtNj8CTsmAmApIxsTJUCR6h554z+lyrTwc0pdeUwzSWqV84k7G
V6HBmTiw9IGs22+W15pRzq/mCVYdrYT7zQ==
=c5fJ
-----END PGP SIGNATURE-----
</code></pre>
<p>Here is the <a href="https://lot-of-stuff.info/key-transition.txt">link</a> to the .txt
version for easier checking of signature.</p>
Git annex and Calibrehttp://blog.lot-of-stuff.info//Blog/Posts/Git_annex_and_Calibre/2015-11-03T21:49:13Z2013-08-13T12:25:29Z
<p>The debconf BoF about gitify all things make we to want to report some
of my git-annex use cases.</p>
<h1 id="theproblem">The problem</h1>
<p><a href="http://calibre-ebook.com/">Calibre</a> is a ebook manager that is
available in <a href="http://packages.debian.org/sid/calibre">debian</a>. I use
it to maintain my library, but also to dowload every day an epub
version of a French newspaper and then put it on my kobo.</p>
<h1 id="configuringgitannexforthis">Configuring git annex for this</h1>
<p>I wanted to use git-annex, so</p>
<pre><code> $ git init
$ git annex init "some useful name"
</code></pre>
<p>But I don't want every thing in annex, because Calibre use some text
file to save some metadata, so I used:</p>
<pre><code> $ git config annex.largefiles "include=* exclude=*.opf exclude=*.json"
</code></pre>
<p>then lets add everything</p>
<pre><code> $ git annex add *
$ git add *
$ git commit -m "first commit"
</code></pre>
<p>Calibre need read and write access on the its database, so let unlock it:</p>
<pre><code> $ git annex unlock metadata.db
</code></pre>
<p>On my other computer I only need to do</p>
<pre><code> $ git clone $user@$host:Calibre\ library
$ cd Calibre\ library
$ git annex init "another useful name"
$ git annex get .
$ git annex unlock metadata.db
</code></pre>
<p>The problem is that every time you will <code>git annex sync</code>, git annex
will lock again the metadata.db, so lets unlock it automatically. I
use git hooks, in <code>.git/hooks/post-commit</code> I have</p>
<pre><code> #!/bin/bash
git annex edit metadata.db
</code></pre>
<p>don't forget to make this file executable</p>
<pre><code> $ chmod a+x .git/hooks/post-commit
</code></pre>
<h1 id="daytodayoperation">Day to day operation</h1>
<pre><code> $ git annex add .
</code></pre>
<p>Will put new file into the annex</p>
<pre><code> $ git add .
</code></pre>
<p>Will take care of the files that should no go into annex</p>
<pre><code> $ git annex sync
</code></pre>
<p>Will make the repositories exchange informations about all this, and
make remote change local</p>
<pre><code> $ git annex get .
</code></pre>
<p>Will make remote book locally available</p>
<h2 id="mergeconflict">Merge conflict</h2>
<p>You should not run calibre on the two computer simultaneously, or
without syncing before it. If you do, you will have a conflict that
git-annex will automatically <em>solve</em> by rename both of the file.</p>
<p>You can then either:</p>
<ul>
<li>Choose one. If no books have been changed or added on one of the
computer, to use the other <code>metadata.db</code> will not make you loose
any information</li>
<li>rebuild it. <code>calibredb restore_database</code> won't do it, but will tell
you how to do it.</li>
</ul>
<h2 id="checkingthelibrary">Checking the library</h2>
<p>You can use <code>calibredb check_library</code> to check you library is
correct. If you use git for it, it will always tell you that it is not
correct: there is this author ".git" it doesn't know about. Just don't
care about it.</p>
<p>Maybe this can be solved by using <code>vcsh</code> but apparently
<code>vcsh</code>+<code>git annex</code> it not well tested yet.</p>
<h2 id="automaticstuff">Automatic stuff</h2>
<p>I use <code>mr</code> to automatically run all this, but some config could be
done (I believe) to have <code>git annex copy --auto</code> do what it should.</p>
<p>There are also the git annex assistant for this kind of automatic
synchronizations of contents, but I don't know if my automatic
unlocking of one file will break this.</p>
<p>It might be interesting to find someway to unlock and lock the library
only when running calibre, a simple script to launch calibre will do
that. Note that each time you will lock and unlock, you will have a
new commit in git.</p>
This is Debconf13http://blog.lot-of-stuff.info//Blog/Posts/This_is_Debconf13/2015-11-03T21:49:14Z2013-08-10T18:30:55Z
<p><img alt="Neuchâtel Lac" id="neuchtellac" src="http://blog.lot-of-stuff.info/Blog/Posts/This_is_Debconf13/view-from-debconf.jpg" /></p>
<p><a href="http://blog.lot-of-stuff.info/Blog/Posts/This_is_Debconf13/view-from-debconf-HD.jpg">The same In full resolution</a></p>
I'm going to Debconf13 Vaumarcushttp://blog.lot-of-stuff.info//Blog/Posts/I__39__m_going_to_Debconf13_Vaumarcus/2015-11-03T21:49:14Z2013-08-09T17:16:10Z
<p><img alt="Going to Debconf13" id="goingtodebconf13" src="http://media.debconf.org/dc13/artwork/dc13-btn1-going-bg.png" /></p>
<p>I'm going to debconf13. After been in debian for quite a long time, I finally will see in person some of those mail address I see for so long.</p>
Xorg and special keyshttp://blog.lot-of-stuff.info//Blog/Posts/Xorg_and_special_keys/2015-11-03T21:49:14Z2013-08-03T13:57:50Z
<h1 id="xorgandspecialkeys:onesolutionforkeycode255">Xorg and special keys: one solution for keycode>255</h1>
<h2 id="anhistoric">An historic</h2>
<p>I've buy an
<a href="http://www.materiel.net/telecommande-multimedia/antec-veris-multimedia-station-ez-45019.html">IR receiver</a>,
and an
<a href="http://www.lesnumeriques.com/telecommande-universelle/logitech-harmony-600-p8628/test.html">universal controller</a>
to control my multimedia computer, my TV, my ADSL box and my 2.1 Home
cinema.</p>
<p>I've been pleased to see that my universal controller do now more
control than the remote that was sold with my IR receiver. But a lot
of those control didn't work with Xorg, so I had to find someway to
use them.</p>
<p>At first, my logs where spamed with line like:</p>
<pre><code>imon 4-4:1.0: imon_incoming_packet: unknown keypress, code 0x100000e
</code></pre>
<p>(imon is the real builder of the IR receiver).</p>
<p>I looked for this on the internet and found</p>
<ul>
<li>the problem was known</li>
<li>the fix was in the Linus kernel git repository</li>
<li>but not in any released kernel</li>
</ul>
<p>So I waited, and Linux 3.10 was released, and the Debian Kernel Team
did include it in debian sid, so I could easily use it.</p>
<p>But some command was still unrecognized as key by Xorg, so I had to
find how to let X know them.</p>
<p>Reading documentation on internet, and trying some command lead
nowhere: the kernel did in fact understood very well the command, but
X did ignore them. After two day of trying to understood XKB, I found this
<a href="https://bugs.freedesktop.org/show_bug.cgi?id=11227">bug</a>: those key
was unavailable to X and XKB because their keycode was bigger than 255.</p>
<p>The first solution to this problem is this
<a href="http://www.thenautilus.net/cgit/xf86-input-evdev/commit/?h=code-remap-2.8.0">patch</a>,
but I prefer to use standard tool. I finally found that udev can remap
key, hence my solution:</p>
<h2 id="thesolution">The Solution</h2>
<p>To use key that have keycode bigger than 255, you need to have keycode
smaller than 255. keycode are determined by a map in the kernel,
that udev can set when the receiver is plugged.</p>
<p>You need a keymap. <code>input-kbd</code> from the <code>input-utils</code> package will
list the available scancode, and their current keycode (to know the
number of your input device, use <code>lsinput</code>):</p>
<pre><code>% sudo input-kbd 6
0x100007f = 106 # KEY_RIGHT
0x1000080 = 105 # KEY_LEFT
0x1007f00 = 108 # KEY_DOWN
0x1008000 = 103 # KEY_UP
0x1010000 = 272 # BTN_LEFT
0x1010080 = 272 # BTN_LEFT
0x1020000 = 273 # BTN_RIGHT
0x1020080 = 273 # BTN_RIGHT
0x200001e = 513 # KEY_NUMERIC_1
0x200001f = 514 # KEY_NUMERIC_2
</code></pre>
<p>(There is more, I just cut it there).</p>
<p>Putting this in some file (say <code>keymap</code>), editing it, and running
<code>sudo input-kbd -f keymap 6</code> should change the kernel
mapping. <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=625759">But it don't</a>.</p>
<p>It's not a problem, because the best solution is to use udev.</p>
<p>Wrote a keyboard mapping in say <code>/etc/udev/imon</code>:</p>
<pre><code>0x200001e KP1
0x200001f KP2
0x2000020 KP3
0x2000021 KP4
0x2000022 KP5
0x2000023 KP6
0x2000024 KP7
0x2000025 KP8
0x2000026 KP9
0x2000027 KP0
0x2800000 MENU
0x288795b7 PAGEDOWN
0x289395b7 PAGEUP
</code></pre>
<ul>
<li>You don't need to put there the scancode and keycode you don't divert,</li>
<li>the interesting scancode are found by <code>input-kbd</code></li>
<li>you can also use <code>input-events</code> to find which scancode correspond to one key</li>
<li>the interesting keycode are in <code>/usr/include/linux/input.h</code>, note that this is not the same thing than X keycode...</li>
</ul>
<p>You then need to tell udev to load this mapping, with
<code>/etc/udev/rules.d/96-local-keymap.rules</code>:</p>
<pre><code>ACTION=="remove", GOTO="mykeyboard_end"
KERNEL!="event*", GOTO="mykeyboard_end"
ENV{ID_INPUT_KEY}=="", GOTO="mykeyboard_end"
SUBSYSTEMS=="bluetooth", GOTO="mykeyboard_end"
SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id"
ENV{ID_VENDOR}=="15c2", ENV{ID_MODEL_ID}=="0042", RUN+="keymap $name /etc/udev/imon"
LABEL="mykeyboard_end"
</code></pre>
<p>You will need to adapt <code>15c2</code> and <code>0042</code> to you own remote. I've found
those using <code>lsusb</code></p>
<pre><code>Bus 004 Device 014: ID 15c2:0042 SoundGraph Inc.
</code></pre>
<p>I could now use xkb to further refine the way those key are used by xorg...</p>
New printer: Samsung SCX-3400http://blog.lot-of-stuff.info//Blog/Posts/New_printer:_Samsung_SCX-3400/2015-11-03T21:49:14Z2013-03-29T13:56:59Z
<p>I've just buy a new printer/scanner, and as the documentation found on the web on how to setup the printer falsely instruct me to download some third-party driver, I will explain here how to set it up:</p>
<ul>
<li>for the printing part, plug the printer, ask cups to look for new printer, and add it to cups. It just work.</li>
<li><p>for the scanner, it doesn't work as easily. After having installed xsane, go to /etc/sane.d/xerox_mfp.conf, and add:</p>
<pre>
# Samsung SCX-3400
usb 0x04e8 0x344f
</pre>
<p>somewhere in the file.</p>
<p>then copy /lib/udev/rules.d/60-libsane.rules to /etc/udev/rules.d/60-libsane.rules, and add:</p>
<pre>
# Samsung SCX-3400
ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="344f", ENV{libsane_matched}="yes"
</pre>
<p>You don't need to download samsung unified Linux driver for it to work.</p></li>
</ul>
<p>By the way, Dear lazy web, I was wondering. In gimp, when I ask it to create a new image using Xsane, the menu give me the choice between the "Device Dialog" or my webcam. Is there any way to have my scanner there?</p>
Sofware as servicehttp://blog.lot-of-stuff.info//Blog/Posts/Sofware_as_service/2015-11-03T21:49:13Z2012-07-16T06:24:21Z
<p>Someone recently give me a link to a web picasa photo album. I wanted to download all the photo in good resolution, but the only official way to download it is by using the picasa proprietary software. </p>
<p>Not only I'm not thrilled to install yet another unfree software, but Google refuse me to download it because "Picasa is not currently available for your operating system". Another solution exist, but need some research:</p>
<ul>
<li>You need a Grease monkey <a href="http://userscripts.org/scripts/show/119849">userscript</a> that add links in the overview to download the image</li>
<li>Then the <a href="http://www.downthemall.net/">DownThemAll extension</a> will download all those link...</li>
</ul>
<p>Some time, its great to be able to beat limitation of unfree software thanks to free software. </p>