tmux-urlview icon indicating copy to clipboard operation
tmux-urlview copied to clipboard

How to use this in a remote tmux session?

Open fent opened this issue 5 years ago • 2 comments

So this issue isn't directly related to tmux-urlview, but wondering if anyone else out there has this workflow.

I'm running a remote tmux session that I'm ssh'ing into. I have panes in this session that include urls, if I use urlview from a local tmux, the urls might be cut off, because the local tmux doesn't know about the panes from the remote tmux.

But if I were to use urlview from the remote tmux, it can't open my browser that I'm running on my computer, because it's running on a different server somewhere else. The best I can do is to use xclip to yank these urls in the remote session, and then on my computer, paste the url into my browser. Is there a better way? Like a x-open or x-open-url?

fent avatar May 01 '19 18:05 fent

Have you figured out a solution yet? I've been wondering the same thing too.

yjyao avatar Jun 11 '20 20:06 yjyao

I haven't. but I suppose now I need this less since my workflow has changed a bit.

still, it would be nice to have. some solutions could be

  • a local cli program that when given text from a terminal, scans it for any panes, then prints out their content in order. so given
hello     |   1 2 3 4
world     |   5 6 7 8
---------------------
the quick fox jumped
over the lazy dog

it would print

hello
world
----
   1 2 3 4
   5 6 7 8
----
the quick fox jumped
over the lazy

which could then be given to urlview. it wouldn't be perfect, a url could end, right at the end, making it difficult to know if the characters from the next line are part of the url or not.

  • run a local server that listens for requests (with some sort of api key for security) with urls, it then opens those urls in your browser. then on the server, configure urlview with a command that posts to your server with the url
  • figure out if this is possible with x11 (I don't know much about it)

fent avatar Jun 11 '20 22:06 fent