Debian/Ubuntu and MacOS X. Sharing files using netatalk


If you are trying to share files using a fast protocol (that’s not samba) which fits into debian and MacOS you should install netatalk package.

You will find the trap only if you are using netatalk from the usual Debian apt-source and if you have altered MacOS X default to do not use clear text passwords.

You’ve 2 solutions:

  • MacOS X won’t connect to the Debian Linux server, just saying that the access name or password wasn’t right, but has never asked for one. Just enable clear text passwords in MacOS X when you connect to an afp server and it will work like a charm.
  • OpenSSL support is currently disabled, because of licensing issues: The Free Software Foundation and Debian consider the GNU General Public License (GPL) under which Netatalk is licensed to be incompatible with the OpenSSL license.You can build locally with OpenSSL using the following commands

Using netatalk you can use any Debian server as a time machine backup, just read some manuals to know how.

Quick reference

To be up to date, look into /usr/share/doc/netatalk/README.Debian
usuario@LOCAL:~/$ sudo aptitude install devscripts
usuario@LOCAL:~/$ sudo aptitude build-dep netatalk
usuario@LOCAL:~/$ apt-get source netatalk
usuario@LOCAL:~/$ cd netatalk-*
usuario@LOCAL:~/$ dch -l +ssl -D local –force-distribution “Local build with OpenSSL.”
usuario@LOCAL:~/$ DEB_AUTO_UPDATE_DEBIAN_CONTROL=1 DEB_BUILD_OPTIONS=openssl debuild -us -uc
(You my need additional build-dependencies not resolved automatically.)
usuario@LOCAL:~/$ dpkg -i ../netatalk*.deb

Alternatively you can subscribe to unofficial(!) precompiled packages by adding the following to your /etc/apt/sources.list:

usuario@LOCAL:~/$ cat /etc/apt/sources.list
#where following $DIST=stable, testing, unstable, wheezy, …
#look into to know which one are available
deb $DIST netatalk

Here are my config files

usuario@LOCAL:~/$ cat /etc/netatalk/afpd.conf
# default:
# – -tcp -noddp -uamlist, -nosavepassword
– -transall -uamlist -nosavepassword -advertise_ssh
usuario@LOCAL:~/$ cat /etc/netatalk/AppleVolumes.default
# The line below sets some DEFAULT, starting with Netatalk 2.1.
: DEFAULT: options:upriv,usedots
/PATH/TO/MY/disk MYDISKNAME allow:myselecteduser cnidscheme:dbd options:usedots,upriv
# End of File

Links and references

Change desktop/virtualbox console/command line resolution for linux

Tired of using a little and poor window 640×480 terminal window with your virtualbox/desktop console

First, edit /etc/default/grub and change/uncomment variable GRUB_GFXMODE with your desired value.


Later on, you should also edit /etc/grub.d/00_header and insert “gfxpayload=keep” as seen next:

if loadfont make_system_path_relative_to_its_root ${GRUB_FONT_PATH} ; then
set gfxmode=${GRUB_GFXMODE}
set gfxpayload=keep
insmod gfxterm
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don’t
# understand terminal_output
terminal gfxterm

If you want to know which resolutions have you got available, you can use hwinfo (hwinfo package in Debian and so)

jack-sparrow:/home/enrgar# hwinfo –framebuffer
02: None 00.0: 11001 VESA Framebuffer
[Created at bios.464]
Unique ID: rdCR.h_b_dKkqAnF
Hardware Class: framebuffer
Model: “NVIDIA MCP79 Board – mcp7a-uo”
Vendor: “NVIDIA Corporation”
Device: “MCP79 Board – mcp7a-uo”
SubVendor: “NVIDIA”
Revision: “Chip Rev”
Memory Size: 14 MB
Memory Range: 0xd1000000-0xd1dfffff (rw)
Mode 0x0300: 640×400 (+640), 8 bits
Mode 0x0301: 640×480 (+640), 8 bits
Mode 0x0303: 800×600 (+800), 8 bits
Mode 0x0305: 1024×768 (+1024), 8 bits
Mode 0x0307: 1280×1024 (+1280), 8 bits
Mode 0x030e: 320×200 (+640), 16 bits
Mode 0x030f: 320×200 (+1280), 24 bits
Mode 0x0311: 640×480 (+1280), 16 bits
Mode 0x0312: 640×480 (+2560), 24 bits
Mode 0x0314: 800×600 (+1600), 16 bits
Mode 0x0315: 800×600 (+3200), 24 bits
Mode 0x0317: 1024×768 (+2048), 16 bits
Mode 0x0318: 1024×768 (+4096), 24 bits
Mode 0x031a: 1280×1024 (+2560), 16 bits
Mode 0x031b: 1280×1024 (+5120), 24 bits
Mode 0x0330: 320×200 (+320), 8 bits
Mode 0x0331: 320×400 (+320), 8 bits
Mode 0x0332: 320×400 (+640), 16 bits
Mode 0x0333: 320×400 (+1280), 24 bits
Mode 0x0334: 320×240 (+320), 8 bits
Mode 0x0335: 320×240 (+640), 16 bits
Mode 0x0336: 320×240 (+1280), 24 bits
Mode 0x033d: 640×400 (+1280), 16 bits
Mode 0x033e: 640×400 (+2560), 24 bits
Mode 0x0345: 1600×1200 (+1600), 8 bits
Mode 0x0346: 1600×1200 (+3200), 16 bits
Mode 0x0347: 1400×1050 (+1400), 8 bits
Mode 0x0348: 1400×1050 (+2800), 16 bits
Mode 0x0349: 1400×1050 (+5600), 24 bits
Mode 0x034a: 1600×1200 (+6400), 24 bits
Mode 0x0352: 2048×1536 (+8192), 24 bits
Mode 0x0360: 1280×800 (+1280), 8 bits
Mode 0x0361: 1280×800 (+5120), 24 bits
Mode 0x0362: 768×480 (+768), 8 bits
Mode 0x0364: 1440×900 (+1440), 8 bits
Mode 0x0365: 1440×900 (+5760), 24 bits
Mode 0x0368: 1680×1050 (+1680), 8 bits
Mode 0x0369: 1680×1050 (+6720), 24 bits
Mode 0x037b: 1280×720 (+5120), 24 bits
Mode 0x037c: 1920×1200 (+1920), 8 bits
Mode 0x037d: 1920×1200 (+7680), 24 bits
Config Status: cfg=new, avail=yes, need=no, active=unknown

Links and references

Howto to intercommunicate processes in different(remote) machines through DBus


In this post I’m going to try to connect two processes in different machines through DBus. The method is a little bit complex, so be patient if you try.
Also is to advert that this has been the result of 3 days of tests (reference1). So maybe this method may be improved with time and use reference2.

Tools (The actors)

  • dbus
  • gabriel
    • socat
    • libssh
  • ssh
  • your apps

Debian official packages are dbus libssh-2 socat
gabriel is not part of Debian yet (but I’ve build one for myself)

Knowledge (Actors curriculum)

In this section I will describe the basics about the tools we are going to use.

DBus. Extracted from DBus page:

D-Bus is a message bus system, a simple way for applications to talk to one another. In addition to interprocess communication, D-Bus helps coordinate process lifecycle; it makes it simple and reliable to code a “single instance” application or daemon, and to launch applications and daemons on demand when their services are needed.

D-Bus supplies both a system daemon (for events such as “new hardware device added” or “printer queue changed”) and a per-user-login-session daemon (for general IPC needs among user applications). Also, the message bus is built on top of a general one-to-one message passing framework, which can be used by any two apps to communicate directly (without going through the message bus daemon). Currently the communicating applications are on one computer, or through unencrypted TCP/IP suitable for use behind a firewall with shared NFS home directories.

Gabriel is a simple utility to enable D-Bus clients to connect to a D-Bus daemon running on a remote machine, through SSH.
This is the main piece of this puzzle. If you are interested in understanding how it works you should take a look at socat and libssh. As I’ve had to take a look at code, and make some modifications, you should read it as a punishment.

Extracted from socat man page:

socat – Multipurpose relay (SOcket CAT)
socat is a command line based utility that establishes two bidirectional byte streams and transfers data between them. Because the streams can be constructed from a large set of different types of data sinks and sources (see address types), and because lots of address options may be applied to the streams, socat can be used for many different purposes. It might be one of the tools that one ‘has already needed´.

Libssh. Extracted from libssh page:

The ssh library was designed to be used by programmers needing a working SSH implementation by the mean of a library. The complete control of the client is made by the programmer. With libssh, you can remotely execute programs, transfer files, use a secure and transparent tunnel for your remote programs. With its Secure FTP implementation, you can play with remote files easily, without third-party programs others than libcrypto (from openssl).

You should know about ssh and about your application.


Local host will run gabriel and your application.
Remove host will need a running ssh server, a running dbus server and will need socat installed and ready to use.
We need to run gabriel, that will act as a server that will connect our host to the remote host through SSH. After that gabriel will use this SSH connection to intercommunicate our local application with remote DBus applications by using socat.

Remote DBus communication Architecture
Remote DBus communication Architecture

Howto (Main action)

At the moment I’ve only achieved to connect a process using session-bus, I’m still testing until I get connection through system-bus which was my initial purpose.
After reading next information, you will be able to connect using session bus and system bus.

As I commented somewhere else, I’ve made some modifications on gabriel code. I needed some common parameters as SSH port (my virtualbox testing environment ), better help explanations or add a verbose output.
Gabriel establish a connection with the remote ssh and by socat commands it communicates with the remote DBus “environment”. You should administrate ssh parameters and Dbus parameters to gabriel.

We have to put special attention to -d, –bus-address=BUS_ADDRESS because this info must be gotten from the REMOTE machine.
That address is the one used by processes to communicate through DBUS. It’s something “internal” and automatically done when you use DBus api/library. I’m going to show you where to get it.


Again, this info should be gotten from REMOTE machine.
At the moment I don’t know any nice command where to get this info.
We have two main options of DBus buses. System and Session (more info in DBus page).
If you need SESSION bus address, you can choose what it better fits you:

  • You can can get it from process environment
  • You can stole it from any other process suspicious from being involved in DBus activities…
  • You can create your own dbus-daemon (which, actually, I don’t know if it uses it’s own BUS_ADDRESS)

If you need SYSTEM bus address, you can choose what it better fits you:

  • You can can get it from process environment. If it’s not defined, take a look at /etc/dbus-1/system.conf where you should locate a string like <listen>unix:path=/var/run/dbus/system_bus_socket</listen>
  • You can stole it from any other process suspicious from being involved in DBus activities…


This command gives you a dbus-daemon in your session with the one you can contact.

Howto (Main action): Back to local host

Those ugly unix:stri:ngs/asdkaj/numbers we have seen is what we need for -d, –bus-address=BUS_ADDRESS.
See a session example:

See a system example:

The moment we have or gabriel server running we (may have nothing) need to set DBUS_XXX_BUS_ADDRESS. Many apps would use, or have, this environment variable to connect to a DBus instance and intercommunicate with other process.
This is is easy, DBUS_XXX_BUS_ADDRESS should be the address gabriel shows few instants after being launched.
When we have defined this environment variable (in command line) we can execute our app, and it will happily communicate with the remote DBus world.

dbus-browser is a program that uses a session bus.

Curiosity: DBus protocol messages interchanged

Modifying a couple of lines in gabriel can let you see DBus raw protocol messages. It’s a didactic info.
If you enable verbose code at least at level 2, you will get raw DBus protocol messages.

My modifications and hacks

Code will be publish under GLKM project page.

Links and references
  • dbus site
  • gabriel site
  • socat site
  • libssh site
  • reference 1. (informational note, it had implied jumping into gabriel, libssh, and dbus code and testing with a virtualbox machine)
  • reference 2. (personal note, take a look at “Securing traffic between two socat instances using SSL” article in socat page)

Howto access a Virtualbox guest machine throught ssh (or how to port forwarding)

This is not an original article (see references), it’s just an archived one “por si las moscas”.


By default, the network connection in Virtualbox is set to NAT, that is every packet coming from the Guest machine is modified so that it seems as it has come from the Host machine. In this way it’s easy for the Guest machine to connect to all the rest of the network (the Internet included) but nobody can start a connection with the Guest Machine since it’s hidden behind the Host one.

So, if you want to use a server service in your Guest machine (i.e. Apache or SSH) you have two choices:

  1. pass to Virtualbox Host network connection;
  2. make Virtualbox forward all the packets arriving to a certain port of the Host machine.

This article will describe how to do the latter, in particular in the case of the ssh server. This is an interesting case because it allows you to simulate very well a quite common condition: connecting to a remote Linux headless machine.

We have a guest machine with a running ssh server which accepts connections on the TCP port 22.
Our goal is to make any packet arriving at a given TCP port (i.e. 2222) of the host machine, to be forwarded to the TCP port 22 of the guest machine.
Fortunately, there is Virtualbox command which permits to do it almost instantly: VBoxManage.

Configuration needed

In our case we will use Debian as the guest machine name (quote in case guest machine name contains spaces), here are the commands that you have to type in the host machine (real one) console as your user (if you use another user it will try to look for its virtual machines):

user@machine $ VBoxManage list vms
VirtualBox Command Line Management Interface Version 1.5.6_OSE
(C) 2005-2008 innotek GmbH
All rights reserved.
Name: debian
Guest OS: Linux 2.6
UUID: 814e25f4-451e-4582-8d34-71a1cd437cdd
Config file: /mnt/extra/virtualizacion/virtualbox/debian/debian.xml
Memory size: 195MB
user@machine $ VBoxManage setextradata debian “VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort” 2222
VirtualBox Command Line Management Interface Version 1.5.6_OSE
(C) 2005-2008 innotek GmbH
All rights reserved.
user@machine $ VBoxManage setextradata debian “VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort” 22
VirtualBox Command Line Management Interface Version 1.5.6_OSE
(C) 2005-2008 innotek GmbH
All rights reserved.
user@machine$ VBoxManage setextradata debian “VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol” TCP
VirtualBox Command Line Management Interface Version 1.5.6_OSE
(C) 2005-2008 innotek GmbH
All rights reserved.

HostPort,GuestPort,Protocol are just string examples and can be changed without any consequence. Just remember your choices if you want to remove them later.
I guess you should be careful with pcnet substring, as maybe it should have something to see with your selected network card type.


Once you have typed the above commands, you need to close the guest machine (a reboot won’t be sufficient), restart it and then connect via ssh with:

anyuser@machine$ ssh -l >user< -p 2222 localhost

Replace localhost with the host machine ip address if you are connecting from another computer.

By the way, you can check which customizations have been already set for your Guest Machine with VBoxManage by typing:

user@machine$ VBoxManage getextradata debian enumerate
VirtualBox Command Line Management Interface Version 1.5.6_OSE
(C) 2005-2008 innotek GmbH
All rights reserved.
Key: GUI/LastWindowPostion, Value: 0,6,1028,820
Key: GUI/Fullscreen, Value: off
Key: GUI/AutoresizeGuest, Value: off
Key: GUI/LastCloseAction, Value: powerOff
Key: GUI/SaveMountedAtRuntime, Value: yes
Key: GUI/Seamless, Value: off
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort, Value: 2222
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort, Value: 22
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol, Value: TCP

or remove one, for example “VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort”, by setting it without any value:

user@machine$ VBoxManage setextradata “VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort”

Links and references

WHYFLOSS Madrid Conference 08


En los días 8 y 9 del mes de Mayo se celebrará la cuarta edición de la WhyFLOSS Conference, con entrada libre y gratuita.

Con un importante apoyo de la Escuela de Informática de la Universidad Politécnica de Madrid, Campus Sur se presentarán conferencias variadas entorno a las tecnologías abiertas de IT.

Estarán colaborando en la IV edición del evento compañí­as como SUN, Red Hat, OpenBravo, Andago, SIE, Liferay, Opentia, Monolabs, Accenture, Avanzada7 y universidades como la UPM y la URJC, así­ como comunidades de proyectos como LibreSoft, OpenSolaris y FFII.


El evento se realizará en la Escuela de Informática de la Universidad Politécnica de Madrid. Se encuentra ubicada en el Campus Sur de la UPM en la carretera de Valencia Km. 7 en la Ciudad de Madrid (España).
Información de localización de la Whyfloss Madrid 2008



Inauguración WHYFLOSS Conference 08.
Alejandro Sánchez Acosta, Neurowork

Open-Cities: el reto de la administración electrónica
Guillermo Pastor, Ándago Ingeniería S.L.

VII Programa Marco en la UE: FLOSS Include y FLOSS Metrics
Jesús Gonzalez Barahona, LibreSoft

Modelos de negocio basados en Asterisk (la plataforma de VoIP basada en Software Libre)
Juan Ignacio Cabrera, Avanzada 7

Clustering Computacional en CSIC
Raul Diaz Medina, Sistemas Informáticos Europeos S.L.

Descanso para comer

La implicación de la FFII en los estándares abiertos en Europa
Alberto Barrionuevo, Presidente de Foundation for a Free Information Infrastructure (FFII) / OPENTIA, S.L.

Caso de exito OpenSolaris en Accenture
David Galan Ortiz, Accenture Outsourcing

¿Es viable el software Open Source en la Industria? El caso de Red Hat Linux y JBoss
Jesús González de Buitrago, Red-Hat


Evolución e influencia del Software Libre en los 10 últimos años
Juantomás García, Monolabs

Liferay Enterprise Portal: The project, the product, the community and how to extend it
Alvaro del Castillo San Félix, Liferay Inc.

Openbravo: las claves del éxito del desarrollo en las aplicaciones en software libre
Representative, OpenBravo Inc

Rocks: Distribucion para clusters computacionales
Jesús Espino García, Sistemas Informáticos Europeos

Descanso para comer

Seguridad en OpenSolaris
Victor M. Fernandez, SIA / OpenSolaris Hispano

Django: Framework MVC en Python
Jesús Espino García, Sistemas Informáticos Europeos

Notas personales (idem a la pasada edición):

  • He de decir que conozco al organizador principal.
  • Yo voy
Referencias y enlaces

A lo que diga el marca, lo mismo que lo que digan en misa

Ni puto caso.

Bueno, acabo de llegar a casa (mejor dicho a casa de mis padres) y lo primero, queridos lectores, ha sido reiniciar el servidor que se me ha quedado tarumba. No se si habrá sido por el disco duro o qué, no respondía ni al teclado, ni a las sysrequest ni na. Un fallo grave, porque como bien sabéis todos, a GNU/Linux estas cosas no le hace falta, y a una Debian menos.

A la cuestión que vamos, después de estos menesteres culinarios, es a un comunicado que acabo de leer en el boletín electrónico del Club Baloncesto Estudiantes. Mi club baloncestístico por excelencia, para los nuevos. No se puede resumir mucho pero os resalto lo fundamental:

El Club Estudiantes quiere mostrar su malestar con el diario deportivo Marca por sus informaciones publicadas hoy […] referentes al encuentro correspondiente a la 16ª Jornada […]. El artículo firmado por el periodista Jesús Sánchez (titulado `Atraco´ al León en el Madrid Arena) ataca duramente a la Liga ACB, a su estamento arbitral y fundamentalmente al Club Estudiantes, […].

Como viene siendo habitual en los últimos meses, la parcialidad y la falta de rigor con la que el diario Marca trata la información del Club Estudiantes es impropia de un medio de comunicación de su prestigio. Este hecho se vio reflejado ayer en la comparecencia de prensa post partido del técnico visitante, ante la continua insistencia del periodista en que el arbitraje había sido vergonzoso.

Para poneros en situación, el Estudiantes en los instantes de redacción de esta entrada, se encuentra en penúltima posición de la liga ACB. Y con un juego lamentable hasta hace nada, añado.

Tras leer la noticia lo primero es ir a ver lo que tal periodista (aunque dudo que en esa redacción haya alguno y que además ejerza su profesión) ha dicho en el papelucho de ese llamado diario. Uno de esos que antiguamente usaban los obreros para envolverse el bocata y que ahora no vale ni para eso porque te puede dejar un olor fétido y repetitivo en la comida que para qué contaros.
Vaya por Buda, una lástima, en la edición publicada en Internet sobre el partido no se han dignado ni a publicarlo. Han tirado de agencia EFE y han colocado un artículo con este titular: “Los colegiales sumaron su tercera victoria consecutiva en casa“.

Si es que la prensa deportiva, perdón, siento el gravísimo error, la prensa-futbolera, de este país dejó de existir hace muchos años. Probablemente sean los mismos años que cuando empezó la guerra de televisiones. Aquella que trajo consigo tal cantidad de dineros que el resto de deportes dejó de importar en decenas de redacciones.

Podría decir más barbaridades, pero el texto que he resaltado del párrafo anterior creo que aclara suficientemente mi postura. Si no fuese por Internet y por portales como o, qué sería de la información baloncestística.

Aupa Estu. Ahora es la hora.

Referencias y enlaces:

Una ola llamada GNU/Linux II (Segunda parte)

Continuación de Una ola llamada GNU/Linux I (Primera parte)

Algunas de las razones del éxito

[] El poder de Linux
[] 2006: El Año de Linux
[] five reasons why linux will eventually rule the world

Algunas de las empresas que impulsan el software libre

Si alguna vez pensaste que esto de linux era algo cutre, o que surgía de la nada, que se te quite de la cabeza. Mira quién paga a una buena parte de los desarrolladores e ingenieros de linux.

Empresa Porcentaje
(Desconocida/Gente por libre) 25,0 %
Red Hat 12,8 %
IBM 7,4 %
Novell 5,9 %
Linux Foundation 5,2 %
Intel 3,6 %
Oracle 2,5 %
Google 1,9 %
Universidad de Aberdeen 1,6 %
HP 1,6 %
Qumranet 1,4 %
Nokia 1,3 %
SGI 1,3 %
Astaro 1,3 %
MIPS Technologies 1,2 %
SANPeople 1.1 %
Miracle Linux 0.9 %
MontaVista 0.8 %
Broadcom 0.8 %

Fuente_ [] Who wrote Linux version 2.6.20?

[] HP sponsored and initiated open source projects
[] Primeros drivers beta para las Creative X-Fi en GNU/Linux
[] John Carmack confirma que Rage si tendrá versión para Linux

Hasta Dell creó un DOS libre (no se sí de gratis o de abierto), [] FreeDOS.

No solo se queda, si no arrasa.

Una ola llamada GNU/Linux I (Primera parte)

Alguien lo dijo:

Primero nos ignoraron.
Luego nos negaron.
Ahora se unen a nosotros…


Lo que sigue a continuación es una recopilación de enlaces que he realizado poco a poco durante unos temas para hablar de algo que tendría que haber comentado hace más de un año pero aún no había hecho. Por curiosidad comento que mi anterior título era GNU/Linux se queda, pero lo veía ya un tanto antiguo.
Lo he divido en dos “capítulos” para que sea más fácil de digerir. A pesar de todo, se quedan muchas cosas fuera de rabioso interés.

Ya pasó la época en que se explicaban las bondades del mundo del software libre. Ahora toca mostrar a los que primero apostaron por esta corriente en el mundo de la administración y empresarial.

Algunos casos de administraciones

Extremadura usará ‘software’ ‘libre en los 10.000 ordenadores de la administración
[] Un estado de Malasia adopta el modelo extremeño de conocimiento y software libre
[] El Ayuntamiento de Zaragoza cambiará el sistema operativo de sus ordenadores de Windows a Linux
[] Linux en las escuelas japonesas: ¡se lo advertimos!
[soleup] Encuentro con el Rector de la Universidad de Valladolid y Software Libre

Algunos casos de empresas

[] La mitad de las empresas migrará a Linux a partir del 2007
[] Audi elige Linux; Ford, Microsoft
[infoworld] Peugeot Citroën revs up 20,000 Suse Linux desktopsl
[] BMW apuesta por Linux y Xen
[] La bolsa de nueva york migra a unix y linux
[] Linux es el sistema operativo preferido por Hollywood
[] Dura competencia

No solo se queda, si no que es su momento.