gpt4 book ai didi

linux - 如何在 Ubuntu 中启动 Thunderbird 并最小化启动窗口

转载 作者:行者123 更新时间:2023-12-04 18:49:53 31 4
gpt4 key购买 nike

我正在尝试在启动时打开 Thunderbird 并将其窗口隐藏或最小化。我已经能够使用其他一些应用程序来完成此操作,但 Thunderbird 似乎没有任何方便的选项来打开托盘或最小化。

我编写了一个 bash 脚本并将其包含在 Startup gui 中。该脚本主要基于我在此处阅读的内容:Bash wait for process start .这是我的脚本:

#! /bin/bash

thunderbird &
while pids=$(pidof thunderbird)
do
sleep 1s
done
sleep 3s
xdotool search --onlyvisible --class thunderbird windowminimize

我也尝试在 thunderbird & 中不使用“&”我试过没有 while循环,而是有一个很长的 sleep等待。如果我在终端中(不是在启动时)运行具有以下行的脚本,它就可以正常工作:
thunderbird &
sleep 3s
xdotool search --onlyvisible --class thunderbird windowminimize

我在循环中做错了吗?或者启动过程中是否有什么东西使它不起作用?我还启动了其他应用程序,但我认为这些不会干扰这一点。我对 Linux 很陌生。

最佳答案

我只是复制粘贴this ask ubuntu answer :

我通过以下方式实现了所需的行为:

1) 安装 alltray它提供了一种在启动时打开 Thunderbird 的简单方法:

sudo apt update
sudo apt install alltray

2) 添加到启动应用程序:

Startup Applications

这将在启动时打开 Thunderbird,但不会最小化。

----- 更新 Minimize on Start and Close 不再支持 -----

3) 然后安装 Minimize on Start and Close在 Thunderbird 中(工具->附加组件->获取附加组件)

这需要配置(工具->附加组件->扩展->首选项)如下:

Add-on Config

--------------------------------------------------

3) 然后安装 Keep in Taskbar并重新启动 Thunderbird。

这是以前在 Ubuntu 16.04 中工作的不同位置的建议的组合。

我想我会分享这个,为其他人提供一个简单、更新的方法。

关于linux - 如何在 Ubuntu 中启动 Thunderbird 并最小化启动窗口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61856141/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com