gio

How do I query for data in Rhythmbox

眉间皱痕 提交于 2019-12-08 05:13:20
问题 I'm using ubuntu 12.04 and I'm trying to write a python plugin to query the Rhythmbox database. The Rhythmbox version is v2.96 but this issue also occurs with v2.97 as well. When I do a python query, Ubuntu crashes with a segmentation fault. I need to confirm the following is correct and if I've found a bug specific to Ubuntu or if I've misunderstood how to correctly query. If anyone else using another distro can confirm - this would be most welcome. I've filed a bug report on bugzilla with

How do I query for data in Rhythmbox

故事扮演 提交于 2019-12-07 18:04:32
I'm using ubuntu 12.04 and I'm trying to write a python plugin to query the Rhythmbox database. The Rhythmbox version is v2.96 but this issue also occurs with v2.97 as well. When I do a python query, Ubuntu crashes with a segmentation fault. I need to confirm the following is correct and if I've found a bug specific to Ubuntu or if I've misunderstood how to correctly query. If anyone else using another distro can confirm - this would be most welcome. I've filed a bug report on bugzilla with regards to the segmentation fault. However, my question is not strictly about this - its specifically

meld - gi._glib.GError: Icon 'meld-change-apply-right' not present in theme. What is wrong with the installation?

十年热恋 提交于 2019-12-06 20:58:03
问题 I have managed to install the meld 3.14.2 and all the dependency packages, by compiling each package from source and all are installed on a NFS share with --prefix=<base>/meld for the meld tool && --prefix=<base>/meld/deps for the dependencies. Finally, I invoked the tool and I can see the GUI. But when I try to do some functionality testing, it throws me errors. I have never used the tool. So, I don't know how it is supposed to work exactly. But users have pointed out the following error,

how to get 3g modem signal strength in c++ linux?

馋奶兔 提交于 2019-12-06 02:44:49
问题 without using AT commands how can we get signal strength of 3g modem? The gdbus object for NetworkManager don't have any method like getSignalStrength . Network manager is locking device file preventing to use AT commands. nm-applet was able to display signal strength in system tray. so there should be a way to get signal strength form network manager! nmcli is command line counter part of nm-applet. Can i get signal strength using nmcli ? nothing about signal strength is mentioned in its man

Accessing samba shares with gio in python

混江龙づ霸主 提交于 2019-12-06 02:28:01
问题 I am trying to make a simple command line client for accessing shares via the Python bindings of gio (yes, the main requirement is to use gio). I can see that comparing with it's predecessor gnome-vfs, it provides some means to do authentication stuff (subclassing MountOperation ), and even some methods which are quite specific to samba shares, like set_domain() . But I'm stuck with this code: import gio fh = gio.File("smb://server_name/") If that server needs authentication, I suppose that a

glib network connection example

倖福魔咒の 提交于 2019-12-05 14:56:14
Can you advice some network connection example made with glib/gio libraries. There is quite a good reference manual , but no full example even for basic things. It will be used for simple sending and receiving files as a part of program. Yasushi Shoji How about like this? There is similar question at Fetch a file from web: in GTK using C #include <gio/gio.h> int main() { const gchar *uri = "https://stackoverflow.com/questions/5758770/"; GFile *in; GFile *out; GError *error = NULL; gboolean ret; g_type_init(); in = g_file_new_for_uri(uri); out = g_file_new_for_path("/tmp/a"); ret = g_file_copy

Accessing samba shares with gio in python

谁都会走 提交于 2019-12-04 07:54:24
I am trying to make a simple command line client for accessing shares via the Python bindings of gio (yes, the main requirement is to use gio). I can see that comparing with it's predecessor gnome-vfs, it provides some means to do authentication stuff (subclassing MountOperation ), and even some methods which are quite specific to samba shares, like set_domain() . But I'm stuck with this code: import gio fh = gio.File("smb://server_name/") If that server needs authentication, I suppose that a call to fh.mount_enclosing_volume() is needed, as this methods takes a MountOperation as a parameter.

installing PyGObject via pip in virtualenv [duplicate]

我的梦境 提交于 2019-12-04 01:44:54
This question already has answers here : Closed 2 years ago . Python cannot install PyGObject (3 answers) I'm actually upgrading an old django app from python2.7 to python3.4. While installing pygobject via pip, I got this error: Collecting pygobject Using cached pygobject-2.28.3.tar.bz2 Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 20, in <module> File "/tmp/pip-build-9dp0wn96/pygobject/setup.py", line 272 raise SystemExit, 'ERROR: Nothing to do, gio could not be found and is essential.' ^ SyntaxError: invalid syntax ----------

GIO socket-server / -client example

半城伤御伤魂 提交于 2019-11-27 21:36:21
I would like to create a server and client application that communicate via sockets using GIO. GSocketService and GSocketClient seem be perfect for this purpose but unfortunately I couldn't find some tutorial or example code (that a GLib, GIO,... newbie can understand). Does anybody know some good resources or can post example code here? drakide I finally managed to create both a simple server and client using glib and gio. My server looks like this: #include <glib.h> #include <gio/gio.h> /* this function will get called everytime a client attempts to connect */ gboolean incoming_callback

GIO socket-server / -client example

放肆的年华 提交于 2019-11-27 04:31:28
问题 I would like to create a server and client application that communicate via sockets using GIO. GSocketService and GSocketClient seem be perfect for this purpose but unfortunately I couldn't find some tutorial or example code (that a GLib, GIO,... newbie can understand). Does anybody know some good resources or can post example code here? 回答1: I finally managed to create both a simple server and client using glib and gio. My server looks like this: #include <glib.h> #include <gio/gio.h> /*