代码之家  ›  专栏  ›  技术社区  ›  David

LightDM添加窗口管理器(Openbox)

  •  0
  • David  · 技术社区  · 6 年前

    我正在通过LightDM以kiosk模式运行我的应用程序(GUI)。这工作很好,但我很难把openbox包括进去。尽管我将openbox设置为 user-session

    lightdm.conf格式:

    [SeatDefaults]
    user-session=openbox
    autologin-user= xxxx
    autologin-user-timeout=0
    session-setup-script= /home/xxxx/Desktop/runapp.sh // run application 
    

    在里面 /usr/share/xsessions 有一个 openbox.desktop 文件,所以我不知道为什么它不适合我。

    1 回复  |  直到 6 年前
        1
  •  0
  •   David    6 年前

    所以解决办法很简单。

    你需要创建一个 autoscript.sh 文件位于 /home/xxx/.config/openbox/autoscript.sh

    如果你没有 openbox 文件夹,只需创建一个。

    这就是我的 自动脚本.sh 文件看起来像:

    cd /home/xxx/Desktop/app         //switch to folder where my app is located
    ./runapp                        // run my app
    

    使其可执行: chmod +x autoscript.sh

    lightdm.conf

    [SeatDefaults]
    user-session=openbox
    autologin-user= xxx
    autologin-user-timeout=0
    

    现在,当我启动时,我的GUI应用程序使用openbox窗口管理器正确显示。