How about support XDG dir structure #129

jarryson opened this Issue Nov 2, 2012 · 8 comments


None yet
6 participants

jarryson commented Nov 2, 2012

Instead of useing ~/.remmina, put config files to
$XDG_CONFIG_HOME/signon, cache files to $XDG_CACHE_HOME/signon, data
files to $XDG_DATA_HOME, like the other applications do.

The default fallbacks are:
$XDG_DATA_HOME -> $HOME/.local/share

example: glib contain functions like g_get_user_config_dir(),

I really hope you can implement this change, it would make the home dir
cleaner, and user can delete all application's cache files or config
files or data files easily.


imraro commented Nov 5, 2012


According to XDG Base directory specification:
User data should go into $XDG_DATA_HOME (which default to ~/.local/share),
user preferences should go into $XDG_CONFIG_HOME (which default to ~/.config)
and cached data should go to $XDG_CACHE_HOME (which default to ~/.cache).
More details at :

Full specification can be found at:

The XDG base directory specification have good de facto adoption.
It has been adopted by:

I think that Remmina should use same locations than the vast majority of Desktop environment and applications.

There are real advantages of following this specification :

  • a lot less cluttered $HOME
  • Make backups a lot more safer and easier.
    Backuping your $XDG_DATA_HOME along with your files is enough
    (or just excluding $XDG_CACHE_HOME)
  • A lot easier to reset a default configuration if you want/need it (and
    without any risk to loose informations). Even for the software itself
    could choose to reset $XDG_CONFIG_HOME if needed.
  • Avoid some strange bugs that happens because you had a old version of
    some configuration file
  • A lot more of flexibility and portability because no path are hardcoded.


@antenore antenore self-assigned this Jun 21, 2015


antenore commented Jun 22, 2015

I've done the migration

Some thoughts:

  1. Code

The code can be improved, at the moment I used the original one just to avoid to break what it's working. Is it acceptable in your opinion?

  1. Data, config locations and migration

The .remmina files are saved in the $XDG_DATA_HOME, the remmina preferences in the XDG_CONFIG_HOME

Now, in my opinion remmina shouldn't do any data and config migration, this should be done by the user, but I was thinking that maybe it'd would be nice to provide an helper shell script.

One solution could be to provide a wrapper,, that check if there are files under ~/.remmina, does the migration and then execute the remmina binary.

The second one just a simple (or whatever)...

Any ideas?

@jarryson @imraro @eheintzmann @Hubbitus @giox069


giox069 commented Jun 23, 2015

  1. Code: seems to be ok. Please also check the code for locating the external tools scripts in the user home dir. I can't remember how it works.
  2. Remmina is a GUI applications and some users are unable to migrate correctly the configuration files or executing scripts. I think we should do the migration in the GUI. But I'm a bit afraid of it. We should be very paranoid in doing many checks before migrating these files to the new XDG dir.

antenore commented Jun 23, 2015

I've used a quite safe workflow:

  1. If the XDG directories exist, use them.
  2. If the old .remmina exists, use it.
  3. If none exist, use/create the XDG ones.

antenore commented Jun 23, 2015

Please review #590

@antenore antenore closed this in #590 Jun 25, 2015

antenore added a commit that referenced this issue Jun 25, 2015

antenore added a commit that referenced this issue Jul 10, 2015

antenore added a commit that referenced this issue Jul 10, 2015

antenore added a commit that referenced this issue Jul 10, 2015

antenore added a commit that referenced this issue Jul 10, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment