Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-918

Xvnc plugin needs configurable base display number

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • plugin-proposals
    • None
    • Platform: All, OS: All

      The display number that the Xvnc plugin uses to start its displays at is :10;
      subsequent displays are at :11, :12, and so on. This is not currently configurable.

      At Amazon, our company-wide sshd_config sets its X forwarding ports to start at
      an offset of 10, which collides with the X ports used by Xvnc. We can't change
      this sshd_config, since that would affect thousands of computers.

      Making the Xvnc plugin have a configurable base display offset solves this
      problem- when I change the base display number to something else (say, 85) the
      sshd X forwarding ports and the Xvnc ports don't collide.

      I have submitted a patch that does this to dev@hudson.dev.java.net - it adds the
      configuration field to the plugin control panel UI, and changes the plugin and
      its display allocator to use the configured field. The default remains 10, if
      the user doesn't enter anything in the UI.

          [JENKINS-918] Xvnc plugin needs configurable base display number

          adamfeuer added a comment -

          added myself to cc

          adamfeuer added a comment - added myself to cc

          adamfeuer added a comment -

          Created an attachment (id=107)
          Xvnc plugin configurable display number - made using 'cvs diff -u'

          adamfeuer added a comment - Created an attachment (id=107) Xvnc plugin configurable display number - made using 'cvs diff -u'

          adamfeuer added a comment -

          I redid the patch using 'cvs diff -u' - would you be willing to see if this works?

          I'm sorry the first patch I made didn't work!

          -adam

          adamfeuer added a comment - I redid the patch using 'cvs diff -u' - would you be willing to see if this works? I'm sorry the first patch I made didn't work! -adam

          adamfeuer added a comment -

          Created an attachment (id=108)
          Xvnc plugin configurable display number - made using 'cvs diff -u'

          adamfeuer added a comment - Created an attachment (id=108) Xvnc plugin configurable display number - made using 'cvs diff -u'

          adamfeuer added a comment -

          Uploaded the diff again with extension '.diff' to avoid confusion.

          adamfeuer added a comment - Uploaded the diff again with extension '.diff' to avoid confusion.

          Jesse Glick added a comment -

          Seems to work. In CVS. Notes:

          1. Later patches were missing the new help page, but I found it among earlier diffs.

          2. Proposed patch neglected to use JavaScript to enforce a numeric value for the
          new field; corrected in the committed patch.

          Checking in www/changelog.html;
          /shared/data/ccvs/repository/hudson/www/changelog.html,v <-- changelog.html
          new revision: 1.936; previous revision: 1.935
          done
          Checking in plugins/xvnc/src/main/java/hudson/plugins/xvnc/DisplayAllocator.java;
          /shared/data/ccvs/repository/hudson/hudson/plugins/xvnc/src/main/java/hudson/plugins/xvnc/DisplayAllocator.java,v
          <-- DisplayAllocator.java
          new revision: 1.3; previous revision: 1.2
          done
          Checking in plugins/xvnc/src/main/java/hudson/plugins/xvnc/Xvnc.java;
          /shared/data/ccvs/repository/hudson/hudson/plugins/xvnc/src/main/java/hudson/plugins/xvnc/Xvnc.java,v
          <-- Xvnc.java
          new revision: 1.10; previous revision: 1.9
          done
          Checking in plugins/xvnc/src/main/resources/hudson/plugins/xvnc/Xvnc/global.jelly;
          /shared/data/ccvs/repository/hudson/hudson/plugins/xvnc/src/main/resources/hudson/plugins/xvnc/Xvnc/global.jelly,v
          <-- global.jelly
          new revision: 1.3; previous revision: 1.2
          done
          RCS file:
          /shared/data/ccvs/repository/hudson/hudson/plugins/xvnc/src/main/webapp/help-baseDisplayNumber.html,v
          done
          Checking in plugins/xvnc/src/main/webapp/help-baseDisplayNumber.html;
          /shared/data/ccvs/repository/hudson/hudson/plugins/xvnc/src/main/webapp/help-baseDisplayNumber.html,v
          <-- help-baseDisplayNumber.html
          initial revision: 1.1
          done

          Jesse Glick added a comment - Seems to work. In CVS. Notes: 1. Later patches were missing the new help page, but I found it among earlier diffs. 2. Proposed patch neglected to use JavaScript to enforce a numeric value for the new field; corrected in the committed patch. Checking in www/changelog.html; /shared/data/ccvs/repository/hudson/www/changelog.html,v <-- changelog.html new revision: 1.936; previous revision: 1.935 done Checking in plugins/xvnc/src/main/java/hudson/plugins/xvnc/DisplayAllocator.java; /shared/data/ccvs/repository/hudson/hudson/plugins/xvnc/src/main/java/hudson/plugins/xvnc/DisplayAllocator.java,v <-- DisplayAllocator.java new revision: 1.3; previous revision: 1.2 done Checking in plugins/xvnc/src/main/java/hudson/plugins/xvnc/Xvnc.java; /shared/data/ccvs/repository/hudson/hudson/plugins/xvnc/src/main/java/hudson/plugins/xvnc/Xvnc.java,v <-- Xvnc.java new revision: 1.10; previous revision: 1.9 done Checking in plugins/xvnc/src/main/resources/hudson/plugins/xvnc/Xvnc/global.jelly; /shared/data/ccvs/repository/hudson/hudson/plugins/xvnc/src/main/resources/hudson/plugins/xvnc/Xvnc/global.jelly,v <-- global.jelly new revision: 1.3; previous revision: 1.2 done RCS file: /shared/data/ccvs/repository/hudson/hudson/plugins/xvnc/src/main/webapp/help-baseDisplayNumber.html,v done Checking in plugins/xvnc/src/main/webapp/help-baseDisplayNumber.html; /shared/data/ccvs/repository/hudson/hudson/plugins/xvnc/src/main/webapp/help-baseDisplayNumber.html,v <-- help-baseDisplayNumber.html initial revision: 1.1 done

          gradopado added a comment -

          I could verify the fix with a version built at home. Could you please release a new version (I think it has
          been forgotten)?

          gradopado added a comment - I could verify the fix with a version built at home. Could you please release a new version (I think it has been forgotten)?

          Jesse Glick added a comment -

          Probably Kohsuke pushes new plugin releases, I'm not sure I have a handle on how
          this works yet...

          Jesse Glick added a comment - Probably Kohsuke pushes new plugin releases, I'm not sure I have a handle on how this works yet...

          Pushed a new version.

          Jesse, you can run "mvn -B release:prepare release:perform" to push a new
          release if you want.

          Kohsuke Kawaguchi added a comment - Pushed a new version. Jesse, you can run "mvn -B release:prepare release:perform" to push a new release if you want.

          gradopado added a comment -

          Thanks for fixing and releasing it! I can verify the solution.

          gradopado added a comment - Thanks for fixing and releasing it! I can verify the solution.

            jglick Jesse Glick
            adamfeuer adamfeuer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: