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.
Questions tagged [gio]
189 questions
2
votes
2 answers
Documentation for nautilus and GIO's .hidden file feature?
I just discovered some mentions of how nautilus used to read files named .hidden and hide files matching the patterns listed in them, and at some point that feature was moved to GIO g_file_info_get_is_hidden. However, I haven't been able to get it…

garrett mitchener
- 81
- 1
- 5
2
votes
1 answer
add keyboard shortcuts to GIo.Menu
I am trying to add accelgroup (keyboard shortcuts) to the Gio.Menu items.
But I have not found a way to do this. Like, in this example, I want to open file with +o
filemenu =…

BaRud
- 3,055
- 7
- 41
- 89
2
votes
1 answer
How do I register a profile with bluez using dbus/gio?
I'm trying to register a profile with bluez through D-Bus/Gio. When I call RegisterProfile everything goes OK. I check my GError and it's NULL and my return value is an empty GVariant. I've tried many things, but here is my latest code. When I run…

JT Harkey
- 49
- 1
- 6
2
votes
2 answers
Gio SimpleAction to call a function
I have made menu using Gio action in a Gtk3 app.
The menu item is created as:
#in main file
MenuElem = menu.MenuManager
# Open Menu
action = Gio.SimpleAction(name="open")
action.connect("activate",…

BaRud
- 3,055
- 7
- 41
- 89
2
votes
2 answers
Using libsecret I can't get to the label of an unlocked item
I'm working on a little program that uses libsecret. This program should be able to create a Secret.Service...
from gi.repository import Secret
service = Secret.Service.get_sync(Secret.ServiceFlags.LOAD_COLLECTIONS)
... get a specific Collection…

xor
- 611
- 6
- 15
2
votes
1 answer
Can gsettings be created dynamically?
I'm curious if gsettings can be used to store objects, or must everything be set statically? Could objects such as users objects be stored in gsettings? Could users be added and deleted with fixed properties on each user?

kagronick
- 2,552
- 1
- 24
- 29
2
votes
1 answer
Glib/Gio Asynchronous or Threaded UDP Server
I have currently a synchronous UDP application receiving messages.
The code :
#include
#include
#include
#include
#include
int main(argc,argv)
int argc;
char ** argv;{
char buf[256], *ptr,…

Acrasidae
- 71
- 1
- 7
2
votes
1 answer
What if GInterface methods signatures don't match with the VirtualTable (struct) methods?
I decided to go back to basics about GInterfaces in GObject, so I went to read the basic tutorial again. In this chapter you can see how to define a very simple GInterface.
As you can see, the signatures of the methods maman_ibaz_do_action and…

knocte
- 16,941
- 11
- 79
- 125
2
votes
1 answer
Asynchronous GIO Server/Client
I would like to create an Asynchronous server and client application that communicate via sockets using GIO. As I am newbie to GIO, on browsing I got the below code - which is my client. I am unable to find any examples of the server. Please guide…

gio_Beginer
- 71
- 8
2
votes
1 answer
How do I change the size of a GTK container widget?
I'm getting myself thoroughly confused about how Gtk controls widget sizes inside a container such as a GtkBox. Please can someone guide me through the intricacies for this question?
I have a GtkBox containing two widgets - in the example these are…

fossfreedom
- 2,903
- 2
- 19
- 40
2
votes
2 answers
Async HTTP request using GIO
I would appreciate an example on how to perform an async HTTP POST request using Python's GIO binding.
Edit: Example sought without using Twisted.

jldupont
- 93,734
- 56
- 203
- 318
2
votes
1 answer
FileOutputStream: write to serial port
I'm trying to write single bytes to a serial port in Vala using a FileOutputStream:
var dev = File.new_for_path("/dev/ttyACM0");
var dev_io = dev.open_readwrite();
var dev_o = dev_io.output_stream as…

Genesis Rock
- 707
- 2
- 5
- 16
2
votes
1 answer
DBUS code crashes when placed inside daemon process, but runs fine in an independent standalone main() function without daemon code
I have ran the following code in Ubuntu. DBUS code crashes when placed inside daemon while process, but runs fine in an independent standalone main() function without daemon broiler plate code structure. Note: I will later re-factor the code in…

enthusiasticgeek
- 2,640
- 46
- 53
2
votes
1 answer
Find trashed file location in GIO
The documentation says that all files moved to trash are stored normally in ~/.local/share/Trash/files. Are there an exception for files removed from removable media? Are they stored in drive_root/.Trash-xxx directory? Or is this behavior obsolete?…

Pavel Strakhov
- 39,123
- 5
- 88
- 127
2
votes
0 answers
GIOChannel won't detect G_IO_IN
I use blocking IO (because this seems the easiest way to write larger amounts of data to a socket).
I would like to detect if there is any data to read, so I use g_io_channel_get_buffer_condition(). The problem is that it will always give back 4,…

vbence
- 20,084
- 9
- 69
- 118