in reply to Re: Like to modify /usr/bin/vncserver to parse a config file
in thread Like to modify /usr/bin/vncserver to parse a config file

Thank you for the reply. I should have mentioned that I would like to submit a pull request upstream (to the proper tigervnc server project) to enable that script to find a parse out the config file. It is needed for another submission: a systemd user service which I have already written.

For the user service to be general, any standard options (switches) should be captured in the config file so that they are not hard-coded into the service itself. Minimum needs: Check for $HOMEDIR/.vnc/config and source it, parse it, and use the options therein in the call to Xvnc as they do in their script.

  • Comment on Re^2: Like to modify /usr/bin/vncserver to parse a config file

Replies are listed 'Best First'.
Re^3: Like to modify /usr/bin/vncserver to parse a config file
by Anonymous Monk on Oct 14, 2015 at 14:14 UTC
    Check for $HOMEDIR/.vnc/config

    This should get your started:

    use Config::Tiny; my $CONFIGFILE = "$ENV{HOME}/.vnc/config"; if (-f $CONFIGFILE) { my $cfg = Config::Tiny->read($CONFIGFILE); $geometry = $cfg->{_}{geometry} if exists $cfg->{_}{geometry}; # ... etc. }