25 May 2015
I recently got a 10 x 6.25-inch Graphic Monoprice drawing tablet via Massdrop. It turns out that these tablets are actually re-branded Huion devices, supported by recent kernels and by the Digimend driver. Mine is a Huion H610. ElementaryOS Freya’s kernel is apparently patched to contain the necessary drivers, and everything worked out of the box in terms of reading input.
However, the coordinates on the tablet are mapped to X11 coordinates. Since I have two monitors, this means that every coordinate on the tablet is mapped against a corresponding coordinate on the combined surface of both my screens, which makes navigation extremely awkward. This can be solved by modifying the coordinate transformation matrix. The easiest way to do this is to use the neat tool xrestrict, which simply prompts you to click on the desired screen and sets up the coordinate transformation matrix to restrict inputs to that screen for the tool you just clicked with. It is currently not available in the official repos, but building and running it was fairly straightforward.
19 May 2015
As Jessie now uses systemd by default, the old trick of editing
/etc/default/acpi-support doesn’t work. In stead, you have to edit
/etc/systemd/logind.conf and add the line
In my case, suspend was really slow to kick in, and I have no idea why. In other words, in case you have a newly installed laptop server that dies a while after having its lid closed, this is probably your problem. Also, mine typically crashed on resume, because, hey, it’s 2015 and suspend/resume is apparently still hard.
21 Apr 2015
I have a method for teaching myself complex new things that I have developed over my 8 years (and going!) as a university college student. Of course, reality is neither this sequential nor this formal, but something along these lines goes very far. It is also important to note that this process is repeated over several cycles for most university courses, so you can not simply assume that a single course is a domain in the sense used here.
1. Get a feeling for the topic
Learning something entirely (or mostly) new is quite stressful, if you are anything like me. So one of the most important things during the inital stages of planning is to cushion the blow as much as possible in order to avoid a negative emotional association with the topic that will hamper my learning. You can do this in a variety of ways; eat ice cream while studying. Study outdoors, in the sun. Use your favourite pen. Tell yourself while reading that you are a fantastic person. Read in small increments, and switch to a more familiar topic. Try to find familiar things within the current topic and find out more about them (this will also help you remember and understand better, so it is a good idea for that reason as well). Think breadth, not depth here.
You are supposed to get a feeling for the general outline and history of the domain you are studying, not become an expert. If you can impress someone who have never heard about compiler design for typed functional languages at a party, you are probably on the right track. Also, if you are under some sort of external control or supervision, this is a good time to start figuring out what they expect of you. If you are taking a university course, old exams are probably very useful to get an idea of what is expected of you. Almost every topic is significantly wider and deeper than any of their courses, and you need to be at least mostly in the same ballpark as your examinators.
2. Find help
The second stage is always to find good help. It may come in the form of an instructor, an older student, a friend, parent, a good book or an on-line resource. It is depressingly seldom your course book, however, because the course book is usually so close to the favored teaching method of your lecturers and/or course planners that you may as well skip reading the book and just attend the classes. Not every helper needs to be smarter or more knowledgable on the topic than you are (in fact, it is probably useful if at least one is not), but you need people, preferrably live people, to discuss your problems with, both in the form of assigned problems and in the form of things you encounter. Very few domains are smooth surfaces without oddities or irregularities, and when you hit them, you probably need someone to at least tell you that you are still sane. Also, be advised that books and other still text/picture resources are usually much, much worse than people
in every aspect but availability here.
It typically requires much less work to find a person who understand a problem and have them explain it to you, than it does to bang your head against a description in a book until you have squeezed yourself past the hurdle, so keep a few “smart people” handy. If you do this, you will quickly find yourself becoming a “smart person”, by association.
3. Run into the wall, repeatedly
To understand complex problems you will need to keep seeing them, keep working at them, and keep doing them, even when everything hurts and life is horrible and my god you are way too stupid to figure this out anyway, the smart people must be aliens or something. You need to find mostly bite-sized problems in the domain and practice them over and over again, until they become trivial. This is the point where you develop deeper knowledge of your domain. At the very least, you must learn to recognise, use, and understand the domain’s words, concepts, how everything fits together, and the relationships to other domains, possibly also a knowledge of the history of the domain.
What historical problems have been tackled by the domain? How were they solved? Why? What factors limited/controlled its development? What factors are in play today? What words do experts use, and what do they mean (in a dictionary sense)? What wider concepts are used, and what need do they correspond to? What do they explain? What sorts of mechanised operations (e.g. addition, subtraction, multiplication) are you expected to perform readily? What sorts of things (objects, concepts, people) is the domain about? Generate a lot of questions, and make sure you answer them. This is where you need your help. It is vitally important to never, ever ignore the impulse to just accept things as they are, because that means you are mechanising too big chunks of knowledge. You need to understand not only how things are, but also why they are, historically and theoretically.
It frequently helps me to take pauses when trying to solve or understand a hard problem. I often find that my brain somehow backgrounds the task, and may have made some progress when I return to the problem at a later time. This type of very active, heavy-lifting studying will quickly wear you out, so make sure to combine it with other types of work for the best use of your time.
The final part is to memorise what you have understood. My tool of choice is flaschards in Anki, but anything that works for you is fine here. The idea is, somewhat paradoxically, to ask yourself questions you already know the answers to, repeatedly and over time.
There are several things you may want to memorise: words, phrases, common methods, patterns… Basically, anything you need to have readily at hand in your head later on. Try to make the flashcards minimal, so that they only test a single word, concept, association, operation etc, and try to make the examples so simple that you can do any calculation or pattern matching almost immediately in your head. If you need to memorise more complex operations or concepts, make sure that you also have cards of their atomic concepts and methods. Think of this phase as long-term storage of your new knowledge. Practice every day.
Also, try to talk about what you have learnt with your friends/family/random people on the internet/your cat.
12 Apr 2015
I like the focus follows mouse focus behaviour. To set it in Elementary OS (including the recently released Freya), one can simply modify the GSettings database from a simple terminal command:
gsettings set org.gnome.desktop.wm.preferences focus-mode 'sloppy'.
12 Apr 2015
- Install the .deb from steam:
sudo dpkg -i steam_latest.deb.
- Fix the proken dependencies (because Steam does not just use the default terminal emulator…):
sudo apt-get -f install (it will pull in xterm).
To run Steam in Freya on a 64-bit machine, you need a 32-bit environment. However, as ElementaryOS is based on Ubuntu LTS, you can’t install the “normal” libGL/Mesa libraries as Steam tries to do. In stead, you need the LTS versions. So before running Steam, do
sudo aptitude install libgl1-mesa-dri-lts-trusty:i386 libgl1-mesa-glx-lts-trusty:i386 libc6:i386.
Now you can start Steam!