How to select a line of text in the archaic terminal browser - Links

7,279

I assume you are not running X. This means you have no native clipboard support. There are several ways to use a clipboard in terminal applications. The difference to GUI applications is that they cut and paste operation is not performed from within the application. Instead it is done using a different program.

1) One way is to start the brower in tmux and use the C-b[ to enter copy mode. Press space bar to start the selection and enter to copy. Pasting is done using C-b].

2) A different solution is to use the gpm daemon. You can use your mouse and copy-paste as you would in X.

Share:
7,279

Related videos on Youtube

Seph
Author by

Seph

Updated on September 18, 2022

Comments

  • Seph
    Seph over 1 year

    I poured over this http://links.twibright.com/user_en.html#subsubch-html_options

    But so far does not seem like there is an key to select a line in the browser running in text mode. I would like to select a line and copy it. The cool thing about doing this is that I can stay in a terminal environment and if I need to search something on the net like a github repo I can use Links to copy paste the repo url.

    • tripleee
      tripleee almost 11 years
      My experience from Lynx is that you need to disable mouse support in the application's preferences in order for basic xterm copy/paste to work.
    • Gilles 'SO- stop being evil'
      Gilles 'SO- stop being evil' almost 11 years
      @tripleee You don't need to disable mouse support. Hold Shift down during mouse events so that they are interpreted by the terminal (typically for copy/paste) and not passed to the application.
  • Seph
    Seph almost 11 years
    Well I installed a homebrew of tmux and opened Links inside a tmux session. I tried ctrl+b & [, also ctrl+b+[, c+b [, etc etc and so far nothing is happening and im not getting any feedback that what I am doing is even doing anything. I'm not able to make work any of the commands here openbsd.org/cgi-bin/man.cgi?query=tmux&sektion=1#end
  • Marco
    Marco almost 11 years
    tmux does not provide much feedback regarding the copy-paste process. Nevertheless if not any of the commands mentioned in the man page works you might have a terminal problem and tmux does not receive the ctrl-b sequence. Try to use a different terminal or use the default terminal settings if you customised yours. Feed you favourite search engine with “tmux copy mode” for further details.
  • Gilles 'SO- stop being evil'
    Gilles 'SO- stop being evil' almost 11 years
    @SephVelut Note that with tmux, you can only copy-paste between windows of the same tmux instance. If you want to access the X or OSX clipboard, you need a program that understands these clipboards, and it's easiest to use the mouse.
  • Kamafeather
    Kamafeather about 3 years
    Any idea how to allow copy-paste then running links inside iTerm2?