Bug 120511 - enhancement request - allow init script to pass arguments to vncserver
Summary: enhancement request - allow init script to pass arguments to vncserver
Status: CLOSED DUPLICATE of bug 60176
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: vnc (Show other bugs)
(Show other bugs)
Version: 3.0
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords: FutureFeature
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-04-09 17:59 UTC by Chris Melaro
Modified: 2007-11-30 22:07 UTC (History)
0 users

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


Attachments (Terms of Use)

Description Chris Melaro 2004-04-09 17:59:55 UTC
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 07:58:56 UTC
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 19:02:31 UTC
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.