Guake / guake

Drop-down terminal for GNOME
https://guake.github.io
GNU General Public License v2.0
4.37k stars 577 forks source link

Options --select-tab, --split-vertical (--split-horizontal) and -execute-command not working as before (v. 3.8.4). #2167

Closed carlosromel closed 1 year ago

carlosromel commented 1 year ago

Instaled from ppa

sudo add-apt-repository ppa:linuxuprising/guake
sudo apt-get update
sudo apt install guake

Describe the bug When using --select-tab, --split-vertical (or --split-horizontal) and --execute-command, guake selects correct tab, split screen but not execute desired command on new area. Instead, execute command on new tab.

Expected behavior This behavior worked on previous versions (before remove of execute-command and later reinclusion of this option).

Actual behavior guake selects desired tab, split tab content but run command on new tab.

What you actually get. Tab open, splited and not command running on it. Other tab with desired command running.

To Reproduce

#!/bin/bash

TAB=$(guake --selected-tab)
echo "Tab #: ${TAB}"
guake                                        --execute-command='guake --selected-tab; echo top -s'

TAB=$(( TAB + 1 ))
echo "Tab #: ${TAB}"
guake --rename-tab="Legacy & instances"      --execute-command='guake --rename-tab="Legacy System";   echo "Legacy system"'

TAB=$(( TAB + 1 ))
echo "Tab #: ${TAB}"
guake --select-tab=${TAB} --split-vertical   --execute-command='guake --rename-tab="First instance";  echo "First instance"'
guake --select-tab=${TAB} --split-horizontal --execute-command='guake --rename-tab="Second instance"; echo "Second instance"'

Screenshots shot-2023-03-14_12-43-22 shot-2023-03-14_12-43-27 shot-2023-03-14_12-43-32 shot-2023-03-14_12-43-36 shot-2023-03-14_12-43-42


$ guake --support Guake Version: 3.9.0 Vte Version: 0.68.0 Vte Runtime Version: 0.68.0 -------------------------------------------------- GTK+ Version: 3.24.33 GDK Backend:
Davidy22 commented 1 year ago

--execute-command was removed in a previous version because it enabled a security flaw, which could be avoided by only allowing the flag to run on new tabs, so it was brought back with altered behavior in a later version. Although I guess this specific scenario where the flag is combined with split- should be fine to allow not making a new tab since it's still spawning a new terminal in the split screen.

Can't allow for selecting an existing terminal after the split to run the command in an already running terminal though, as that would reintroduce the security flaw