How automatically start Thunderbird minimized on AlmaLinux (Wayland)?
0
votes
1
answer
182
views
I am looking for a way to automatically start
Thunderbird 115.13.0
minimized on AlmaLinux 9.4
. AlmaLinux uses Wayland, and Thunderbird was installed using dnf install thunderbird
. I don't care if it is minimized in the dock or in the top bar, the main thing is that it starts and is minimized.
Since Thunderbird does not have such an option (why?), apparently we have to “simulate” a mouse click to minimize it.
The proposed solution so far―[birdtray
](https://unix.stackexchange.com/a/671861/372935)―didn 't work in this distro: Installed as flatpak, it couldn't find the Thunderbird window and also couldn't find the binary, even though /usr/bin/
is on the PATH
. This is probably due to Birdtray's isolation in the flatpak environment, but not sure.
Error starting Thunderbird as '/usr/bin/thunderbird ':
execvp: No such file or directory
$ which thunderbird
/usr/bin/thunderbird
Compiling Birdtray from source unfortunately segfaulted.
Also the script below, using [wmctrl
](https://unix.stackexchange.com/a/752323/372935) , wasn't successful.
#!/bin/bash
# Start Thunderbird
thunderbird &
# Give Thunderbird some time to start
sleep 5
# Get all Thunderbird window IDs
window_ids=$(xdotool search --class Thunderbird)
# Iterate over each window ID and minimize the viewable main window
for id in $window_ids; do
map_state=$(xwininfo -id $id | grep "Map State")
window_name=$(xprop -id $id | grep "WM_NAME")
if [[ $map_state == *"IsViewable"* && $window_name == *"Mozilla Thunderbird"* ]]; then
xdotool windowminimize $id
echo "Minimized window ID: $id"
break
fi
done
$ ./start_thunderbird_minimized.sh
Window not found, retrying...
Window not found, retrying...
Window not found, retrying...
**Weirdly enough, when trying xprop
to verify the correct window ID, it can't find the Thunderbird window either. When clicking on Thunderbird window literally nothing happens, whci might be due to Wayland?**
Asked by jay.sf
(237 rep)
Jul 25, 2024, 05:55 AM
Last activity: Jul 25, 2024, 12:05 PM
Last activity: Jul 25, 2024, 12:05 PM