Guake / guake

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

Guake not reachable anymore when you put wrong command for startup #2217

Open ReneFroger opened 6 months ago

ReneFroger commented 6 months ago

Describe the bug

I wanted guake to hook on the command when starting up for first time, called tmux attach.

Seems this was the wrong command, but I'm not able either to adjust/correct the command. Traceback:

Guake not running, starting it
Loading Gnome schema from: /usr/share/glib-2.0/schemas
Language previously loaded from: /usr/share/locale
Guake Terminal 3.10
VTE 0.68.0
Gtk 3.24.33
created fresh notebook for workspace 0
Spawning new terminal at /home/ehart
current workspace is 0
System doesn't support transparency
can't bind show-focus key
Spawning new terminal at /home/ehart
Guake tabs restored from /home/ehart/.config/guake/session.json
Guake initialized
Calling startup script: tmux attach
Traceback (most recent call last):
  File "/usr/bin/guake", line 33, in <module>
    sys.exit(load_entry_point('guake==3.10', 'console_scripts', 'guake')())
  File "/usr/lib/python3/dist-packages/guake/main.py", line 664, in exec_main
    if not main():
  File "/usr/lib/python3/dist-packages/guake/main.py", line 646, in main
    pid = subprocess.Popen(  # pylint: disable=consider-using-with
  File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'tmux attach'

Okay, no problem. Then I should be able to modify the startup script at hook of Guake start.

Then Guake Preferences binary doesn't open anymore. Killing Guake and trying, but Guake Preferences window is not reachable.

Then I searched everywhere in Guake config or settings, but nowhere the command tmux attach is set somewhere. But yet everytime when I start, Guake, Guake seems to be able to read the command tmux attach somewhere, which isn't clear where.

As fallback, I tried guake --restore-preferences my_old_preferences

But alas, I keep getting the same error when starting guake, and can't find out where I can adjust it.

Expected behavior

If the command is wrong, Guake Preferences window should be able to reachable to correct the mistake.

To Reproduce

Add tmux attach in Guake command hooks, at start up. And then restart Guake.


Guake Version: 3.10

Vte Version: 0.68.0

Vte Runtime Version: 0.68.0


GTK+ Version: 3.24.33

GDK Backend: <GdkX11.X11Display


Desktop Session: xubuntu


Display: :0.0

RGBA visual: True

Composited: False

ReneFroger commented 6 months ago

After looking in the source code of main.py of Guake, I was able to disable it with guake --no-startup-script and removed the command in Guake prefences. But I believe there should be error handler built in to see if the commands doesn't return the right value, switch to no script instead?

sebastjan-hribar commented 1 month ago

This has gotten me too. I have a startup script I've used before and if I add it now to hooks it basically falls to a loop. Here is the script:

#!/bin/sh
sleep 2
guake -r "Projects" -e "cd projects"
guake -n "2" -r "DOCKER" -e "cd projects/docker && dry"
guake -n "3" -r "APP" -e "cd projects/APP"
# more commands
exit 0

I really find having tabs opened in different dirs and renamed when starting very useful. Any way to achieve this? I currently simply specify the path to my script in the hooks field. Is the problem in my script or in the way I specify it?