veket官方网站论坛

2929 发表于 2009-11-2 00:45

Openbox下往lxpanel主菜单添加Menu item方法

转载,出处未知。作者:匿名

########### lxpanel主菜单添加item方法 #################
由于Gnome实在是庞大,电脑内存小,跑起来慢。最近换了openbox+lxpanel。速度比较快,但就是主菜单设置比较麻烦。后来找到了方法。

例如,希望在主菜单中添加maple和mathematica的启动项,可以这样修改~/.config/lxpanel/default/panels/panel文件,
Plugin {
    type = menu
    Config {
      image=/usr/share/lxpanel/images/my-computer.png
      system {
      }
      separator {
      }
#这里开始添加启动项
    menu{
    name=Math Tools   #添加菜单项
    image=/usr/share/icons/hicolor/scalable/apps/gnome-display-properties.svg
#这里添加子项目
    item {
      name=Maple 13
      image=$HOME/maple13/bin/Maple13.png
      action=xmaple
         }
    item{
      name=Mathematica 7   
                image=$HOME/Mathematica/7.0/SystemFiles/FrontEnd/SystemResources/X/Mathematica-128.png
      action=Mathematica
      }
    }
    separator {
      }
      item {
      command=run
      }
    }
}

保存完后,需要把mathematica和maple的应用程序的路径加入到.bashrc里面,比如我的.bashrc中含有:
PATH=$HOME/maple13/bin/:$PATH
PATH=$HOME/Mathematica/start/:$PATH
export MANPATH INFOPATH PATH
之后刷新.bashrc,再重启X即可!

sinkr 发表于 2023-3-9 00:00

谢谢楼主分享,学习了
页: [1]
查看完整版本: Openbox下往lxpanel主菜单添加Menu item方法