This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[Konsole] Click to execute a command

1

Votes
1
0
Tags: None
(comma "," separated)
Lachu
Registered Member
Posts
864
Karma
1
OS
I have read this(https://tcanabrava.github.io/2020/07/16 ... e-in-2020/). I really likes idea about opening url by clicking. But what about add possibility to ran command by click. Of course, when user click, message dialog with command to execute will be displayed and user must accept.

Why?
1. Imagine this situation. I use OpenSUSE tumbleweed. Imagine I need to ran lspci. Bash told me lspci was in /usr/sbin, so I probably need a superuser right to ran this. Why not display "to run lspci click here (you need to type root's password)"? User only click on click here, message dialog will appear and bash will perform sudo /usr/sbin/lspci? Other way could be to display both messages.
I known user could only select sudo /usr/sbin/lspci, press SHIFT+INSERT and Enter, but newbie won't use it.

2. Ls could attach to each file ls full_path_to_it command, so user may only click on file to navigate to sub directory.

I'm developing similar project, called Bonsole. Source are on sourceforge. But Bonsole is quite different - it's Browser console. You could do a lot of stuff Bonsole allows by simple implementing this feature.


Lachu, proud to be a member of KDE forums since 2008-Nov.
Lachu
Registered Member
Posts
864
Karma
1
OS
Also, many interactions could be possible. Interactive programs, such as zypper (OpenSUSE package manager) could open named fifo/named socket or something similar. When dependency need to been solved by user, it attach command escape sequences to each choice inside question. When user click for example "downgrade package to previous version", subcommand (zypper-tell /run/zypper/socket-1 option-1) will been executed and zypper could continue.


Lachu, proud to be a member of KDE forums since 2008-Nov.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]