我已经阅读了官方YaST模块开发文档并成功地实现了我的YaST模块。现在我想在YaST中创建一个YaST菜单项,即当我键入yast时,有一个像System或Network Settings这样的菜单,而不是需要键入
/sbin/yast2 myModule.ycp每次我想要访问我的工具。我怎样才能做到这一点?我没有在网上找到任何有关这方面的文件。
发布于 2019-12-02 14:03:50
创建具有以下内容的/usr/share/applications/YaST2/myModule.desktop:
[Desktop Entry]
Type=Application
Categories=Settings;System;Qt;X-SuSE-YaST;X-SuSE-YaST-Software;
X-KDE-ModuleType=Library
X-KDE-HasReadOnlyMode=true
X-SuSE-YaST-Call=myModule.ycp
X-SuSE-YaST-Group=Software
X-SuSE-YaST-Argument=
X-SuSE-YaST-RootOnly=true
X-SuSE-YaST-AutoInst=
X-SuSE-YaST-Geometry=
X-SuSE-YaST-SortKey=20
X-SuSE-YaST-AutoInstResource=
X-SuSE-YaST-Keywords=myModule
Icon=yast-sw_single
Exec=xdg-su -c "/sbin/yast2 myModule.ycp"
Name=My module
GenericName=My module that does cool stuff
StartupNotify=true你的模块应该出现在“软件”类别中。
检查.desktop文件的其他模块在/usr/share/applications/YaST2/中的灵感(选择适当的类别,图标等)
https://unix.stackexchange.com/questions/553184
复制相似问题