#include #include int main(void) { XfceRc *rc; gchar *sessionName; char *path = "~/.config/xfce4-session/xfce4-session.rc"; rc = xfce_rc_simple_open(path, 0); if (rc == NULL) { printf("Cannot find '%s'\n", path); return 1; } sessionName = xfce_rc_read_entry(rc, sessionName, "Default"); xfce_rc_close(rc); printf("Using session name '%s'\n", sessionName); return 0; }