我正在尝试创建一个Zenity列表来选择要删除的内核版本。
到目前为止,我已经:
dpkg -l | grep linux-image- | cut -f 3 -d ' ' | sed -e 's/^/FALSE /' | zenity --list --checklist --title="Select the Kernel versions to remove" --column="Kernel Version"这其中大部分都是孤立的,但我根本无法让复选框比特工作。
最后,我得到了一个未选中的复选框列表,没有相应的项目。
发布于 2014-12-08 09:38:39
虽然我在任何地方都找不到解释.
您需要为所有列指定一个列名,包括复选框列。
而且,没有必要像我所读的Zenity帮助页和示例所暗示的那样,在每一行的开头加上FALSE这个词。真奇怪。
所以:
dpkg -l | grep linux-image- | cut -f 3 -d ' ' | zenity --list --checklist --title="Select the Kernel versions to remove" --column="Remove?" --column="Kernel Version"现在工作得很好(除了我的系统上的GLib-WARNING... Bad file descriptor (9)之外,这是另一个问题)。
https://stackoverflow.com/questions/27254518
复制相似问题