Ubuntu xclip. To address issue one, you can use ydotool or dotool.