Skip to content
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

use XDG_CACHE_DIR for the log file #2272

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

use XDG_CACHE_DIR for the log file #2272

wants to merge 1 commit into from

Conversation

rnhmjoj
Copy link

@rnhmjoj rnhmjoj commented Jul 5, 2019

I maintain the monero and monero-gui packages in NixOS: this is a patch I have been using and wanted to upstream for quite some time.
I'm not sure about now, but the log defaulted to being written in the same directory of the binary (monero-wallet-gui), which is read-only in NixOS and probably other distribution.
This patch moves the log to the XDG cache directory.

@MaxXor
Copy link
Contributor

MaxXor commented Jul 6, 2019

Hm, this has been fixed, I remember this was the case a few releases prior to 0.14. The GUI log is written to ~/.bitmonero/monero-wallet-gui.log on Ubuntu and Arch Linux as far as I've tested these two.

Can you re-check with the latest version if it is still happening?

@rnhmjoj
Copy link
Author

rnhmjoj commented Jul 6, 2019

You are right, looks like I'm late. It would be better to use XDG_CACHE_DIR, though.
That way the configuration directory doesn't get cluttered with unimportant files.

@sanderfoobar
Copy link
Contributor

sanderfoobar commented Jul 15, 2019

Thanks for bringing this up @rnhmjoj. As @MaxXor pointed out, I believe this is indeed already fixed.

I've been wanting to move the following files to ~/Monero so that this directory contains:

  • The log file(s)
  • The wallet files
  • The wallet configuration file

The above is for the sake of having as much stuff in one directory as possible (as opposed to scattered around the system). This makes removing the GUI easier.

Then again, a proper uninstaller (or uninstall procedure) can also be a solution.

I'm not hyped about XDG_CACHE_DIR. Seems like this is used for other purposes (?).

In any case, let me know if the current tagged release is a problem directory wise, so we can look for a solution.

@rnhmjoj
Copy link
Author

rnhmjoj commented Jul 15, 2019

The idea of the XDG spec is to allow the separation of configuration files, user generate data and cache files. The main advantage is that it makes the locations configurable; also it's easier backup by simply selecting the directory (like $XDG_DATA_HOME/monero), without worrying about excluding temporary files.

I get the point about fragmentation but monero-gui is already using XDG_CACHE_HOME for the qml cache, and the log file certainly belong to this category. An "uninstall" procedure could simply be to delete:
$XDG_{CACHE,DATA,CONFIG}_HOME/monero-project

@sanderfoobar
Copy link
Contributor

Thanks for the information @rnhmjoj. Sounds like a good idea. I've created an issue/proposal over at #2291.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants