小编Par*_*l N的帖子

如何创建 .Xauthority 文件?

我的主文件夹中没有 .Xauthority 文件。我想创建它,请告诉我在 ubuntu 10.10 中创建它的步骤。

谢谢你!

xorg

15
推荐指数
1
解决办法
9万
查看次数

如何让 GPS 接收器 BU-353 在 Ubuntu 上工作?

我有一个带 USB 接口的 GPS 接收器 BU-353,我正试图让它在 Ubuntu 下工作。

我跑了gpsd -n -N -D 2 /dev/ttyUSB0,得到了这个输出:

gpsd: launching (Version 2.94)
gpsd: listening on port gpsd
gpsd: running with effective group ID 1000
gpsd: running with effective user ID 1000
gpsd: opening GPS data source type 3 at '/dev/ttyUSB0'
gpsd: speed 38400, 8N1
gpsd: Garmin: garmin_gps Linux USB module not active.
gpsd: speed 9600, 8O1
gpsd: speed 38400, 8N1
gpsd: gpsd_activate(): opened GPS (fd 6)
gpsd: speed 4800, 8N1
gpsd: NTPD …
Run Code Online (Sandbox Code Playgroud)

usb gps

7
推荐指数
1
解决办法
3万
查看次数

如何在应用程序中添加子菜单?

我正在使用此代码尝试在 appindicator 中添加子菜单

#!/usr/bin/env python
import gobject
import gtk
import appindicator

def clean_quit(w):
  print "in quit"
  gtk.main_quit()

    if __name__ == "__main__":
      ind = appindicator.Indicator ("example-simple-client",
                              "indicator-messages",
                              appindicator.CATEGORY_APPLICATION_STATUS)
  ind.set_status (appindicator.STATUS_ACTIVE)
  ind.set_attention_icon ("indicator-messages-new")

  # create a menu
  menu = gtk.Menu()
  listMenu=gtk.Menu()
  listItems=gtk.MenuItem("Show List")
  listItems.set_submenu(listMenu)
  inews = gtk.MenuItem("Import")
  listMenu.append(inews)
  menu.append(listItems)
  listItems.show()
  # create some
  menu_items=gtk.MenuItem("Quit")
  menu.append(menu_items)
  menu_items.connect("activate", clean_quit)
  menu_items.show()
  ind.set_menu(menu)

  gtk.main()
Run Code Online (Sandbox Code Playgroud)

它不起作用 - 这段代码有什么问题?

indicator pygtk application-development

6
推荐指数
1
解决办法
1027
查看次数

标签 统计

application-development ×1

gps ×1

indicator ×1

pygtk ×1

usb ×1

xorg ×1