... | ... | @@ -162,7 +162,7 @@ gdbus call --session \ |
|
|
org.gnome.SettingsDaemon.Power.Screen Brightness '<30>'
|
|
|
```
|
|
|
|
|
|
## Lock the Screen
|
|
|
## Locking the Screen
|
|
|
|
|
|
The `org.gnome.ScreenSaver` interface can be used to lock the screen:
|
|
|
```
|
... | ... | @@ -171,6 +171,28 @@ gdbus call --session --dest org.gnome.ScreenSaver --object-path /org/gnome/Scree |
|
|
|
|
|
There isn't a corresponding method for unlocking it.
|
|
|
|
|
|
## Shutting Down the Phone
|
|
|
|
|
|
The `org.gnome.SessionManager` interface can be used to check whether the phone can be shut down:
|
|
|
```
|
|
|
gdbus call --session \
|
|
|
--dest org.gnome.SessionManager \
|
|
|
--object-path /org/gnome/SessionManager \
|
|
|
--method org.gnome.SessionManager.CanShutdown
|
|
|
```
|
|
|
If possible then the following will be returned:
|
|
|
```
|
|
|
(true,)
|
|
|
```
|
|
|
|
|
|
The phone can then be shut down:
|
|
|
```
|
|
|
gdbus call --session \
|
|
|
--dest org.gnome.SessionManager \
|
|
|
--object-path /org/gnome/SessionManager \
|
|
|
--method org.gnome.SessionManager.Shutdown
|
|
|
```
|
|
|
|
|
|
## Using Applications to Provide Services
|
|
|
|
|
|
GNOME applications run using the `--gapplication-service` command line option will expose the [org.freedesktop.Application](https://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#dbus) interface on the session bus. This can be accessed to launch the application and request that it open files specified with URIs. The parameters of the API are explained by [this GApplication D-Bus APIs document](https://wiki.gnome.org/Projects/GLib/GApplication/DBusAPI) which refers to a different interface but which seems to overlap with the freedesktop interface.
|
... | ... | |