Closed csgillespie closed 3 years ago
Thanks for this detailed report. I'll be able to take a closer look shortly.
Thanks for your patience @csgillespie. It looks like this bug also caused read_clip()
to hang when run from RStudio - my colleague who has a Linux machine using the KWin window manager helped to diagnose that. Can you give this a spin and check if read/write is working for you?
devtools::install_github(“mdlincoln/clipr”, ref=“xsel-read-output”)
Seems to work for me.
To test I uninstalled clip
sudo apt remove xclip
Then ran
devtools::install_github("mdlincoln/clipr", ref="xsel-read-output")
clipr::write_clip("hello")
clipr::read_clip()
in RStudio
Alright. I'll ship this off to CRAN.
Now shipped to CRAN.
Thank you for taking a look so quickly!
Running
system2("xsel", "--clipboard")
causes my machine to hang (could be an i3 thing) when using RStudio console.Changing
to
Solves my issues.
The documentation suggests that this is the correct thing to do. It states that the behaviour depends on whether input / output are ttys: