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

"screen" default does not work

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Trivial
    • Resolution: Fixed
    • Component/s: xvfb-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      The documentation says:
      Xvfb screen changes the screen resolution and pixel depth, it needs to be in WxHxD format (i.e. 1600x1200x24). The default is 1024x768x24.

      I just installed the xvfb-plugin, and took all the defaults, leaving the "screen" value blank. When running my Jenkins job, the first time, in the log I could see:

      Xvfb starting$ Xvfb :1 -screen 0  -fbdir /var/lib/jenkins/xvfb-99-1021388786522495009.fbdir
      

      and at the end of the job:

      Xvfb stopping
      Finished: SUCCESS 
      

      Running the exact same job every subsequent time, the log say:

      Xvfb starting$ Xvfb :1 -screen 0  -fbdir /var/lib/jenkins/xvfb-100-2665068639033469958.fbdir
      
      ERROR: Xvfb failed to start, consult the lines above for errors
      

      Looking at running jobs (using `ps -ef | grep -i xvfb`), I got nothing.

      Trying this same command from the command line interface, I get:

      $ Xvfb :1 -screen 0  -fbdir /var/lib/jenkins/xvfb-106-4356636144193454909.fbdir
      
      Invalid screen configuration -fbdir for -screen 0
      

      Finally I decided to specify something for the "screen" parameter - I used the supposed default: "1024x768x24" - and everything worked fine.

        Attachments

          Activity

          Hide
          zregvart zregvart added a comment -

          Would you prefer that if you change the default to an empty string it should revert back to default, or that the screen parameter needs to be specified at all times (required, validated input) and if you change it to an empty string it should not allow you to?

          Show
          zregvart zregvart added a comment - Would you prefer that if you change the default to an empty string it should revert back to default, or that the screen parameter needs to be specified at all times (required, validated input) and if you change it to an empty string it should not allow you to?
          Hide
          siking Mark Lehky added a comment -

          In any case the documentation and actual behaviour should always match.

          The command line Xvfb, manpage says:
          screen screennum WxHxD This option creates screen screennum and sets its width, height, and depth to W, H, and D respectively. By default, only screen 0 exists and has the dimensions 1280x1024x8.
          I think it would be desirable to have this exact same behaviour in the plugin. So if in the plugin I set blank for screen, then this parameter never gets passed to the CLI Xvfb.

          Show
          siking Mark Lehky added a comment - In any case the documentation and actual behaviour should always match. The command line Xvfb, manpage says: screen screennum WxHxD This option creates screen screennum and sets its width, height, and depth to W, H, and D respectively. By default, only screen 0 exists and has the dimensions 1280x1024x8. I think it would be desirable to have this exact same behaviour in the plugin. So if in the plugin I set blank for screen, then this parameter never gets passed to the CLI Xvfb.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: zregvart
          Path:
          src/main/java/org/jenkinsci/plugins/xvfb/Xvfb.java
          src/test/java/org/jenkinsci/plugins/xvfb/XvfbBuildWrapperTest.java
          http://jenkins-ci.org/commit/xvfb-plugin/fa47c05ced717109fc645f7dc7dd3b7bfc4522c7
          Log:
          JENKINS-32039 "screen" default does not work

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: zregvart Path: src/main/java/org/jenkinsci/plugins/xvfb/Xvfb.java src/test/java/org/jenkinsci/plugins/xvfb/XvfbBuildWrapperTest.java http://jenkins-ci.org/commit/xvfb-plugin/fa47c05ced717109fc645f7dc7dd3b7bfc4522c7 Log: JENKINS-32039 "screen" default does not work
          Hide
          zregvart zregvart added a comment -

          Fixed in version 1.1.3

          Show
          zregvart zregvart added a comment - Fixed in version 1.1.3

            People

            Assignee:
            zregvart zregvart
            Reporter:
            siking Mark Lehky
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: