Questions tagged [gio]

GIO is striving to provide a modern, easy-to-use VFS API that sits at the right level in the library stack, as well as other generally useful APIs for desktop applications (such as networking and D-Bus support). The goal is to overcome the shortcomings of GnomeVFS and provide an API that is so good that developers prefer it over raw POSIX calls. Among other things that means using GObject.

189 questions
17
votes
2 answers

GIO socket-server / -client example

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,...…
drakide
  • 1,757
  • 2
  • 15
  • 23
14
votes
5 answers

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

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=/meldfor the meld tool && --prefix=/meld/deps for the…
GP92
  • 433
  • 1
  • 12
  • 30
12
votes
1 answer

installing PyGObject via pip in virtualenv

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: …
MicroCheapFx
  • 392
  • 1
  • 2
  • 15
9
votes
2 answers

How can I find out whether a GSettings schema exists or not before attempting to use it?

If a GSettings schema exists and has been compiled, there is usually no problem reading from it. However, if it doesn't exist, an error is usually thrown which cannot be handled. Try this in a Python file or console: from gi.repository import…
Mendhak
  • 8,194
  • 5
  • 47
  • 64
8
votes
3 answers

Updated Bluez DBUS-API document?

I just tried to run a vala bluez example (found in the DbusClientSamples page) and I got this error: GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Method "DiscoverDevices" with signature "" on interface "org.bluez.Adapter" doesn't exist Is…
knocte
  • 16,941
  • 11
  • 79
  • 125
6
votes
3 answers

Is it possible to modify GNOME desktop file metadata from non-GUI session using gio?

Running CentOS 7 with GNOME 3.22.2, and I am trying to write an Ansible playbook to copy icons from /usr/share/applications to a pre-defined user's desktop and then grant trusted permission (Using gio set "metadata::trusted" yes). When I try to see…
jhrabi
  • 309
  • 2
  • 16
5
votes
1 answer

Accessing samba shares with gio in python

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…
azkotoki
  • 2,357
  • 2
  • 22
  • 26
5
votes
3 answers

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

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…
Necktwi
  • 2,483
  • 7
  • 39
  • 62
5
votes
2 answers

How can I set the rating of a song playing in Rhythmbox 2.96?

I am trying to create a Python plugin which will set the rating of the currently playing song in Rhythmbox 2.96. It appears that Rhythmbox 2.96 doesn't let you use the API (Python modules) to set the rating of a song anymore; player related actions…
Mendhak
  • 8,194
  • 5
  • 47
  • 64
4
votes
1 answer

Can't change dconf-entry with GSettings

I'm currently building a simple application on Gjs, which should change the background-image of my gnome-shell. A solution on how this can be done using the gsettings-tool can be found here. Since I want to build a desktop-application around it, I…
Lukas Knuth
  • 25,449
  • 15
  • 83
  • 111
4
votes
1 answer

glib network connection example

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.
qnikst
  • 302
  • 1
  • 9
4
votes
1 answer

Gio.SimpleAction not emiting change-state signal

I am trying to create a Gio.SimpleAction and connecting to its change-state signal, for taking an specific action when the state is changed, but I have failed to come up with a working code. Here is an example of what I have tried (and expected to…
romaia
  • 413
  • 3
  • 6
4
votes
1 answer

How can I implement server side SMTP STARTTLS?

I am trying to implement a simple SMTP server using Vala and GLib + GIO. Plain text communication is no problem so far, but when it comes to TLS using STARTTLS things get harder. This is the code I have so far: const string appname = "vsmtpd"; const…
Promi
  • 318
  • 3
  • 11
4
votes
2 answers

How do I use g_settings_schema_get_key from python?

I'm following http://www.micahcarrick.com/gsettings-python-gnome-3.html to use GSettings from python, and I've succeeded to read a value: from gi.repository import…
AlexKing
  • 91
  • 6
4
votes
1 answer

why does g_file_copy return Operation not supported when DBUS_SESSION_BUS_ADDRESS is not set

The following code works fine as a normal user session: #include int main() { const gchar *uri = "https://stackoverflow.com/questions/5758770/"; GFile *in; GFile *out; GError *error = NULL; …
Wayne
  • 914
  • 2
  • 13
  • 25
1
2 3
12 13