Tuesday, 16 June 2009

Error in Gnome-RDP

Gnome-RDP is a nice client to administer remote computers. It offers RDP protocol as well as VNC and SSH. It has a simple interface that just does it. And it keeps its settings in a SQlite database.

And here the problem starts.

After every major upgrade of Ubuntu, Gnome-RDP does not read the file correctly:
Error in query:
SELECT * FROM version WHERE id=1
Error:file is encrypted or is not a database
This is annoying as connection information and passwords are stored in this database.

Reason for the error is a difference in the SQlite schema. The error message is missleading.

Here is a fix that works on Ubuntu 9.04.
  1. Open a console window
  2. Check if sqlite and sqlite3 are installed (type sqli and tab. If you have installed a fresh copy then sqlite might be missing. Temporarily install it)
    sudo apt-get install sqlite
  3. Make a copy of the gnome config database
    cd
    mv .gnome-rdp.db .gnome-rdp-backup.db
  4. Start Gnome-RDP and quit immediately. This creates an empty config database. Then you dump the old database using sqlite to the new database using the new sqlite3
    gnome-rdp
    sqlite .gnome-rdp-backup.db ".dump session" | fgrep INSERT | sqlite3 .gnome-rdp.db
    Just dump the session table (which will dump CREATE statements as well) and just use the INSERT statements to copy the data into the new file.
  5. Starting Gnome-RDP should now work fine.
  6. Deinstall sqlite (you won't need it)
    sudo apt-get remove sqlite
Hope the developers of gnome-rdp will do a database check in the next release.

Thanks to Mick K for the solution.

3 comments:

Unknown said...

the first "cd" goes no where... can you comment where I should look for the .gnome-rdp.db file is located.

Wolf said...

Graham,
the first cd should bring you to your home directory (you could also do a "cd ~").

This is where the .gnome-rdp.db is.

A "ls -a" should reveal the file.

Its strange that it should not work on your machine.

Anonymous said...

wonderful! this solved my problem after upgrading to Mint 7 64bit

Thanks!