Portland: the simply way
Ci sono troppe distribuzioni GNU/Linux e ciò non è proprio un vantaggio quando si tenta di scrivere del software che debba funzionare sotto ogni distribuzione e soprattutto che debba avere un’interfaccia grafica che non dipenda da Gnome o KDE.

Come far posizionare i propri programmi sempre al posto giusto nei menu di sistema? Come far riconoscere automaticamente i file da essi creati?
Portland http://portland.freedesktop.org/wiki/ è uno standard sviluppato dagli Open Source Development Labs e dalla comunità di sviluppatori di www.freedesktop.org proprio per risolvere questo problema che mina ogni progetto che abbia mire di portabilità nel mondo GNU/Linux.
L’obiettivo di Portland (arrivato alla versione 1.0) è quello di automatizzare, o almeno facilitare, questo tipo di integrazione, qualsiasi sia la distribuzione utilizzata dall’utente che lancia uno script di installazione.
In pratica Portland è costituito da una serie di interfacce di programmazione (Application Programming Interface - API) e da un insieme di utility per la linea di comando (xdg-utils).
L’API è una libreria che può essere utilizzata da qualsiasi applicazione per gestire posta elettronica, rubriche, screensaver e altre funzioni desktop tramite un daemon di sistema. Alla fine queste dovrebbero prendere il nome di DAPI (la D sta per desktop).
Xdg-utils
Xdg-utils is a set of command line tools that assist applications with a variety of desktop integration tasks. About half of the tools focus on tasks commonly required during the installation of a desktop application and the other half focuses on integration with the desktop environment while the application is running. Even if the desktop components of your application are limited to an installer, configuration or management tool, Xdg-utils provides you with an easy way to enhance the usage experience of your customers by improving the integration of these components in the user’s environment. Best of all, Xdg-utils is provided as open source and free of charge.
Queste utility non fanno altro che configurare in fase di installazione del software il browser web e il client di posta elettronica in modo che possano interagire con il nuovo programma. Esse provvedono anche ad installare e rimuovere icone e voci di menu.
Le xdg-utils 1.0 sono suddivise nei seguenti tool: xdg-desktop-menu, xdg-desktop-icon, xdg-mime, xdg-icon-resource, xdg-open, xdg-email, xdg-screensaver.
Nelle xdg-utils vi è anche una suite di test facilmente utilizzabile. Basta solo:
- scaricare le xdg-utils da
http://portland.freedesktop.org/download/xdg-utils-1.0.1.tgz - $ tar xzvf xdg-utils-1.0.1.tgz
- $ ./configure
- cd alla directory di test e dare un $ ./testrun.
La versione 1.0 di Portland dovrebbe essere presente nelle prossime versioni di Debian, Fedora, OpenSuse, Xandros e Red Flag Linux. Non ho trovato informazioni su Ubuntu. Speriamo che il progetto vada in porto.













Tags:
Categorie: 






