Sunday, February 20, 2011

Pastebin, and pastebinit

Another helpful snippet tonight in #kubuntu (all the cool stuff is in there!):

Have you ever run into a problem, where you have a long error message or something that you need to show someone in IRC? The answer is to use a pastebin which is a service where you can paste that text (or image, in an imagebin) and give the link. This keeps help channels readable; long pastes are called flooding, and will usually get you automatically disconnected. The best one, in my opinion, is

But what happens when you are working in a console on one computer, and using another for IRC? If the text terminal is connected to the Internet, my wise friend Daskreech says:

[22:46] Daskreech: apt-get install pastebinit
[22:46] Daskreech: lsmod | pastebinit
[22:46] Daskreech: it will upload it to pastebin for you

Lsmod, (list loaded modules) by the way, is a useful Unix command to use when you need to figure out which modules might be messing with your display or sound. The | is called a pipe, and is used to tell some commands where to output; in this case the pastebin.

Thanks for another useful tip, Daskreech! You rock.

PS to beginners, or those in stress: the apt-get command always needs to be proceeded by sudo, to give you root power. So the whole command will be: sudo apt-get install pastebinit. Now the apt has been updated in Debian distros, you can instead just do sudo apt install pastebinit.


  1. I have an simple alias using curl:

    alias paste='curl -v -F "paste_data=<-" -F "paste_user=$(whoami)" -F "paste_submit=paste_submit" -F "paste_lang=c" 2>&1 | grep Location'

  2. Just want to mention, that I wrote a ruby script, which does the same thing. Not everywhere you have root rights, but eventually ruby is installed!

    I like to couple these tools with Klipper. That's really handy, too!

  3. Nice…btw the Pastebin Plasmoid is great, too. It is easily usable with drag and drop and supports images, I placed it to an autohiding panel at the right screen-edge (e.g. press your print-key to start ksnapshot and then simply drag the generated screenshot to the applet and you will have the url in your clipboard).

  4. For fedora users, I'd like to point out the fpaste package. It pastes things to, a fedora pastebin. Behaves exactly the same as pastebinit.

    Disclaimer: I'm not on my fedora machine at the moment, so I can't say if pastebinit is in the repos or not :P

  5. Nice hint about the plasmoid! Although of course not helpful in the case of a desktop with nothing but a terminal. Fpaste sounds great as well for Fedora users.