-
Notifications
You must be signed in to change notification settings - Fork 17.1k
Description
With Electron v0.27.2 & Ubuntu 14.04.
The clipboard module seams to be broken in Ubuntu 14.04. It looks like clipboard.readText() can find the content that has been previously set with clipboard.writeText() in the same process, but nothing is actually copied in the OS clipboard (in fact it behaves as if an empty string was copied).
I wrote a minimal app that only contains :
var clipboard = require('clipboard');
console.log("Clipboard content was: " + clipboard.readText());
clipboard.writeText('Example String');
console.log("Clipboard content is now: " + clipboard.readText());When running this app, it outputs as expected :
Clipboard content was: some text
Clipboard content is now: Example String
but when I try to CTRL+V the clipboard content in another app then nothing is pasted. A second run outputs :
Clipboard content was:
Clipboard content is now: Example String
I experienced the same issue with writeHtml()/readHtml() methods. I also tried this code with an older version of electron (atom-shell v0.22.3) but the same problem occurs. I couldn't test it on other OS or distributions.