Easy pastebin uploads with Nautilus-pastebin
If you're like me, you do a lot of uploading to pastebin services. Although the task isn't terribly difficult, sometimes you're in a hurry and you just wish there was a much faster way. With the help of a little application called Nautilus-pastebin your pastebin uploads are only a right-click away.
In this article I am going to show you how to install and use this handy application made specifically (and only) for the GNOME desktop.
What is "pastebin"?
Before I get into the installation, a little definition of what a "pastebin service" is. If you've ever done any writing online (whether it be for a site like Ghacks, or even in a forum) and you've ever needed to add code to a post, you know it can be a hassle. There are two issues that are all too obvious: line numbering and code layout. When you post online, generally speaking, your code layout is all fubard. None of your indentions hold which makes code look sloppy. Also, if you add line numbers (for reference purposes) those numbers will be automatically copied should someone need to copy/paste your code. Two very good reasons why an alternative solution is necessary. That's where pastebin comes in handy. With pastbin you upload your code and, in return, you are given a simple link to post. So instead of posting up a huge chunk of code, you just add a link for which users can then visit and see your code.
Typically, pastebin services come in the way of a website like Pastebin. You don't have to login or even become a member. You just enter your code and you are given a url. Let's make that even easier shall we?
Installation
Installing nautilus-pastebin is simple:
- Open up Synaptic (or whatever package management system you use).
- Search for "nautilus-pastebin" (no quotes).
- Mark nautilus-pastebin for installation.
- Click Apply.
That's it. Upon completion of installation, you will be required to restart GNOME, so log out and log back in. You are now ready to start using nautilus-pastebin.
Where's the app?
You will quickly notice that there is no application in any of your menus. Why? Nautilus-pastebin is an action installed for the Nautilus file manager. To access the action do the following:
- Open up Nautilus.
- Right click a text file (this can be a .odt, .doc, .rtf, .txt, etc).
- From the menu select the Pastebin entry.
- Wait for the url to pop up.
When the warning pops up (see Figure 1) you don't get much time to see the link. At first you might think there's no way you can copy that down, and you certainly can't use your mouse to copy the link. So what do you do? Well, the developer thought of that. When you post a file to pastebin using Nautilus-pastebin, the url is automatically copied to your clipboard. So you can immediately go to the site (or whatever you want to post the url to) and click <Ctrl>v to paste the link. Simple!
You will also note (take a look at Figure 1) that you are pasting to paste.ubuntu.com. You can configure Nautilus-pastebin to use any pastebin service you choose. If you run the command nautilus-pastebin-configurator a small window will open up that will allow you to set the following:
- Open a browser
- Show notification
- Ask to confirm
- Which pastbin service to use
Make your selections and then click the Close button.
Final thoughts
Posting to pastebin has never been so easy. If you frequently use a pastebin service, and your desktop of choice is GNOME, do yourself a favor and install nautilus-pastebin.
Advertisement
Hi all,
I am the upstream author and just few moments ago I updated the extensions in order to make it work on newer Nautilus’ releases (higher than 3).
Cheers!
Thanks for letting us know, Alessio.
Actually, my bad. It’s there and because I was already logged in it added it to my pastebin.
I just love Ubuntu more and more.
Great post, one question:
I have my own page on Pastebin:
http://pastebin.com/u/clockworkpc
How do I configure this extension to send it there? I don’t see such an option in the window that is opened by nautilus-pastebin-configurator.
Been a bit of a Linux numpty I’ve found PasteBin to be very useful in the past, this will make life even easier, thank you.