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
1
vote
1 answer

How do I open a zip within a zip with libzip

I am trying to open a zip inside a zip #include "zip.h" #include "gtk.h" zip_t *mainzipfile = zip_open(g_file_get_path(file), ZIP_CHECKCONS, &error); zip_file_t *childzip = zip_fopen(mainzipfile, "child.zip", ZIP_RDONLY);// this…
Bret Joseph
  • 185
  • 8
1
vote
0 answers

Gio Mount Returns Different Outputs

I'm trying to make python script for mounting using Gio Module, however when i add my script to crontab or run it as a service, i only get filesystem root: In shell: gio mount -l returns every mountable drive and volume, however, when i run: sudo…
cocorocho
  • 35
  • 5
1
vote
1 answer

How to get icon for a file using gio and python3

I want to get the default icon for a corresponding file using gtk. I tried this method in python3 but it gave me an error from gi.repository import Gio as gio from gi.repository import Gtk import os def get_icon_filename(filename,size): …
1
vote
1 answer

How to retrieve real time output with GSubprocess in C?

I have the following C code: #include int main(void) { GSubprocess *process; gchar *output; gchar *error; process = g_subprocess_new(G_SUBPROCESS_FLAGS_STDOUT_PIPE, NULL, "./for.sh", NULL); …
1
vote
1 answer

gio: file:///tmp/....pdf: No application is registered as handling this file

I have this code Python3.7 on Fedora 30 : try : subprocess.call(["gio", "open", path_to_pdf]) On others linux systems, including Fedora 29, the standalone application generated with Pyinstaller runs fine. But when I run this generated code on…
Kredge
  • 9
  • 1
  • 1
  • 4
1
vote
1 answer

How to write regular javascript and load online external library in vue.js components?

I'm creating a website with vue.Js (vue.cli) to show some of my work. Actually all the interactions and experiments are made in a iframe, because I don't understand how to load and use external javascript For example in one of my components I would…
1
vote
1 answer

How to release resources used by GSettings?

I'm trying to write application in C which manipulates GSettings. Unfortunately I have encountered some kind of memory leaks so I tried to track them down. I'm not sure whether this is library bug or am I missing something. This is the smallest…
abc
  • 2,371
  • 3
  • 25
  • 36
1
vote
2 answers

How do I set an emblem with GTK/GIO?

I'm trying to set an emblem using gio #include #include #include #include #include int main (int argc, char *argv[]) { GFile *gfile = NULL; g_type_init(); gfile =…
molok
  • 1,491
  • 1
  • 14
  • 19
1
vote
1 answer

bluez adapter api StartDiscovery timeout

I am trying to write some code, which can scan for nearby bluetooth devices. I think it is a bit complicated to understand, so i am asking for help. To start with I will explain my scenario. I know from the bluez adapter API…
Simon
  • 83
  • 8
1
vote
1 answer

Using GTK/GIO async reads in Python

I'm trying to do asynchronous reads with GTK/GIO in Python, but while the read itself works okay (in that the callback is called only after the wanted number of bytes has been input), I haven't been able to find any way to actually access the…
Aleksi Torhamo
  • 6,452
  • 2
  • 34
  • 44
1
vote
1 answer

GIO library C: DBUS | GIOStream and GIOConnection

Trying to compile following code in C (I'm not very good with it) and getting Address boundary error. It seems like a variable is uninitialized. all: gcc -Wall -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include test.c `pkg-config --cflags dbus-1`…
shegeley
  • 85
  • 2
  • 8
1
vote
1 answer

Glib linking error for g_socket_new

I am trying to learn glib and gObject for a networking project. Here is the command used to compile (after using pkg-config to get output): gcc socket1.c -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lgobject-2.0…
Sunny
  • 9,245
  • 10
  • 49
  • 79
1
vote
1 answer

Handle timeout of GNotifications in Gnome?

My program needs to react to the user not taking any action on a GNotification. More specificially, a piece of data is written to the database only if the user does not press the "undo" button on the notification sent after the data's creation. My…
5-to-9
  • 649
  • 8
  • 16
1
vote
1 answer

How to parse "a(oa{sv})" dbus type?

I am parsing the response to "net.connman.Manager.GetServices" function, which looks like this: which is quite complex structure. What I got so far is…
BЈовић
  • 62,405
  • 41
  • 173
  • 273
1
vote
1 answer

Glib: NULL in DBUS property

I am using gdbus-codegen to generate code for DBUS client. I have GVariant property in third party DBUS server When I call the autogenerated method to get the property value: GVariant* data…
xXx_CodeMonkey_xXx
  • 800
  • 1
  • 7
  • 14