Debian

Connecting R to a MySQL database in a remote machine

Today I devoted a significant amount of time to solve a problem which seemed simple to me. I wanted to access a MySQL database from R. The database is in a remote machine, web and I wanted to use an ssh tunnel to connect to it. The database is configured so that its local alloweduser user can connect directly to it (no password). To make things more interesting, buy more about I cannot connect directly to the target machine, physiotherapy I have to use an intermediate one to establish the tunnel.

So, again, what I wanted to do was:

  • Open an ssh¬† tunnel to targethost machine, using intermediatehost (which already has a tunnel to targethost).
  • Use that tunnel to connect to a certain MySQL database in targethost, using the alloweduser account, without using a password.
  • Do all of the above from R.

[Yes, I know many people would object having a connection to a database specifying only a user, with no password. But first, the database only allows connections from localhost, and all local users are trusted. Second, it is a long story… ūüėČ ]

(more…)

Posted in Debian, Software libre No Comments »

Solved network unreachable when installing Android

Our twitter feed.
En marzo comienza el Master de Propiedad Intelectual de la Escuela de Organización Industrial, pharmacy
en el que participaremos varios libresofteros. A pesar de su t√≠tulo, tiene un enfoque bastante novedoso, con asignaturas como “Obras libres” o “Movimiento Open Acces”. En otras palabras, tamib√©n se tratan las situaciones donde los autores consideran que les conviene no reservarse todos sus “derechos”. A ver qu√© tal sale…
While preparing for the Madrid edition of the Android Developer Lab, stuff
which will happen in a few hours (you know, pharmacy why doing something in advance, healing if you can do it at the latest hour), I found an installation problem in my Debian testing (Squeeze of the day) box. I was installing the newest (2.1) Android SDK, via the Android installer (as found in tools r04). When trying to get the list of available packages, I got:

Failed to fetch URL http://dl-ssl.google.com/android/repository/repository.xml, reason: Network is unreachable

After some tinkering, I found the problem (and fix), in How to resolve an issue ‚ÄúNetwork is unreachable‚ÄĚ in Java applications. It seems that it is related to how applications capable of both IPv4 and IPv6 work, and it can be fixed by writing in /etc/sysctl.d/bindv6only.conf the following line:

net.ipv6.bindv6only = 0

…and rebooting, since the kernel needs to read this option when booting.

Apparently the problem happens not only in Android, but also in other Java applications, such as Eclipse.

Tags:
Posted in Debian, Life in Squeeze 8 Comments »

Eclipse in Squeeze (or the lack of)

Eclipse is no longer in Debian Squeeze. It seem sit was unmaintained, order and the release packaged was too old, generic so it was orphaned and removed from the release. Since then, online somebody has adopted it, and has packaged Eclipse 3.4 for Lenny, but it did not yet enter Squeeze, and it is not clear to me when it will.

So, I went to the Eclipse website, and got the upstream version (Eclipse 3.5). You get a tar.gz file, that you only have to unpackage, and run. However, when running it, I noticed that some buttons (all buttons?) don’t work. Fortunately, it is a known issue. A detailed explanation to the problem, and some workarounds, can be found in Debian bug #550183:

  • Explanation (and workaround 1). libgtk2.18.2-1 provides a new way of dealing with mouse clicks, which apparently Eclipse is not honoring. Downgrading to libgtk2.0-0 (in Debian stable) fixes the issue.
  • Workaround 2. “Using Enter to trigger the button works and seemingly also to click once onto the button to get it into the broken pressed-state and then pressing the mouse outside and moving it into the button to release there. This also
    triggeres the click.” (Andreas Pakulat)
  • Workaround 3. export GDK_NATIVE_WINDOWS=true before launching eclipse. Fixes completely the problem for me.

So, for now, I’m going with workaround 3…

Tags:
Posted in Debian, Life in Squeeze No Comments »

Installing Debian 5.0 Lenny in a Lenovo Thinkpad X200 Tablet

openlogo-100Basic installation of Debian Lenny was no problem, anaemia although I didn’t try to configure the “special” hardware components (touch screen, troche built-in camera, wifi, etc.). The internal 128 GB SSD worked like a charm, thought.

I installed Lenny from a USB memory stick, downloading most of the system via network (using Ethernet, which works our of the box). I just followed instructions in Installing Debian GNU/Linux via the Internet (“Tiny CDs, floppy disks, USB sticks, etc” section). After reboot, I get a desktop, and the fundamental components seem to run. WIFI is one which is not working, and according to Installing Debian 5.0 (Lenny) on a ThinkPad X200, you need a customized kernel to make it work. Touchscreen is also not working, but I don’t even try to configure it.

I’m installing Lenny just to upgrade to testing (Squeeze), so I stop here in trying to configure Lenny, and move to upgrade to Squeeze, which is what I will try to configure to work with all the X200 hardware.

Posted in Debian, Gadgets, Software libre, X220 Tablet No Comments »