mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-09 17:26:47 +02:00
Add debug message to when a message is sent to dbus or notification daemon (#728)
* Add debug message when message is sent to notify daemon * Update usage document to detail how to enable non-root systemd usage + notifications
This commit is contained in:
parent
34ed1608e8
commit
387bd53438
|
@ -492,7 +492,7 @@ To see the logs run:
|
|||
journalctl onedrive -f
|
||||
```
|
||||
|
||||
### OneDrive service running as a non-root user via systemd
|
||||
### OneDrive service running as a non-root user via systemd (without notifications or GUI)
|
||||
|
||||
In some cases it is desirable to run the OneDrive client as a service, but not running as the 'root' user. In this case, follow the directions below to configure the service for a non-root user.
|
||||
|
||||
|
@ -505,12 +505,34 @@ onedrive --synchronize --verbose
|
|||
systemctl enable onedrive@<username>.service
|
||||
systemctl start onedrive@<username>.service
|
||||
```
|
||||
|
||||
3. To view the status of the service running for the user, use the following:
|
||||
```text
|
||||
systemctl status onedrive@<username>.service
|
||||
```
|
||||
|
||||
### OneDrive service running as a non-root user via systemd (with notifications enabled) (Arch, Ubuntu, Debian, OpenSuSE, Fedora)
|
||||
|
||||
In some cases you may wish to receive GUI notifications when using the client when logged in as a non-root user. In this case, follow the directions below:
|
||||
|
||||
1. Login via graphical UI as user you wish to enable the service for
|
||||
2. Disable any `onedive@` service files for your username - eg:
|
||||
```text
|
||||
sudo systemctl stop onedrive@alex.service
|
||||
sudo systemctl disable onedrive@alex.service
|
||||
```
|
||||
3. Enable service as per the following:
|
||||
```text
|
||||
systemctl --user enable onedrive
|
||||
systemctl --user start onedrive
|
||||
```
|
||||
|
||||
To see the logs run:
|
||||
```text
|
||||
journalctl --user-unit onedrive -f
|
||||
```
|
||||
|
||||
**Note:** `systemctl --user` is not applicable for Red Hat Enterprise Linux (RHEL) or CentOS Linux platforms
|
||||
|
||||
## Additional Configuration
|
||||
### Using multiple OneDrive accounts
|
||||
You can run multiple instances of the application by specifying a different config directory in order to handle multiple OneDrive accounts. For example, if you have a work and a personal account, you can run the onedrive command using the --confdir parameter. Here is an example:
|
||||
|
|
|
@ -139,6 +139,11 @@ void notify(T...)(T args)
|
|||
auto n = new Notification("OneDrive", result, "IGNORED");
|
||||
try {
|
||||
n.show();
|
||||
// Sent message to notification daemon
|
||||
if (verbose >= 2) {
|
||||
writeln("[DEBUG] Sent notification to notification service. If notification is not displayed, check dbus or notification-daemon for errors");
|
||||
}
|
||||
|
||||
} catch (Throwable e) {
|
||||
vlog("Got exception from showing notification: ", e);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue