New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support xdg standard directory structure #194

jristz opened this Issue May 2, 2017 · 1 comment


None yet
2 participants

jristz commented May 2, 2017

Actually the configuration files are placed on $HOME/.snes9x for store user specific
It will be better if snes9x start using the xdg- standard specification that now is used for most programs like gnome, kde, xfce, pacma package manager, wayland, etc.

the file in linux in question is the cpp file gtk/src/gtk_config.cpp with contain in get_config_dir a hardcoded path to fix this a simple change in that file is need.

a bash example is of how showld look is:

if [[ $SNES9X_XML = "$confdir/snes9x.xml" && -r "$XDG_SNES9X_DIR/snes9x.xml" ]]
	source_safe "$XDG_SNES9X_DIR/snes9x.xml"
elif [[ $SNES9X_XML = "$confdir/snes9x.xml" && -r "$HOME/.snes9x/snes9x.xml" ]]; then
	source_safe "$HOME/.snes9x/snes9x.xml"

than an example in bash that check for snes9x.xml fire in the XDG_USER_DIR and fallback to the old location if not found and again fallback to the sysconfdir if not found too.

this will make snes9x go in line with standard specification used and will not affect old userd if the fallback is used

this is the entire paper abiut the xdg structure


This comment has been minimized.

Show comment
Hide comment

bearoso May 6, 2017


Should be handled now. Looks for the directory, not the config file.


bearoso commented May 6, 2017

Should be handled now. Looks for the directory, not the config file.

@bearoso bearoso closed this May 6, 2017

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