gpt4 book ai didi

linux - i3blocks (i3wm) - 使用 sudo 命令

转载 作者:太空宇宙 更新时间:2023-11-04 10:47:06 26 4
gpt4 key购买 nike

<分区>

我正在为 i3wm 配置我的 i3blocks,但我似乎无法执行如下 sudo 命令:

[update-notifier]
label=UPDATE
command=sudo ~/.i3/scripts/update-notifier.sh
interval=once

在 update-notifier.sh 文件中我有这个:

apt-get update && apt-get upgrade

加上一些用于格式化 i3blocks 栏的 echo。我试过这个:

  • command=sudo ~/.i3/scripts/update-notifier.sh 使用和不使用 apt-get 的 sudo -> 脚本不启动
  • command=sudo apt-get update && sudo apt-get upgrade -> 命令未执行
  • command=~/.i3/scripts/update-notifier.sh 带有 apt-get 的 sudo -> 脚本启动,i3bar 格式正确,但 apt-get 不是t 执行。

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