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

Log files should be moved out of /run/user/<UID>/xpra #3725

Closed
cherio opened this issue Jan 4, 2023 · 3 comments
Closed

Log files should be moved out of /run/user/<UID>/xpra #3725

cherio opened this issue Jan 4, 2023 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed server

Comments

@cherio
Copy link

cherio commented Jan 4, 2023

Is your feature request related to a problem? Please describe.

Log files (Xorg.log, server.log) need to be moved from /run/user/<UID>//XDG_RUNTIME_DIR directories. Suitable locations could user based directories (e.g. XDG_DATA_HOME) or standard /var/log directories.

The filesystem under /run/user/ is tmpfs. It is situated in RAM. Use recommendations for that directory include temporary storage of PIDs, sockets, etc, session information, configuration files - all with consideration to be small.

LOG files belong on the opposite side of the size spectrum. Occasionally they tend to grow fast and for that reason often are placed on separate partitions altogether.

Describe the solution you'd like

Possible suitable LOG location candidates

  • XDG_DATA_HOME
  • XDG_CACHE_HOME
  • /var/log directories

Alternatively LOG file location could be configurable via cmd arguments or configuration file(s).

Describe alternatives you've considered

Additional context

@cherio cherio added the enhancement New feature or request label Jan 4, 2023
@cherio cherio changed the title Move log files out of /run/user/<UID>/xpra/<DISPLAY> Log files should be moved out of /run/user/<UID>/xpra Jan 4, 2023
@totaam totaam added help wanted Extra attention is needed server labels Jan 4, 2023
@totaam
Copy link
Collaborator

totaam commented Jan 4, 2023

Sure, but I'm not going to work on this - feel free to submit a PR.
Every time we try to follow XDG / FHS / distro recommendations for moving files around, it ends up being a never ending pain.
Hell, even $XDG_RUNTIME_DIR still doesn't work properly on most Debian distros when you login via ssh.

$XDG_RUNTIME_DIR may not be the correct place, but it works reasonably well after years of fiddling, and it gets cleaned up by the OS.
It also keeps all the session data in one place, saving the users the hassle of trying to figure out where the files are. (also me answering such questions)

Suitable locations could user based directories (e.g. XDG_DATA_HOME)

OK, but not cleaned up automatically.
Also, NFS users will hate us for putting log files there.

or standard /var/log directories.

That's only for root.

@cherio
Copy link
Author

cherio commented Jan 4, 2023

Your reasoning indeed has some practical and historical justification. The issue is that Xorg.log grows pretty fast. This is an issue with long running user sessions. It would likely not affect me personally (I have 64 GB of RAM =] ) but conceptually present design can be improved.

NFS users will hate us for putting log files there.

Someone's decision to keep ~/.local/share on NFS shouldn't be a decision factor here. Many applications that use those directories (web browsers, IDEs, games etc) have much higher IO requirements. This location is intended for large files.

~/.cache is also used to save logs by some applications (I can see a few including mozilla and xfce).

What about having an option to specify log file location via arguments/config file? The only reason I wrote this enhancement proposal was because I didn't find this configuration option available.

BTW, I truly appreciate your work!!!!!

@totaam
Copy link
Collaborator

totaam commented Jan 5, 2023

The issue is that Xorg.log grows pretty fast

The one we use for xpra should not.

What about having an option to specify log file location via arguments/config file?

You can already move the Xorg log file using a config file, in my /etc/xpra/conf.d/55_server_x11.conf I have:

xvfb = /usr/libexec/Xorg -noreset -novtswitch -nolisten tcp \
    +extension GLX +extension RANDR +extension RENDER \
    -auth $XAUTHORITY -logfile ${XPRA_SESSION_DIR}/Xorg.log \
    -configdir "${XPRA_SESSION_DIR}/xorg.conf.d/$PID" \
    -config "${XORG_CONFIG_PREFIX}/etc/xpra/xorg.conf"

Tweak -logfile.
Environment variables will be expanded but missing directories will not be created by xpra.

@totaam totaam closed this as not planned Won't fix, can't repro, duplicate, stale Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed server
Projects
None yet
Development

No branches or pull requests

2 participants