使用glade的bash上的GUI
我想为我的电脑做一个遥控器。基本上我所需要的就是点击一个按钮来运行一个命令。在这之后,我成功地建立了一个我曾经梦想过的世界。 但是当我尝试使用使用glade的bash上的GUI,bash,gtk,glade,Bash,Gtk,Glade,我想为我的电脑做一个遥控器。基本上我所需要的就是点击一个按钮来运行一个命令。在这之后,我成功地建立了一个我曾经梦想过的世界。 但是当我尝试使用 gtkdialog -g test.glade -p MainWindow 这种情况会发生 (gtkdialog:18284): libglade-WARNING **: Expected <glade-interface>. Got <interface>. (gtkdialog:18284): libglade-WARNI
gtkdialog -g test.glade -p MainWindow
这种情况会发生
(gtkdialog:18284): libglade-WARNING **: Expected <glade-interface>. Got <interface>.
(gtkdialog:18284): libglade-WARNING **: did not finish in PARSER_FINISH state
(gtkdialog:18284): libglade-CRITICAL **: glade_xml_get_widget: assertion 'self != NULL' failed
(gtkdialog:18284): ERROR **: Can not load 'MainWindow' from file 'test.glade'
(gtkdialog:18284):libglade警告**:应为。得到了。
(gtkdialog:18284):libglade警告**:未在PARSER_finish状态下完成
(gtkdialog:18284):libglade CRITICAL**:glade_xml_get_小部件:断言“self”=“NULL”失败
(gtkdialog:18284):错误**:无法从文件“test.glade”加载“MainWindow”
在那之后什么也没发生。。
有没有更简单的方法
我的想法是把这个程序放在一个单独的虚拟屏幕上,然后用我的手机访问它
那是林间空地档案
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.2 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkWindow" id="MainWindow">
<property name="can_focus">False</property>
<child>
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkButton" id="LvUP">
<property name="label" translatable="yes">Left Channel UP</property>
<property name="width_request">217</property>
<property name="height_request">154</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="amixer -c 1 set "PCM Front" 5%+,0%-" swapped="no"/>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="VolUp">
<property name="label" translatable="yes">Vol UP</property>
<property name="width_request">217</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="pactl set-sink-volume 0 +5%" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="RvUP">
<property name="label" translatable="yes">Right Channel UP</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="amixer -c 1 set "PCM Front" 0%-,5%+" swapped="no"/>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="prev">
<property name="label">gtk-media-previous</property>
<property name="height_request">154</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="play">
<property name="label" translatable="yes">Play / Pause</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="clementine -t" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="next">
<property name="label">gtk-media-next</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
<signal name="clicked" handler="clementine -f" swapped="no"/>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="LvDown">
<property name="label" translatable="yes">Left Channel Down</property>
<property name="height_request">154</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="amixer -c 1 set "PCM Front" 5%-,0%-" swapped="no"/>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="VolDown">
<property name="label" translatable="yes">Vol Down</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="pactl set-sink-volume 0 -5%" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="RvDown">
<property name="label" translatable="yes">Right Channel Down</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="amixer -c 1 set "PCM Front" 0%-,5%-" swapped="no"/>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="mute">
<property name="label" translatable="yes">Mute</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="foff">
<property name="label" translatable="yes">Hello Darkness, My Old Friend | foff</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="hib">
<property name="label" translatable="yes">Hib3rnate</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">3</property>
</packing>
</child>
</object>
</child>
<child type="titlebar">
<placeholder/>
</child>
</object>
</interface>
假的
真的
假的
左通道向上
217
154
真的
真的
真的
0
0
卷起来
217
真的
真的
真的
1.
0
右通道向上
真的
真的
真的
2.
0
gtk媒体先前
154
真的
真的
真的
真的
0
1.
播放/暂停
真的
真的
真的
1.
1.
gtk媒体下一站
真的
真的
真的
真的
2.
1.
左通道向下
154
真的
真的
真的
0
2.
音量下降
真的
真的
真的
1.
2.
右下通道
真的
真的
真的
2.
2.
哑巴
真的
真的
真的
0
3.
你好,黑暗,我的老朋友福夫
真的
真的
真的
1.
3.
Hib3rnate
真的
真的
真的
2.
3.
gtkdialog
是一个过时的项目,它不支持glade
使用的现代gtkbuilder
语法。应该避免这种情况,您应该使用具有官方绑定的python
或gjs
等语言编写应用程序。这是python+GTK+3教程中关于Glade和GtkBuilder
的一页: