Added information on how to run this as a different user.

This commit is contained in:
nathan 2017-09-18 00:26:32 +02:00
parent cf62fd7ed5
commit 884a32dd81
2 changed files with 5 additions and 3 deletions

View File

@ -115,6 +115,8 @@ Notes:
- SWT builds for FreeBSD do not exist. - SWT builds for FreeBSD do not exist.
- Linux/Unix: If you want to run this library as a different user, you will need to launch your application via `sudo su username /bin/sh -c "DBUS_SESSION_BUS_ADDRESS='unix:abstract=/tmp/dbus-cLtEoBPmgC' XDG_CURRENT_DESKTOP=$XDG_CURRENT_DESKTOP program-name"`, where `unix:abstract=/tmp/dbus-cLtEoBPmgC` from `/run/user/{uid}/dbus-session`. You will also want to disable the root check + warnings via `SystemTray.ENABLE_ROOT_CHECK=false;` See [issue](https://github.com/dorkbox/SystemTray/issues/63) for more details.
   
   
@ -230,7 +232,6 @@ Note: We have fixed the Swing notification tray on Linux (it no longer has a gre
to facilitate this, a screen-shot is grabbed where the icon is. Because this must happen after the to facilitate this, a screen-shot is grabbed where the icon is. Because this must happen after the
icon is placed, *sometimes* you can see this happen. Unfortunately this is the only way to fix icon is placed, *sometimes* you can see this happen. Unfortunately this is the only way to fix
this problem, and there are no other known workarounds outside of writing an X11 wrapper from scratch. this problem, and there are no other known workarounds outside of writing an X11 wrapper from scratch.
```` ````
   
   

View File

@ -757,11 +757,12 @@ class SystemTray {
trayType = selectTypeQuietly(TrayType.Swing); trayType = selectTypeQuietly(TrayType.Swing);
logger.warn("Attempting to load the SystemTray as the 'root/sudo' user. This will likely not work because of dbus " + logger.warn("Attempting to load the SystemTray as the 'root/sudo' user. This will likely not work because of dbus " +
"restrictions. Using the Swing Tray type instead."); "restrictions. Using the Swing Tray type instead. Please refer to the readme notes or issue #63 on " +
"how to work around this.");
} else { } else {
logger.error("Attempting to load the SystemTray as the 'root/sudo' user. This will likely NOT WORK because of dbus " + logger.error("Attempting to load the SystemTray as the 'root/sudo' user. This will likely NOT WORK because of dbus " +
"restrictions."); "restrictions. Please refer to the readme notes or issue #63 on how to work around this.");
} }
} }
} }