Every copied a block of text to your clipboard and wished you could quickly save it as a file?

Well, open source developer Marcos Costales (of Folder Color fame) has released a new app that does precisely that.

When you have the ‘Clipboard to File’ tool installed you get a new right-click context-menu entry in Nautilus file manager (or the Nemo and Caja file managers, which are also supported). When you select it, it saves your clipboard content as a new text file or, if you copied an image, saves the image as a PNG file.

I often copy a chunk of text to my clipboard, launch Gedit (or another Linux text editor), paste the clipboard content in, hit ‘save’, pick a filename, choose a location, etc. It’s not hard but it is a minor hassle given there is, now, a much faster workaround.

So with Marcos’ nifty new app I just copy the text like normal, open my file manager, right-click in an empty area, and choose “clipboard to file”. This instantly saves clipboard text as a new text file or, if I copy an image, the app saves the content as a PNG file I can open/use elsewhere.

Simple, straightforward, no stress — nice job Marcos!

The new files are saved with the filename ‘clipboard.txt’, though if there’s already a file with that name it’ll append a number, e.g., ‘clipboard-1.txt’.

Install ‘Clipboard to File’ on Ubuntu

You can install Marco’s Clipboard to File app on Ubuntu 20.04 LTS and Ubuntu 22.04 LTS using a dedicated PPA.

Note: the app does not, at the time of writing, support Ubuntu 22.10 (this is probably owing to the changes in Nautilus extension support following the transition to GTK4/libadwaita).

sudo add-apt-repository ppa:costales/clipboard-to-file
sudo apt update && sudo apt install clipboard-to-file

To load the extension and start using it, restart Nautilus by appending the -q flag:

nautilus -q

If you use Caja or Nemo file managers you can install the tool from the same PPA, just append your app of choice to the install name, e.g., sudo apt install clipboard-to-file-caja.

Pretty nice tool overall, and definitely something to add if you’re an avid copy/paster.

You’ll find the source code on GitHub should you want to build it from source, contribute, or file an issue.

caja clipboard Nautilus nemo ppa