Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

How about support XDG dir structure #129

Closed
jarryson opened this Issue · 8 comments

6 participants

@jarryson

http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

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_CACHE_HOME -> $HOME/.cache
$XDG_CONFIG_HOME -> $HOME/.config
$XDG_DATA_HOME -> $HOME/.local/share

example: glib contain functions like g_get_user_config_dir(),
g_get_user_cache_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.

Cheers!

@imraro

+1

@eheintzmann

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 :
http://ploum.net/post/207-modify-your-application-to-use-xdg-folders
https://live.gnome.org/GnomeGoals/XDGConfigFolders

Full specification can be found at:
http://standards.freedesktop.org/basedir-spec/latest/

The Freedesktop.org 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
@antenore
Owner

I've done the migration

https://github.com/FreeRDP/Remmina/tree/xdg-folders

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?

2) 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, remmina.sh, that check if there are files under ~/.remmina, does the migration and then execute the remmina binary.

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

Any ideas?

@jarryson @imraro @eheintzmann @Hubbitus @giox069

@giox069
Owner
  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
Owner

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
Owner

Please review #590

@antenore antenore closed this in #590
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.