How can I install xclip on an EC2 instance?
I needed this today for a file larger than a ssh-key, and cat was not enough. You need to enable the EPEL repo in EC2 in order to get xclip:
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo rpm -ivh epel-release-latest-7.noarch.rpm
sudo yum-config-manager --enable epel
sudo yum install xclip -y
Neither xclip nor xsel in the following directory
I found the following package that installed xclip and xsel in my computer.
rpm -ivh xclip-0.12-1.el6.rf.i686.rpm
Make sure to yum the following packages, otherwise, the above package will not be installed.
yum -y install libc.so.6
yum -y install libXmu.so.6
However, my program still is not executed by python because it appears the following address:
/usr/bin/xclip
Edited on February 3
Finally my program worked and I found out that the problem was the first code.
import random, sys, CipherEncryptionP
random.seed(42)
for i in range(20):
message = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'*random.randint(4,40)
message = list(message)
random.shuffle(message)
print('Test #%s: "%s..."' % (i+1, message[:50]))
for key in range(1,len(message)):
encrypted = CipherEncryptionP.encryptMessage(message,key)
print('Transposition cipher test passed. ')
I don't know what's the problem with the main function that I had at the beginning but this new fix definitely solved my problem.
Editer on February 3
At the end I discovered that the main function was missing an underscore, so I was able to run my program with that small fix. The problem was solved.
Install nvm / node on AMZ Linux 2 EC2 Instance with userData script
Although I still haven't figure out why the userData Script above doesn't work (it used to, so I'm not sure what changed), I was able to install Node using the following as userData, so I thought I'd share.
#!/usr/bin/env bash
yum update -y
curl -sL https://rpm.nodesource.com/setup_10.x | bash -
yum install -y nodejs git
I'd still be interested to know why the first script no longer works, if anyone has any idea.
Cheers!
Rob
Error: Can't open display: (null) when using Xclip to copy ssh public key
DISPLAY=:0 xclip -sel clip < ~/.ssh/id_rsa.pub
didn't work for me (ubuntu 14.04
), but you can use :
cat ~/.ssh/id_rsa.pub
to get your public key
Installing CouchDB in AWS EC2 Free Tier
The apache team put together this quick script that installs CouchDB (thanks @_jhs
for build-couchdb!) on an Amazon Linux AMI:
https://gist.github.com/1171217
If you are using cloudinit + the EC2 command line tools, simply use
ec2-run-instances with --user-data-file (you will need some mods to
the script to save the password or locally generate one) and voila'.
Relaxing FTW.
Worked like a charm for me!
Related Topics
Automate Scp with Multiple Files with Expect Script
Can't Add File to Git Repository But Can Change/Commit
Scp Command Between 2 Servers with 2 Different .Pem Keys
How to Use Ptrace(2) to Change Behaviour of Syscalls
Chmod a Freshly Mounted External Drive to Set Up Writing Access
How to Rewrite If File Not Found Using Nginx
Srlua Makefile Error Lua.H No Such File or Directory
Launching Linux from Busybox (Pivot_Root or Switch_Root, or ? )
How to Read/Write From/To a Linux /Proc File from Kernel Space
Convert Charset from a Entire Project to Utf-8
Make Bash Differentiate Between Ctrl-<Letter> and Ctrl-Shift-<Letter>
Restart Process on File Change in Linux
Why Does Wget Output to Stderr Rather Than Stdout