Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to be able to (double) click a file from the ls output and open it with the associated program. Anyone knows a way to do this?

Mouse-console interaction is possible with GPM and links shows how it works.

share|improve this question

This is up to your terminal to handle.

urxvt has a plugin interface that enables this kind of interaction. One of the standard plugins provides clickable URLs directly in the terminal. These plugins are Perl scripts, and it would surely be in the scope to do something close to what you want.

Easy would be to let fully specified paths open with the WM default application.

Harder would be to let relative links understand their directory context (perhaps reading $PWD), but it would also be possible.

share|improve this answer

The only think I could think of is if you write some sort of program using GPM and a simple programming language that can implement GPM. Then if you use this, you could replace the ls file in your binary folder (probably either /bin or /usr/bin) with this program (in compiled form).

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .