Jump to content

Link WebUI to Terminal


DiscoverIt

Recommended Posts

I have a custom container which is interacted with via a screen session within the container. Manually opening the terminal via https://unRAID/webterminal and issuing 'docker exec -it container shellscript' works as expected but is there a way to tie this to the WebUI context menu of the container?

 

Maybe something like this?

https://unRAID/webterminal?'docker exec -it container shellscript'

Link to comment
3 minutes ago, tjb_altf4 said:

As @trurl said, it already does this

 

image.png.f4b56e0c2eadeb2505ac5660249a8c97.png

 

image.png.c52f13dedeb23127133dcc800e140416.png

 

Correct but from the console an additional command is required to load the saved screen. Trying to simplify the process of getting to the saved screen.  
 

I can either docker exec -it container shellscript or use console context and type shellscript. Both are essentially the same but I’m trying to make a two part process a single action. 

Edited by DiscoverIt
Link to comment
4 minutes ago, tjb_altf4 said:

are you trying to run a specific script from the context menu?

The script within the container loads a saved screen session of a program running in the container. Focused on the webui field as it’s modifiable but not sure if I can pass arguments into the web terminal from the address bar. 
 

Unless is the context menu per container editable now?

Edited by DiscoverIt
Link to comment
4 minutes ago, DiscoverIt said:

The script within the container loads a saved screen session of a program running in the container. Focused on the webui field as it’s modifiable but not sure if I can pass arguments into the web terminal from the address bar. 

If you can't create/change the entry point of the docker to do this (probably a no go), I'd look at the docker folder plugin, this was originally meant to group dockers, but it also gives you the ability to define custom commands among other functionality.

 

Otherwise you could put in a feature request to have custom commands added to the vanilla Unraid UI.

Link to comment

Thanks for the help, I’ll have to dig into the entry point mindset more to see if there’s a better way to handle this. Obviously a webui would be ideal but my skill set is CLI and not web dev. 
 

I’ll have to write up a feature request. The web terminal runs on JS so it shouldn’t be too crazy of an ask to process arguments. Although I’m thinking it might open security concerns as I can see a bad actor hiding https://fileserver/webterminal?’rm -rf *’ in a concealed link. 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...