title: Error in : Clipboard on X11 requires that the DISPLAY envvar be configured
body: <p>I'm writing a shinyapp in which I would like to put an actionbutton to copy some code (I'm using shinyace). 
  When I run my app for the first time, on a new session, it works fine. But when I close it and run it again, I've got an error : </p>
  
  <pre><code>Error in : Clipboard on X11 requires that the DISPLAY envvar be configured
  </code></pre>
  
  <p>I installed the <code>xclip</code> and <code>xsel</code> but the problem still exists. When I deploy my app with Shinyapps.io, I'm disconnected each time I want to use the copy-to-clipboard function.</p>
  
  <p>Here are my <code>sessionInfo()</code> and <code>capabilities()</code> : </p>
  
  <pre><code>R version 3.6.1 (2019-07-05)
  Platform: x86_64-pc-linux-gnu (64-bit)
  Running under: Ubuntu 18.04.2 LTS
  
  Matrix products: default
  BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
  LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1
  
  locale:
   [1] LC_CTYPE=fr_FR.UTF-8       LC_NUMERIC=C               LC_TIME=fr_FR.UTF-8       
   [4] LC_COLLATE=fr_FR.UTF-8     LC_MONETARY=fr_FR.UTF-8    LC_MESSAGES=fr_FR.UTF-8   
   [7] LC_PAPER=fr_FR.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
  [10] LC_TELEPHONE=C             LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C       
  
  attached base packages:
  [1] stats     graphics  grDevices utils     datasets  methods   base     
  
  other attached packages:
  [1] rsconnect_0.8.13 clipr_0.6.0      shinyAce_0.4.0   shiny_1.3.2     
  
  loaded via a namespace (and not attached):
   [1] Rcpp_1.0.1      packrat_0.5.0   digest_0.6.20   later_0.8.0     bitops_1.0-6   
   [6] mime_0.7        R6_2.4.0        jsonlite_1.6    xtable_1.8-4    magrittr_1.5   
  [11] rlang_0.4.0     rstudioapi_0.10 promises_1.0.1  tools_3.6.1     RCurl_1.95-4.12
  [16] httpuv_1.5.1    compiler_3.6.1  askpass_1.1     htmltools_0.3.6 openssl_1.4 
  </code></pre>
  
  <pre><code>jpeg         png        tiff       tcltk         X11        aqua    http/ftp     sockets 
  TRUE        TRUE        TRUE        TRUE        TRUE       FALSE        TRUE        TRUE 
       libxml        fifo      cledit       iconv         NLS     profmem       cairo         ICU 
         TRUE        TRUE        TRUE        TRUE        TRUE        TRUE        TRUE        TRUE 
  long.double     libcurl 
         TRUE        TRUE 
  </code></pre>
  
  <p>Do you know how to solve this problem ?</p>
  
  <p>I also asked here : <a href="https://community.rstudio.com/t/error-in-clipboard-on-x11-requires-that-the-display-envvar-be-configured/34894" rel="noreferrer">https://community.rstudio.com/t/error-in-clipboard-on-x11-requires-that-the-display-envvar-be-configured/34894</a></p>