I have another approach you can try out. ThisThis should work to minimize the terminal. Really, it's going to minimize any window with active focus.
#!/bin/bash
matebash -terminalc &
sleep'mate-terminal' 5
&& active_win=$(xdotool getactivewindow)
xdotool windowminimize "$active_win"
exit 0
I don't have mate-terminal
, but it's working with xterm
& xfce4-terminal
.
Add a .desktop
file to ~/.config/autostart/
to run on startup.
Example: my_script.desktop
[Desktop Entry]
Type=Application
Exec=bash -c "/path/to/my_script.sh"
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=My Shell Script
Comment=Run script on startup