This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 120511 - enhancement request - allow init script to pass arguments to vncserver
enhancement request - allow init script to pass arguments to vncserver
Status: CLOSED DUPLICATE of bug 60176
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: vnc (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
David Lawrence
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-04-09 13:59 EDT by Chris Melaro
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 14:02:31 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Chris Melaro 2004-04-09 13:59:55 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6)
Gecko/20040113

Description of problem:
Enhancement request:
Modify init script (/etc/init.d/vncserver) so that arguments to the
vncserver(s) can be included in /etc/sysconfig/vncservers.

For example, /etc/sysconfig/vncservers contents:
VNCSERVERS="1:cmtest 2:cmtest1 3:cmtest2"
VNCSERVERARGS[1]="-geometry 1152x864"
VNCSERVERARGS[3]="-geometry 1280x1024"

could be used to modify the geometry for users cmtest and cmtest2.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.n/a
2.
3.
    

Additional info:

Suggest change similar to:

*** /etc/init.d/vncserver       2004-04-09 13:31:12.000000000 -0400
--- /etc/init.d/vncserver.original      2004-04-09 13:04:31.000000000
-0400
***************
*** 13,19 ****
  # Check that networking is up.
  [ ${NETWORKING} = "no" ] && exit 0
                                                                     
                                                                       
- unset VNCSERVERARGS
  VNCSERVERS=""
  [ -f /etc/sysconfig/vncservers ] && . /etc/sysconfig/vncservers
   
--- 13,18 ----
***************
*** 28,36 ****
          echo -n "${display} "
        unset BASH_ENV ENV
        export USER="${display##*:}"
-       export VNCUSERARGS="${VNCSERVERARGS[${display%%:*}]}"
          initlog $INITLOG_ARGS -c \
!             "su ${USER} -c \"cd ~${USER} && [ -f .vnc/passwd ] &&
vncserver :${display%%:*} ${VNCUSERARGS}\""
          RETVAL=$?
          [ "$RETVAL" -ne 0 ] && break
      done
--- 27,34 ----
          echo -n "${display} "
        unset BASH_ENV ENV
        export USER="${display##*:}"
          initlog $INITLOG_ARGS -c \
!             "su ${USER} -c \"cd ~${USER} && [ -f .vnc/passwd ] &&
vncserver :${display%%:*}\""
          RETVAL=$?
          [ "$RETVAL" -ne 0 ] && break
      done
Comment 1 Tim Waugh 2004-04-14 03:58:56 EDT
Thanks.  This looks quite a good way to do it.

*** This bug has been marked as a duplicate of 60176 ***
Comment 2 Red Hat Bugzilla 2006-02-21 14:02:31 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

Note You need to log in before you can comment on or make changes to this bug.