I guess for Gnome 3 this should be relatively easy to implement via org.gnome.SessionManager->Inhibit. For Unity there is surely something in com.canonical.Unity.*. that can be revealed via d-feet.
I guess for Gnome 3 this should be relatively easy to implement via org.gnome. SessionManager- >Inhibit. For Unity there is surely something in com.canonical. Unity.* . that can be revealed via d-feet.