You are not logged in.
Pages: 1
Hello,
I use this code inside my file called `test_vm`:
#!/bin/bash
# Turn on presentation mode (disable sleeping)
inhibit_cookie=$(qdbus org.freedesktop.PowerManagement.Inhibit /org/freedesktop/PowerManagement/Inhibit org.freedesktop.PowerManagement.Inhibit.Inhibit "VM" "because") and I start it using sudo like: `sudo ./test_vm`
then I get error:
[tomsk@tomsk-PC ~]$ sudo ./test_vm
Could not connect to D-Bus server: org.freedesktop.DBus.Error.NotSupported: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS insteadWhen I run that command using command line it works, but I need to start it using file and using sudo, because I use that in my other script which is starting by sudo.
I use several linux distros like: Archlinux, Ubuntu, Fedora, Linux Mint
Offline
If you invoke other script without using sudo and instead have it call sudo internally for the operations that need it?
Offline
Pages: 1