Repository navigation
vncsession should allow the user config directory to be specified #1195
Description
Activity
Why doesn't a symbolic link allow a sysadmin to manage things centrally? Do you have an example of when symbolic links aren't suitable?
This seems like quite a niche thing to want to customize.. I'm a bit skeptical towards adding a command-line option. I'm open for changing the default location to ~/.config/vnc but I guess that doesn't resolve your issue.
Any approach that requires or can be affected by user action, such as creating or retaining a particular symbolic link in their home directory, is by definition not centrally managed. It is desirable to enable system administration to create and maintain appropriate configuration without user action or participation, both for user convenience and for administrative control.
Do you have an example of when symbolic links aren't suitable?
Consider a multi-machine environment in which user home directories reside on a network filesystem and are shared among machines. These are not so uncommon at large organizations.
- From a convenience-to-users angle, local system administration typically cannot modify the contents of user home directories in such an environment, so as to set up the appropriate symbolic link on their behalf.
- From a required functionality perspective, relying on symbolic links in such an environment does not afford sufficient flexibility. The VNC user directory for each user has to be in the same place on every machine.
- From an administrative-control angle, relying on symbolic links in user home directories affords users the capability to thwart administrative controls. For example, they can divert the VNC log to a location of their choosing by replacing the link with one having a different target. They can do this already, of course, and there is little that system administration can do about it.
Thank you for a good explanation, that makes sense.
We have /etc/tigervnc/vncserver-config-mandatory and /etc/tigervnc/vncserver-config-defaults, they are described in the man pages for vncsession. To me it seems those two would be enough to fulfill your needs, am I missing something?
I am aware of vncserver-config-mandatory and vncserver-config-defaults. They offer good per-machine administrative control over Xvnc options, but that's largely a separate consideration. The primary objective of the feature request is to provide for per-machine locations for users' log files, password files, and session configuration in environments where that is not achieved by putting them in the user home directory. This requires the location of the VNC user directory to be customizable. It is conceivable that the information needed for that could be conveyed via a new property in one or both of the vnc-server-* files, but as far as I can determine, they do not presently support such a feature.
A secondary use case (from my perspective) for the requested feature would be to support multiple distinct session configurations and even multiple simultaneous sessions for the same user on the same machine. This would be trickier to support with the vncserver-config-* files, but I suppose not impossible.
Ah of course, that would be a reasonable feature.
I think as a first step we should follow the XDG standards. That would include respecting the environment variables, which would give users some control, even if not full.
For logs we should also consider logging to the journal, like most local logins do.
I think as a first step we should follow the XDG standards. That would include respecting the environment variables, which would give users some control, even if not full.
For logs we should also consider logging to the journal, like most local logins do.
I think these would be fine things for Tiger to do. Logging to the journal might even ease the specific issue that motivated me to file this feature request in the first place. For the record, however, these will not fully address this feature request as filed, nor will it address all of the use cases discussed.
Has there been any progress on this?
I'm not aware of anyone working on this, no.
I would like to eventually take this up, but there's some clarification that I'd like to ask for as someone who's only recently been really making use of VNC as a whole for remote control. Is there any distinction made between files specific to TigerVNC as a client/server implementation and files that may be considered "universal" across all VNC implementations?
I had presumed that the passwd file would fall under the latter somehow and that this would require, say, a dedicated ~/.config/vnc directory alongside a potential ~/.config/tigervnc — or, rather, have tigervnc be a sub-directory of the "general" vnc config directory.
Yes and no. But mostly no. So feel free to move things to TigerVNC specific directories. All I ask is that there is some migration support for existing users.
For a longer answer, there is no explicit compatibility between VNC implementations. But almost all implementations are based on RealVNC's original code. So there is some compatibility because of that shared heritage. However, implementations have changed the format of files without coordinating with other implementations.
Is your feature request related to a problem? Please describe.
vncsession(and the old vncserver script) automatically use${HOME}/.vncfor the user directory, without any (documented) means to specify an alternative. This can be problematic if${HOME}is on a network filesystem (related: #1189) and especially if it is shared among multiple computers that the user wants to configure differently. Even with a local${HOME}, system administration might prefer to use directories conforming to the XDG Base Directory specification (for example,${HOME}/.config/vnc), or otherwise configure a different location.Additionally, it presently does not seem to be possible to direct Xvnc's session logs to a different directory than the user configuration files', but it is desirable to be able to do so. That would be necessary for configuring fuller conformance with XDG Base Directory, and more generally, it is desirable simply for the purpose of allowing separation of files that the server should be permitted to write (i.e. logs) from those that one may want to prevent it from writing (password and configuration files).
Describe the solution you'd like
vncsessionshould accept a command-line option allowing an alternative user directory to be specified, or else recognize a vnc-specific environment variable serving the same purpose.Ideally, the log file directory would be made separately customizable, too, so that the log doesn't have to go next to the user password and config files.
Describe alternatives you've considered
The only alternative I have come up with is for users to make
${HOME}/.vnca symbolic link to another directory, but this does not empower system administrators to manage the details centrally. Under some circumstances, local system administrators cannot use this mechanism at all. This also does not provide for separating the logs from the config files.Additional context
None.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.