I finally figured out how to copy a URL in the X11 clipboard with [[http://elinks.or.cz/][Elinks]] (a *great* text-based Web browser) using a key stroke. Woohoo! enable_systems_functions () -- Set X selection function to_xsel(url) execute("echo -n \""..url.."\" | xsel -i") end bind_key ('main', 'p', function () to_xsel(current_url()) end) bind_key ('main', 'P', function () to_xsel(current_link()) end) For some reason, I am force to call =function () to_xsel(...) end= instead of =to_xsel()= itself in the binding as otherwise it doesn't work. I didn't understand why, but whatever.