Dropbox on non-supported Linux

When installing Dropbox in a non-supported distro like Mageia, you’l soon encounter the problem, that starting Dropbox upon login to the UI (in this case: KDE) is not that easy.

Once you downloaded the Dropbox-Distribution and installed it as described here, you should also download the CLI-script provided by Dropbox from here. After this, you can use the following script to automatically start Dropbox after login with KDE; is should be in the same directory as the CLI-Script.

#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [[ -z "$DROPBOXPY" ]]; then
  DROPBOXPY="$DIR/dropbox.py"
else
  echo "Using preconfigured dropbox.py from $DROPBOXPY."
fi

if [ -f $DROPBOXPY ]; then
  echo "Found $DROPBOXPY. Check if the daemon is running..."
  eval "$DROPBOXPY running"
  RUNNING=$?
  if [ $RUNNING -eq 0 ]; then
    echo "Nope. Start it..."
    eval "$DROPBOXPY start"
  else
    echo "Yes, nothing to do."
  fi
else
  echo "Cannot find / load dropbox.py."
fi

This script does not take any arguments by default, but simply asks the Dropbox’ CLI-Script to start the daemon; hence can be run by KDE’s Autostart-System:

Picture of Dropbox configured for autostart with KDE

edit: if dropbox.py results in the error

Traceback (most recent call last):
  File "/home/alex/.dropbox-dist/dropbox.py", line 25, in <module>
    import locale
  File "/usr/lib64/python2.7/locale.py", line 18, in <module>
    import operator
ImportError: /home/alex/.dropbox-dist/operator.so: undefined symbol: _PyUnicodeUCS2_AsDefaultEncodedString

you might place both dropbox.py and the starter-script into a different folder than the one created by the Dropbox-installer (which is ~/.dropbox-dist). E.g. use ~/.dropbox for both files, this should do the trick. Dropbox itself uses a custom build of Python, with some not-so-compatible libraries coming along.

Now, once we have installed Dropbox, we might want Dolphin to show the status of files and folders in our Dropbox. Well, there’s a Plugin available for download in Dolphin’s settings that adds some Dropbox-specific menu entries to the context menu, but it doesn’t provide icon overlays. Another plugin written by Thomas Richard, however not available via the wizard, does.

You can download, compile and install the plugin with the following commands (you need CMake installed for this):

git clone git://anongit.kde.org/scratch/trichard/dolphin-box-plugin.git
cd dolphin-box-plugin/
cmake . -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix`
su -c 'make install'

The kde4-config-Part was taken from a commend at the Plugin’s “Homepage” and ensures that the plugin get’s installed into the right directory. After installing, you have to restart dolphin; after that, you get some pretty cool icons floating above the file and folder icons in your Dolphin indicating the sync-status of your files!

LabView 2012 in Mageia 3

So, nachdem nun LabVewi 6.1 auf SL6 gut läuft, sollte auch 2012 auf meinem aktuellen “Arbeitstier” funktionieren. Mageia basiert auf Mandriva, und ist damit ebenfalls RPM-basiert.

Nach dem man die LabView 2012-Setup im Linux-Unterordner auf der in HFS+ formatierten Mac/Linux-DVD der Academic Site License extrahiert hat, lässt sich Labview selbst nach Auflösung einiger Abhändigkeiten problemlos installieren. Insbesondere

libXinerama kernel-desktop-devel-latest

und Abhängigkeiten müssen auch als 32-Bit Binary vorliegen, wenn LabView auf einem 64-Bit System gestartet wird.

Nach der installation von Labivew wird nach NI-VISA gefragt. Wer lediglich etwas Programmierung üben möchte, kann sich die VISA-Libs sparen. Für die Gerätesteuerung aber sind sie zwingend notwendig; die Installation schlägt auf den ersten Anlauf aber fehl:

******************************** ERROR ****************************************
* The version of gcc in the path does not match the version of gcc used to    *
* compile the currently running kernel.  This can cause unpredictable         *
* behavior in kernel drivers and should be fixed.                             *
* gcc version: gcc-Version 4.7.2 (GCC)                                        *
* kernel compiled with: 4.7.2                                                 *
******************************** ERROR ****************************************

Scheinbar unterscheiden sich die in openSUSE, RHEL und SL verwendet Art und Weise, die GCC-Version im Kernel zu hinterlegen derart von der in Mageia verwendeten, dass der Installer trotz vermeidlich gleicher Kernel-Version fehlschlägt.

Ganz unpraktisch ist das aber nicht, denn vor der Installation der NI-VISA-Treiber muss die (zumindest auf der 2012er) DVD mitgelieferte Version von NI-KAL auf Version 2.4 aktualisiert werden, um mit neueren Kernel-Versionen kompatibel zu sein (siehe Forums-Post der LabView community). Der Download auf ni.com ist ein ISO-Image, das zunächst entpackt werden will.

[user@localhost NIKAL24_new]# ls -Gahl
insgesamt 1,7M
dr-xr-xr-x  2 user 4,0K Okt 28 15:11 ./
drwxrwxr-x 10 user 4,0K Okt 30 08:51 ../
-r-xr-xr-x  1 user  54K Okt 28 15:09 INSTALL*
-r--r--r--  1 user  23K Okt 28 15:05 LICENSE.txt
-r--r--r--  1 user 1,5M Okt 28 15:06 nikal-2.4.0f5.tar.gz
-r--r--r--  1 user  20K Okt 28 15:05 PATENTS.txt
-r--r--r--  1 user 7,3K Okt 28 15:05 README.txt
-r-xr-xr-x  1 user  13K Okt 28 15:05 UNINSTALL

In nikal-2.4.0f5.tar.gz befindet sich das corpus delicti, im Unterordner bin: installerUtility.sh ab Zeile 343:

   # check the version of gcc that is in the path and ensure that it is the
   # same version of gcc that was used to compile the currently running kernel
   if [ -z "$KERNELTARGET" -o "$KERNELTARGET" == "`$UNAME -r`" ]; then
      currentGCCVersion=`$CC -v 2>&1 | tail -n 1 | $SED 's/.*gcc[a-zA-Z (]\+\([0-9][^ )]\+\).*/\1/'`
      kernelGCCVersion=`$CAT /proc/version | $SED 's/.*gcc[a-zA-Z (]\+\([0-9][^ )]\+\).*/\1/'`
      if [ "$currentGCCVersion" != "$kernelGCCVersion" ]; then
         if [ "${currentGCCVersion%\.*}" != "${kernelGCCVersion%\.*}" ]; then
            echo "******************************** ERROR ****************************************"
            echo "* The version of gcc in the path does not match the version of gcc used to    *"
            echo "* compile the currently running kernel.  This can cause unpredictable         *"
            echo "* behavior in kernel drivers and should be fixed.                             *"
            echo "* gcc version: $currentGCCVersion                                                          *"
            echo "* kernel compiled with: $kernelGCCVersion                                                 *"
            echo "******************************** ERROR ****************************************"
            return $statusFail
         else
            echo "******************************** WARNING **************************************"
            echo "* The version of gcc in the path does not match the version of gcc used to    *"
            echo "* compile the currently running kernel.  This can cause unpredictable         *"
            echo "* behavior in kernel drivers and should be fixed.                             *"
            echo "* gcc version: $currentGCCVersion                                                          *"
            echo "* kernel compiled with: $kernelGCCVersion                                                 *"
            echo "******************************** WARNING **************************************"
         fi
      fi
   fi

Man können nun die Funktion beider RegEx-Komandos analysieren, oder den relevanten Teil einfach entfernen. Das Archiv wieder packen, und die Installation starten.

Danach kommen die NI-VISA Treiber, die allerdings verwenden nicht nur die installerUtility.sh in ihrem eigenen Archiv, sondern auch eine Kopie davon in

/usr/local/natinst/nikal/bin/installerUtility.sh

Diese darf dann ebenfalls angepasst werden, danach klappt auch die Installation von NI-VISA.

Labview 6.1 auf Scientific Linux 6

Die c’t hat in der Ausgabe 11/2007 Labview 6.1 zur Verfügung gestellt. Die Windows-Version gibt es auf der Heft-CD, Versionen für Linux und Mac (PowerPC) gibt es auf dem FTP-Server von Heise.

Labview wird für Linux grundsätzlich nur für RPM-Basierte Distributionen angeboten. Die Installation auf Debian-System gelingt ebenfalls, VISA und IVI Treiber laufen allerdings meist nicht. Auf Scientifc 6 geht die installation aber ganz leicht, x64-Systeme benötigen allerdings zuvor einige x86-libs:

yum install glibc-devel.i686 libX11-devel.i686 libXext-devel.i686

Danach muss der Verzeichnis-Index abgeschaltet werden (siehe NI-KB-Eintrag zu dem Thema)

su -c 'tune2fs -O ^dir_index /dev/sdX'

Dies ist erst ab Version 7.1.1 nicht mehr nötig – falls der index nicht abgeschalten wird, crasht LabView mit folgender Meldung:

Failure : "filemgr.cpp", line 4145
LabVIEW version 6.1
For assistance in resolving this problem, please record the preceding information and navigate to www.ni.com/failure, or contact National Instruments.
Abgebrochen

 

Linksammlung – Faire Hardware

Unsortiert und unkommentiert:

Schweizer Kampange für Faire Computer (von “Fastenopfer” und “Brot für Alle”, Infos darüber fehlen noch)
http://www.fair-computer.ch

Das Fairphone – das faire Smartphone
http://www.fairphone.com

Die faire Computermaus:
https://www.nager-it.de/

Server 2012 und Remotedesktopdienste – Umbenennen

Nur falls mal jemand vor einem ähnlichen Problem stehen sollte: Wer einen Terminal-Server 2012 umbenennen will, steht vor dem Problem, dass nach dem Umbenennen der Servermanager seinen Dienst verweitert. Im fehlt der alte Servername im Serverpool, der immer noch in der Bereitstellung registriert ist.

Die zugehörige Meldung:

Die folgenden Server in der Bereitstellung sind nicht Teil des Computerpools: <servername>.
Die Server müssen dem Computerpool hinzugefügt werden.

Das ist natürlich rechter Blödsinn aus unserer Sicht, schließlich will man ja einen neuen Servernamen verwenden. Auch eine “Neuinstallation” der Remotedesktopdienste mit dem Servermanager schlägt fehl, als möglicher Verbindungsbroker taucht nur der alte Server auf.

Abhilfe schafft nur, den Broker-Rollendienst händisch zu entfernen und neu hinzuzufügen. Dann kommt folgende Meldung im Servermanager:

Es ist keine Remotedesktopdienste-Bereitstellung im Serverpool vorhanden. Führen Sie zum erstellen einer Vereitstellung den Assistenten […] aus.

Gut. Also jetzt wieder den Assistenten zur Installation der Remotedesktopdienste starten, alles aus dem Verbindungsbroker steht bereits richtig konfiguriert da. Jetzt lässt sich auch der neue Servername als zuständiger Verbindungsbroker auswählen – Problem gelöst:

A guide to comfortable software – unordered list of things that suck

This serves as an uncomplete and highly subjective list of things that should not happen in conjunction with software of any kind. Or, in other words: A guide to non-sucking (as in comfortable) software. And, well- the list is unordered to.

Entering Serial Numbers and or activation codes submitted by eMail or by any means electronically (should read: not written on paper) seems a good idea. But, please, allow me to copy and paste theese into the installer / activation form! Having to switch between or rearrange two windows to typewrite the code is so, erm, 80ies. This is exspecially important for keys containing dashes – either ignore them when beeing copied into the form, or don’t submit them in the first place!

Automatically connecting to the internet to perform update-checks on application startup might be neccessary to keep the software up to date. But, please, inform the user of what’s going on! Or at least ensure the program is connecting to any type of humam readable DNS name, like softwareupdate.yourcompany.tld. Something like “Application X/Y wants to connect to random-IP-address-in-IPV6” doesn’t look good in the firewall’s logs. Ah, by the way, it might be wise to register for correct reverse DNS lookup, too. Otherwise – how should I destinguish this search for updates from ET-App’s Phone-Home attempt?

Polls after deinstalling an application are something very similar to the above problem. There are numerous reasons why I might uninstall a certain application, but, cm’on – you could atleast ask me if I’d like to take part in such a poll, bevore you open the webbrowser! Depending on the System, the internet connection or other software or webpages currently open this might be totally unacceptable. And, by the way, nobody knows what’s submitted within the 500 characters long encoded GET-request anyway!

leerefehlermeldungError messages that read something like “Unexcepted Error”, “Unknown Error” or even nothing at all, like the specimen here, are useless. Normally programmers have to deliberately write atleast one line of code to display such a message, so there’s no “Unexpected Error” at all. There might be an unknown error – but this is not interesting for the user. So, please, spend some thime in designing meaninfull errormessages, messages that tell me something about the module, what was supposed to be done and give suggestions. This might be a task to perform for operation system manufaturers, too: create an API to show errormessages with a “tell me more”-button attached to it, leeding to whatever information there might exist on the error.

 

To be continued. And, by the way – this is ME commenting on YOU, so: comments disabled. Buha.

Datenspeichergeräte aus der SiFi

Neulich mal nach Anregungen für ein Gehäuse für eine externe Platte gesucht. Das Projekt ist mittlerweile zwar in dieser Form gestorben, aber die Frage ist erstaunlicherweise gar nicht so einfach zu beantworten – wie stellen sich denn SiFi-Autoren die Datenspeicher der Zukunft vor? To be continued.

Isolinear Chip
Los geht’s mit den “Isolinear Chips” aus StarTrek. Schaut nicht schlecht aus, eine Festplatte passt nicht ‘rein, aber vielleicht ein USB-Stick?

Einige Enthusiasten haben sich die auch schon nachgebbaut, mit die schönsten wohl hier: http://www.flickr.com/photos/kitface/5601034726/, leider natürlich ohne Funktion und “nur” aus Plastik. Wobei, Plastik kann auch Daten speichern. Wenn man von der CD mal absieht gäbe es da die Tesa-ROM, quasi der Datenspeicher auf Tesafilm (Schöner Artikel auf Sueddeutsche.de, Patentschrift, Einsatz der Technik für Markenschutz).

Speicherkristalle
Wer an’s Plastik denkt, denkt vielleicht auch an sein “Gegenteil”: Datenspeicherung auf Kristallen. Hier wären diverse “Control Crystals” aus den Stargate-Folgen anzubieten, recht schön diese hier:

Goa'ult Control-Crystals aus Stargate, Bildquelle: http://stargate.wikia.com/wiki/Control_crystal

Goa’ult Control-Crystals aus Stargate 5×22 (Revelations), Bildquelle: http://stargate.wikia.com/wiki/Control_crystal

Oder auch die:

Ebenfalls aus Stargate, Bildquelle: http://stargate.wikia.com/wiki/Control_crystal

Ebenfalls aus Stargate, Bildquelle: http://stargate.wikia.com/wiki/Control_crystal

Wer sich soetwas für seine heimische Fotosammlung zulegen möchte muss allerdings noch etwas warten, Kristalle als Datenspeicher sind immer noch in der Erkundungsphase. An der Uni Münster wurde mal ein Holographischer Datenspeicher entwickelt (und an vielen anderen Einrichtungen auch), die Holographic Versatile Card wurde auch schonmal angekündigt, leider nie gefertigt – und um wieder ganz von den Kristallen wegzugehen, das geht wohl auch mit Glas.

Aus der Reihe… “Ohne internet geht nichts” alias “Sinnvolle Fehlermeldungen, die 1.”

Neulich mussten neue Grafiktreiber installiert werden (Windows XP, x86).

Also, von der Herstellerseite geladen (151MB), per USB-Stick auf den (aus gutem Grund) internetfreien Rechner transferiert. Gestartet – und jetzt kommts “Das NVIDIA Installationsprogramm kann nicht fortgesetzt werden – Keine Internetverbindung gefunden”:

Internetverbindung

Das nVidia-Setup benötigt eine Internetverbindung und kann sie nicht finden. Wir tragisch. Aber warum sucht es denn danach? Für was? Keine Antwort. Onkel Google weiß Rat: der Control Center von NVIDIA basiert auf Microsofts .NET-Framework 4.0. Und das ist nicht installiert, also möchte der Installer es selbst installieren und laden – prinzipiell ja keine schlechte Idee. Leider teilt er das niemandem Mit. Abhilfe schafft die manuelle Installation der benötigten Programmkomponente, zu haben unter http://www.microsoft.com/de-de/download/details.aspx?id=17718

Wer das Framework nicht installieren will – dorthin, wo der Installer am Anfang seine Dateien extrahiert hat (normalerweise unter c:\NVIDIA\DisplayDriver\…) hat er auch seine Treiberdateien kopiert. Die funktionieren, wie es sich für einen Treiber gehört, auch ohne .NET, zur Installation muss man aber den Gerätemanager bemühen.

Für den Fall, dass jemand von NVIDIA mal vorbeischaut (was nie passieren wird), ich hab die Fehlermeldung mal etwas aufgehübscht:

Internetverbindung-korrigiert

Hello world!

Schön. Jetzt. Plappern.

Bevor’s hier richtig losgeht, erstmal die ganzen Features testen. Schrift: Computer Modern.

z.B.: [latex]\LaTeX[/latex]

[latex]\frac{\mathrm{d}l(t)}{\mathrm{d}t} + \frac{\sigma}{2\varepsilon\varepsilon_0d}{l(t)}^2 = \frac{\mu At}{d}[/latex]

[latex]j(t) = \frac{\varepsilon\varepsilon_0 A}{d} + \frac{\sigma}{\mu}\left(1-\frac{l(t)}{d}\right)\left(\frac{\mu At}{d} - \frac{\sigma}{1\varepsilon\varepsilon_0 d}{l(t)}^2\right)[/latex]

Oder einfügen von Code?

 

program HalloWelt;

uses Crt;

begin
  ClrScr;
  WriteLn('Hallo, Welt!');
  ReadLn;
end.

 

Top