On Ubuntu 14.04 with laptop mousepad disabled, how do I paste from clipboard?

1

I just installed Ubuntu 14.04 on my brand new laptop, having disabled the mousepad, so as to get used to the keyboard, I have just set up my Github account and SSH.

The final step of account setup is to copy the SSH id to Github.

Trying the usual keyboard paste keys have not worked. ctrl+v, ctrl+insert, ctrl+shift+v/insert.

Edit/paste in the browser (FireFox) shows the clipboard has not been made available.

I have used the about:config in Firefox to make sure clipboard.autocopy is enabled. It is, and found no man page about the clipboard in Ubuntu. Would appreciate any help in copying the SSH id from a text file to Github.

FallenAngel

Posted 2014-10-06T22:55:47.337

Reputation: 71

How are you copying the id? How do you know it is working? Can you paste it into anything? – G-Man Says 'Reinstate Monica' – 2014-10-07T01:04:08.397

Was using vim visual-mode and Ctrl-c to copy it. resolved it with xclip now, thank you. – FallenAngel – 2014-10-07T03:14:40.833

Answers

1

Sounds like you should use xclip. First install it like this; I like using aptitude:

sudo aptitude install xclip

Once install just run this command:

cat ~/.ssh/id_rsa.pub | xclip -selection clipboard

And the contents of id_rsa.pub should now be in your clipboard ready to be pasted via FireFox—or any clipboard aware application—into something.

JakeGould

Posted 2014-10-06T22:55:47.337

Reputation: 38 217

1yes, this resolved it. Needed to add a flag for secondary clipboard/buffer -selection clipboard. Thanks for quick response. – FallenAngel – 2014-10-07T03:07:36.127

@FallenAngel Happy that worked out! And thanks for the heads up on 'xclip -selection clipboard' Just added that to the answer to be complete & correct! – JakeGould – 2014-10-07T03:13:17.287