Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My GUI does not work. I can only see a text terminal. I would like to send my logs to paste.ubuntu.com but I don't know how. Without a graphical interface, I am lost.

Is there any way to submit a file to pastebin without needing any GUI?

share|improve this question
add comment

2 Answers

There are many ways, of course, but I start with one which is simple to explain: it just requires some command line magic. I assume that there is internet connection (check it for example with ping -c 5 google.com. Also, I assume that /my/file is the location of file you would like to submit, and JohnDoe is your askubuntu nickname.

  1. The simplest of it all, but you need to install pastebinit first:

    sudo apt-get install pastebinit
    pastebinit -i /my/file
    
  2. Submit using curl. For that, curl must be installed.

    sudo apt-get install curl
    curl -v --data-urlencode "content@/my/filename" -d "poster=JohnDoe" -d "syntax=text" http://paste.ubuntu.com
    

    You will see some output, with one of the lines looking more or less like that:

    < Location: http://paste.ubuntu.com/123456789/
    

    This is the link you need to share.

  3. There is a number of text-only web browsers, for example w3m. Run these commands:

    sudo apt-get install w3m
    w3m http://paste.ubuntu.com
    

    You move around with a cursor. When you come to the text area and press "Enter", w3m will ask you which editor to use; choose nano. Use CtrlR to read in the file.

  4. Your USB sticks still work. Insert an USB stick and type mount to see at what location it has been mounted. Say, you see that it is /media/MyStick. You can copy the file using command line

    cp /my/file /media/MyStick
    
share|improve this answer
    
Because I did not know it. Quickly remedied. –  January Sep 11 '12 at 5:19
    
Good ma'am. Upvoted already. –  jokerdino Sep 11 '12 at 5:23
add comment

pastebinit by default uses pastebin.com

instead you can use gist. you need to install Ruby first then install gist gem

gem install gist

https://github.com/defunkt/gist

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.