DiscoverIt Posted December 14, 2021 Share Posted December 14, 2021 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' Quote Link to comment
trurl Posted December 14, 2021 Share Posted December 14, 2021 Already does this. Select Console from the context menu Quote Link to comment
DiscoverIt Posted December 14, 2021 Author Share Posted December 14, 2021 Thanks, two approach’s to the same result requiring entry into a terminal and then executing the command. It’s not possible to modify that specific context menu so pre-loading the command for a single click wouldn’t be feasible unfortunately. Quote Link to comment
tjb_altf4 Posted December 14, 2021 Share Posted December 14, 2021 8 minutes ago, DiscoverIt said: Thanks, two approach’s to the same result requiring entry into a terminal and then executing the command. It’s not possible to modify that specific context menu so pre-loading the command for a single click wouldn’t be feasible unfortunately. As @trurl said, it already does this Quote Link to comment
DiscoverIt Posted December 14, 2021 Author Share Posted December 14, 2021 (edited) 3 minutes ago, tjb_altf4 said: As @trurl said, it already does this 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 December 14, 2021 by DiscoverIt Quote Link to comment
tjb_altf4 Posted December 14, 2021 Share Posted December 14, 2021 are you trying to run a specific script from the context menu? Quote Link to comment
DiscoverIt Posted December 14, 2021 Author Share Posted December 14, 2021 (edited) 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 December 14, 2021 by DiscoverIt Quote Link to comment
tjb_altf4 Posted December 14, 2021 Share Posted December 14, 2021 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. Quote Link to comment
DiscoverIt Posted December 14, 2021 Author Share Posted December 14, 2021 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. Quote Link to comment
Recommended Posts
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.