name: xenial
encrypted: no
Entering /mnt/stateful_partition/crouton/chroots/xenial...
crouton: version 1-20171122220410~master:99877eaf
release: xenial
architecture: amd64
xmethod: xiwi
targets: xiwi,touch
host: version 9901.77.0 (Official Build) stable-channel eve
kernel: Linux localhost 4.4.79-11654-g7e0f59a105a1 #1 SMP PREEMPT Mon Nov 13 16:37:19 PST 2017 x86_64 x86_64 x86_64 GNU/Linux
freon: yes
After installing crouton today on a new Pixelbook, trying to Paste into a xiwi window app (in my case WebStorm) fails, throwing the following error:
java.lang.NullPointerException: Failed to retrieve atom name.
See more of the full stacktrace in the attached screenshot

Attempting to paste anything from the clipboard appears to recreate the errror.
This worked fine 2 weeks ago when I installed on a different Pixelbook. I noticed that xclip was just replaced by xsel a few days ago; might have something to do with this:
https://github.com/dnschneid/crouton/commit/99877eaf50ae1d01657afc27be2b6e094579794b
FYI, I manually edited my local croutonclip file back to use xclip (instead of xsel) and now its working fine again.
Did you just replace each occurrance of the 'xsel' string or what changes did you do in croutonclip?
@mhantsch I edited croutonclip manually, but essentially reverted everything in there to before the xsel commit. Was just a few lines as I recall.
Here's the commit I'm referring to: https://github.com/dnschneid/crouton/commit/99877eaf50ae1d01657afc27be2b6e094579794b
Of course, I also installed xclip, but those two changes have been working great for me.
Running into very similar issues with pycharm unfortunately rolling back to that previous commit didn't fix anything for me I'm still seeing the Atom was 0 messages and the tracebacks in the logs
@DavidFrahm - thank you! Reverting back to xclip worked for me. It was driving me nuts not being able to copy text into a Xiwi window running Android Studio. I'm also on a Pixelbook
Hi, I am on Samsung Chromebook Pro with crouton: version 1-20171230152552~master:de1361af.
Clipboard syncing is not working on both xiwi tab and window.
I have tried @DavidFrahm 's fix by reverting changes in commit https://github.com/dnschneid/crouton/commit/99877eaf50ae1d01657afc27be2b6e094579794b .
Changing back to xclip has made clipboard syncing work again.
Edit: For those who want to try this fix, you have to sudo apt-get install xclip as well
Pixelbook, same issue, reverting to commit 99877ea worked.
FWIW, I solved this by installing xsel from its github repo.
Samung Chromebook Pro, same issue, reverting to commit 99877ea worked
Eventually, I did not revert anything, but I found that copying from crouton and pasting into cros works at least on the second or third attempt. I don't know why, but when the copy/paste does not yield anything, it helps for me to go and copy/paste one or maximum two more times; then it suddenly works.
Not sure if that helps in debugging, but I wanted to mention my observation.
Installing xsel from its development github repo fixed the issue for me.
How does one install it from GitHub?
I pretty much just followed what trystant posted above.
$ mkdir src
$ cd src
$ git clone [email protected]:kfish/xsel.git
$ cd xsel
$ aclocal
$ autoconf
$ automake --add-missing
$ ./configure
$ make
$ sudo make install
I also had to install automake in order to build it.
$ sudo apt-get install automake
Switching tabs on the window containing the crouton tab lets the copy work as intended.
I use startxiwi -bT code for example.
I have been doing it that way since before this issue I think. Will have to try xsel.
I had this problem...was Googling around, and found this thread. @gcaliber's instructions above worked for me.
I installed with (Version that caused issue):
sudo sh ~/Downloads/crouton -r stretch -t gnome-desktop,core,extension,chrome,xiwi
Yesterday (01-02-2019). Noticed the problem first when trying to paste license key into PyCharm. At first I thought it was an issue with Java... but thankfully found this post!
I'll gladly test this. With just the Pixelbook a quick 3-finger slide to move tabs before pasting in the chromeos window is easy. When docked and using an external monitor it is more of a PITA.
I installed xsel per @gcaliber instructions.
Am I supposed to do something else, in terms of upgrading Crouton or the extension or something else?
I tried restarting a new code tab via startxiwi -T code. I still can't paste anything into this code window that I copied in another browser tab. I have the same problem with copying into essentially anything I start up using startxiwi.... Not being able to copy & paste is really frustrating & a huge produtivity issue
@DavidFrahm Would you mind posting more detailed instructions on what you did with xclip from a user perspective.... When startxiwi starts up, I see comments that CroutonClip is running...
1) I don't have any idea if it is using xsel or xclip. How do I find out and how can I make it switch to what I want - is there some config file I need to fix.
2) I just followed @gcaliber's instructions to install xsel. The installation itself seemed to work but I did not touch anything else & it did not magically fix the probably of copy/paste not working.
Can you please provide detailed instructions on what you did.(sounds like you forced CroutonClip to switch to xclip from xsel).. I am just trying to use my Chromebook and Crouton to write code.... I'm not knowledgedable on either Crouton code base nor Linux for that matter. Thanks.
OK - I finally got this working - I think. I followed @DavidFrahm's approach of edits to croutonclip (in my /usr/local/bin. I just reversed all the changes as he suggested in reverting 99877ea (kept the pink lines deleted the greens). I also installed xclip as @tabby-jun suggested
I could not find the other part of that checkin to revert (the targets/extension) - would appreciate a pointer to where I'd find that. However, it does not seem to matter.
I am now able to copy from a startxiwi window (idea or xterm) & can paste into other windows.
To paste something I copied in a regular browser window into my idea or xterm, I need to use Shift+Insert.
Thanks for all the pointers here...
Net-net - I now am running with xclip, not xsel...
it seems to work
After I did the edits to croutonclip, it didn't work first... I restarted my machine & that seemed to get things working... Your mileage may vary, but a restart was a small price to pay:-)
Hmm... unfortunately, after a few more days of use.... the behavior is still flaky. Sometimes it works and sometimes it doesn't.
What will it take to convince folks working on Crouton & startxiwi to fix this? This is a pretty basic issue that seems to be broken now for a long time & is very unproductive. Other than this, Crouton etc. are very useful...
The latest version of xsel fixes this bug for me. However this version is not yet on Xenial nor Bionic repos.
But you can install the deb from: https://launchpad.net/ubuntu/disco/amd64/xsel/1.2.0+git9bfc13d.20180109-1
I bought a new Chromebook and moved away from Crouton to Crostini... Crostini works beautifully out of the box for this at least and is generally seems pretty stable for the relatively vanilla app development I do. So, much as I am grateful to Crouton for enabling me to do development on a low-end chromebook, I ended up moving away from it to solve this problem. Generally, I am very happy with Crostini. YMMV.
Most helpful comment
I pretty much just followed what trystant posted above.
I also had to install automake in order to build it.