Recent blog entries for prla

3 Oct 2014 (updated 4 Oct 2014 at 18:35 UTC) »

Having just recently acquired a brand new Toshiba Satellite Z30-A-130 laptop and after booting Ubuntu 14.04 on it, one thing I immediately wanted to disable was the touchpad. It seems way too sensible and I keep touching while typing, taking the focus away. Turns out it wasn't super easy, at least until I figured it out.

The first obvious idea was to check the System Settings panel for Keyboard and Mouse hoping for a "disable touchpad" option but none was to be found on my fresh Ubuntu install.

$ xinput list

...didn't show the touchpad entry either, even though it was working alright. The idea was to disable it via CLI:

$ xinput set-prop [device number] "Device Enabled" 0

But having no device and hence no device number, I couldn't do it either. The final bit that led me in the right direction was:

$ synclient -l
Couldn't find synaptics properties. No synaptics driver loaded?


So, a bit more poking around and it turns out linux-kernel 3.13 may not be the best bet for driving these touchpads. Someone reported success with 3.17 and it does have indeed much better support. My days of recompiling infinite numbers of kernels everyday (by hand, mind you) were long gone and it's been a good few years since I last had the need to try a different kernel. But I quickly learned that Ubuntu has a kernel team and they wonderfully package every release in all .deb glory. They even package the -low-latency variant too, which I immediately chose over the -generic one. :)

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.17-rc7-utopic/linux-headers-3.17.0-031700rc7_3.17.0-031700rc7.201409281835_all.deb
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.17-rc7-utopic/linux-headers-3.17.0-031700rc7-lowlatency_3.17.0-031700rc7.201409281835_amd64.deb
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.17-rc7-utopic/linux-image-3.17.0-031700rc7-lowlatency_3.17.0-031700rc7.201409281835_amd64.deb
$ sudo dpkg -i *.deb
$ sudo update-grub


And presto. One reboot later and I now have full control over the touchpad, even from the system settings which makes sense as all that was missing was a proper synaptics driver.

Update 2014-10-04: Turns out linux 3.17-rc7, despite fixing the synaptics driver issue, is a bit quirky when it comes to the wifi driver, as the connection suddenly drops and won't reconnect. -rc1 seems to be OK and it's the first version to feature synaptics support for my touchpad, so that's what I'll be using for the time being.

3 Oct 2014 (updated 3 Oct 2014 at 14:55 UTC) »

Interesting how having a couple of technical notes to jot down immediately brought this place here back to mind. Even more interesting, at least for me, to look back at the past few entries, how they always seem to be written in pivotal moments in my personal (and professional) life. This present one doesn't deviate from that. More on that (perhaps) later.

So after falling off the end of the contract with my previous employer, I now find myself unemployed and looking forward to the next step. That also meant handing in my work laptop and considering how archaic my own Macbook Pro now seems to be, I felt it was the time to splash some hard-earned money on a new machine. Having had a regular Intel machine for the past few months at work - a Dell Latitude laptop as it was - that meant another stint using (Ubuntu flavored) Linux both for work and fun. Having lived quite a few years (almost a decade) in Macintosh land, I didn't entirely leave the Unix world but it's just not the same thing, from a developer's point of view. I guess I was still pining for the days of Slackware Linux and how tight a grip I had over everything that I thoroughly enjoyed going back to a scenario very much resembling it.

Faced with the task of acquiring a new machine, this meant going back to a Mac was out of the question for now, the plan being to extend my stay in the familiar surroundings of Linux. The work laptop had an Intel Core i7 quad-core processor and, most importantly, an SSD hd. Meaning: fast. Some shop browsing both on and offline yielded my current machine, under 1k€, a 13.3" Toshiba Satellite Z30-A-130, boasting a lesser Core i5 cpu but featuring a 256GB SSD hd. Getting used to it, the natural ongoing process of adaptation, but very happy so far with it.

Which leads us to the next post...

Being on the verge of getting employed by a new tech company seemed like the right time to resume writing here.

I'm still working out details with my future employer, and it will probably be official today, if all goes to plan. I have already been assigned a task, in order to test my capabilities as a developer, which I have been doing for the past week. This, by the way, was a jQuery-based date picker to narrow the presentation of some values over time.

In order to help me get acquainted with the codebase and getting my bearings, the company's lead developer has been of invaluable help for these past few days. It's always a great experience when you're able to learn from someone you respect and who proves to be very knowledgeable about the problems at hand.

What I'm NOT knowledgeable about, and which has honestly been a bit discomforting, is being a Git fool. Reading The Git Reference is something I'm about to do.

More news about this step of my life as I get them...

Oh look, after so long, Advogato is still here. Maybe I start jotting down some notes again, why not?

5 Jul 2008 (updated 5 Jul 2008 at 00:07 UTC) »

It's been an interesting evening. Back at my parents home tonight (will leave back to Evora tomorrow), I've been trying to get the information system framework to run in the new Mac Mini that currently lives in my bedroom. So this entry goes some way towards documenting this evening's trip.

Leopard ships with a fully functional Apache 2.2 copy and getting PHP5 to play along with it is a simple matter of uncommenting one line in httpd.conf. Installing PostgreSQL is a breeze using Marc Liyanage's PostgreSQL package, not forgetting to set the cluster creation encoding to Latin1. This is because everything in the information system is Latin1 and it saves a lot of headaches.

The trouble began when I noticed that Leopard didn't really ship with PostgreSQL bindings in its PHP5 installation. So basically there was no choice other than recompiling PHP from scratch. I tried Marc's PHP5 package which includes PostgreSQL support but alas it all went well until the installation process bombed out in the end with a cryptic error.

So, off to compiling PHP's source which had me searching for the Leopard DVDs so I could install XCode's tools, namely gcc. Once that was done, compiling PHP was a breeze. Problem was that once it got installed, Apache complained that the PHP module had the wrong architecture. One minute of Googling told me that Leopard's Apache comes pre-configured for all 4 archs and so I need to do that for whatever I install that interfaces with it. This is a prospect that clearly sucked.

Miraculously, someone came up with a much better and hassle free choice: stripping the httpd binary of the surplus architectures and leaving 32-bit only. Here's the magic sauce:


$ cd /usr/sbin
$ sudo cp httpd httpd-fat
$ sudo lipo httpd -thin i386 -output httpd

Works like a charm.

Et voila'. It's up and running!

Now I'm spent, I better crawl to bed.

3 Jul 2008 (updated 3 Jul 2008 at 22:07 UTC) »

Adapting to development under CakePHP and the university's information system architecture has been slow but steady and really picked up today. Now I see that whatever I developed in the past under MVC frameworks has really been scarce. It obviously helped to understand the foundations of what models, views and controllers are but I guess I still hadn't grasped what they really are. That, alas (or not), only comes with extensive exposure to somewhat complex system that use them.

In any case, it's been a really interesting trip so far and the best side effect has been learning a lot of simple but neat Emacs tricks with Gonçalo, my supervisor on this particular project. Another important thing is that I'll probably be developing another information system, with different subject matter entirely, and the knowledge I've been acquiring will surely prove invaluable later on. Today has been somewhat of a breakthrough, as I've been implementing from scratch a lot of functionality which, despite simple at the core, were nothing but a major headache less than a week ago.

And when it comes to database design, I may not come up with the best relational designs in the world but I surely understand them much more clearly. Proof is how different (and may I add worse) a schema for a side project of mine was before I got to work on this stuff here and now that I learned a couple of things.

Oh and I've been carrying the Macbook along to work again. I simply cannot live without this baby and I guess using a shitty keyboard on the desktop also prevents me from really feeling comfortable. Other than that I just miss the comfort I find in Mac OS, regardless of my everlasting love for Linux, which I've used for over a decade now.

It's also been two months since I started working and the truth is that I've done little else on the side. Football Manager 2008 Portuguese translation has kicked off and there's a web app I'd like to take a stab on but both are on the backburner until I get back on my feet, so to speak. The translation, however, I need to start as soon as possible.

More to come. Interesting, albeit difficult tiresome and sometimes nerve-wrecking, times.

Database engineering has always been an hassle for me and now I have to deal with quite a bit of it. Now I kinda like it and have been learning a lot. Helps to work directly below someone who's proficient and oozes experience. In the process I've also been picking up a lot of emacs tricks which are a huge help for productivity. This, in fact, is a direct result of leaving my Macbook at home now and using the desktop that's been assigned to me at work.

model name : Intel(R) Core(TM)2 Duo CPU E4500 @ 2.20GHz

So, what I'm developing at work is an information system to manage the performance evaluation of public administration workers and their superiors. In Portugal, this is called SIADAP. I need to deliver the first part of the system, up and running, by the end of next week and not being entirely too productive using CakePHP yet is a bit of a problem.

In the meantime, my back is killing me again. I always predicted I'd have back problems but not when I'm bloody 24 going on 25. I'm hoping I won't need to pay a visit to the osteopath this time around, but it all depends on how I feel later today.

Forgot the damn Pattern Recognition book back in my parents' home. Meaning I'll have to start reading something else for the next couple of weeks. Strongest candidates are "Quantico" by Greg Bear and "Life of Pi" by Yann Martel. I think Quantico will win by a nose, for now.

Hitting a wall at work, I can't seem to get the information system codebase checkout to properly run in my development machine's Apache. Something's up either with the Apache config or the CakePHP config itself. Either way, it's worrying me because I need to get up to speed as soon as possible and here I am wasting time not able to get things even running, let alone write some code.

More on this later...

Hard to believe it's been this long.

Doing the lazy lazy thing for the whole weekend, not giving a damn about any work. Finally finished "Neuromancer" which was both interesting and confusing in places. I guess reading about technology from 1985 with over 20 years of real world hindisight on that same technology explains my confusion. SF authors are right a lot of the time, but not always. Nevertheless, I feel better having finally read it and it amazes me how much "The Matrix" actually resembles this. Now I'm reading "Pattern Recognition" by the very same William Gibson and enjoying it quite a lot more, about 100 pages into it.

Work has picked up and writing information systems for important things in CakePHP is a mystery that slowly unfolds. I better get proficient writing web apps with this framework and that right soon.

Yesterday, made a detour in Lisbon to get D. to the bus station so she could get home for the weekend and decided to go to Colombo's FNAC while I was at it in order to buy Porcupine Tree tickets for the October gig in Almada. While doing so, couldn't resist the fresh money in my wallet, so to speak, and got myself a couple of treats: Portishead's "Third" and Black Mountain "In The Future". Both are sublime and will surely feature in my Top 10 come the end of the year. Unless the second half of the year is absolutely crazy in terms of sheer quality.

But, alas or not, the weekend is coming to an end and I need to pack, shower, dine and get my ass moving back to Evora. Work resumes tomorrow at 9am and I never thought I'd be happy to have a 9-5 job, but I do. I needed the stability for a while.

10 Nov 2006 (updated 10 Nov 2006 at 08:53 UTC) »
Adventures in LDAP land

Until recently, I honestly had no idea what LDAP was all about. My work has now led to me research it a bit and implement a small sized solution for the research centre. I still have no idea what LDAP is all about, but here’s some scribblings I’ve gathered on the matter while we’re at it. Getting LDAP to work on Linux with the OpenLDAP tools is largely a matter of figuring out the right schemas, filling the database, and pointing things at it. But why LDAP? When administering a network of more than trivial size, it soon becomes a pain to create and maintain user accounts. An LDAP server can be used to provide a central point of control for Unix and Samba accounts, as well as email and web server authentication. There’s always more to it than meets the eye, but in this particular instance what we want here is to have a set of workstation machines in a private subnet behind a router - which incidentally acts as the LDAP server as well - having central authentication. Basically, all user login information is stored in the server, leaving only local root (and services) accounts in each machine for administration purposes. Moreover, we want each user home directory to be remotely mounted in an external file server (the HP MSA1000 storage array I’ve been blabbering about) via NFS. This last part will be covered in a forthcoming post. Onwards to the configuration… setting up LDAP involves configuring both the server and how many clients we want using LDAP authentication. In this case, we’re working off a Debian system, configuration filenames can and will vary across different distributions. (The following is, again, in a personal notes style, if you come across this and need any further explanation, feel free to email me and I’ll try my best to help). SERVER SIDE

# apt-get install slapd ldap-utils

Configuration of these, depending on your setup and environment, should be something along these lines:

Omit OpenLDAP server configuration? no
DNS domain name: ldap.example.org
Name of your organization: example_organization
Admin password: <administrative LDAP password>
Database backend to use: BDB
Do you want your database to be removed when slapd is purged? no
Allow LDAPv2 protocol? no

Now is probably a good time to setup some basic organizational/user/group information. This can be done either from scratch, perhaps using some app to manage LDAP, or using a basic set of LDIF (LDAP Data Interchange Files) files. See http://www.moduli.net/pages/sarge-ldap-auth-howto under “Set Up Base Information and Test User and Group” for more on this. One nitpick, also covered in the aforementioned guide, is allowing users to change their own details, including password, as is usually possible when the accounts are stored locally. This can be achieved by editing /etc/ldap/slapd.conf and adding:

access to attrs=loginShell,shadowLastChange,gecos
by dn="cn=admin,dc=ldap,dc=example,dc=org" write
by self write
by * read

CLIENT SIDE

# apt-get install ldap-utils libpam-ldap libnss-ldap nscd

LDAP Server host: 1.2.3.4
The distinguished name of the search base: dc=ldap,dc=example,dc=org
LDAP version to use: 3
Database requires login? no
Make configuration readable/writeable by owner only? yes

The distinguished name of the search base: dc=ldap,dc=example,dc=org
Make local root Database admin: yes
Database requires logging in: no
Root login account: cn=admin,dc=ldap,dc=example,dc=org
Root login password: <enter LDAP admin password here>
Local crypt to use when changing passwords: md5

In /etc/nsswitch.conf:

passwd: ldap files
group: ldap files
shadow: ldap files

In /etc/ldap/ldap.conf:

BASE dc=ldap,dc=example,dc=org
URI ldap://1.2.3.4 # your ldap server IP here

Followed by /etc/init.d/nscd restart. PAM

# apt-get install libpam-passwdqc

Debian has a series of files in /etc/pam.d appended by common- at the beginning of their names, which are included by the other files in that directory for specific services. We can tell PAM to use LDAP for all of these services by modifying these common files. In /etc/pam.d/common-password, comment out and replace:

password required pam_unix.so nullok obscure min=4 max=8 md5

or:

password required pam_cracklib.so retry=3 minlen=6 difok=3
password required pam_unix.so use_authtok nullok md5

with:

# try password files first, then ldap. enforce use of very strong passwords.
password required pam_passwdqc.so min=disabled,16,12,8,6 max=256
password sufficient pam_unix.so use_authtok md5
password sufficient pam_ldap.so use_first_pass use_authtok md5
password required pam_deny.so

Read the pam_passwdqc man page for more about parameters you can give to it. In /etc/pam.d/common-auth comment:

auth required pam_unix.so nullok_secure

replace with:

# try password file first, then ldap
auth sufficient pam_unix.so
auth sufficient pam_ldap.so use_first_pass
auth required pam_deny.so

/ In /etc/pam.d/common-account comment:

account required pam_unix.so

replace with:

# try password file first, then ldap
account sufficient pam_unix.so
account sufficient pam_ldap.so
account required pam_deny.so

And don’t forget to edit /etc/libnss-ldap.conf (which, by the way, on other systems is called /etc/ldap.conf) ! That would have saved me an entire afternoon… REFERENCES

#

127 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!