我正在 Ubuntu 中开发一个 Python 程序,该程序检查 Internet 连接并使用 GTK 和 PYGTK 模块在顶部面板上显示图像。现在我试图在启动后自动启动我的 Python 程序。请帮助我。
我尝试自动启动/etc/rc.local
但它显示这种类型的错误.....
GtkWarning: could not open display
Warning: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
GtkWarning: IA__gdk_screen_get_root_window: assertion 'GDK_IS_SCREEN (screen)' failed
GtkWarning: IA__gdk_screen_get_display: assertion 'GDK_IS_SCREEN (screen)' failed
GtkWarning: IA__gdk_x11_display_get_xdisplay: assertion 'GDK_IS_DISPLAY (display)' failed
GtkWarning: IA__gdk_screen_get_number: assertion 'GDK_IS_SCREEN (screen)' failed