Running Conky, from root but by using 'su' to invoke an unprivileged user, produces strange results #1365
Replies: 5 comments
-
I discover - by setting Conky to print errors - that various necessary environmental variables are not being set. Those variables comprise or at least include: |
Beta Was this translation helpful? Give feedback.
-
I have not really solved the problem, but I have a workaround. To wit: no longer the script that I was running privileged as privileged but instead as a normal user. Doing that still allows the script to work - it is just that it prompts several times (once graphically, once in a terminal) for elevation. And now I can (and do) restart Conky as a normal user, and everything works. |
Beta Was this translation helpful? Give feedback.
-
WARNING: If you use conky as su, I'd warn against using online scripts without thoroughly checking them as Lua can execute arbitrary code and mess up your data/installation. Hmm, I think writing a launch script for conky that sets those up like: export XDG_RUNTIME_DIR=/root
export $(dbus-launch)
# ...
conky is better than having to enter your password for everything. But also, check into why your WM isn't setting those up for you. What are you using? |
Beta Was this translation helpful? Give feedback.
-
I aim to investigate the matter soon (when I have time; though I think I may have abandoned the idea at issue). In the meantime: thanks; I'm using Linux Mint Cinnamon (version 21), and do note that the proposal is to use |
Beta Was this translation helpful? Give feedback.
-
Hmm, I was wrong about the |
Beta Was this translation helpful? Give feedback.
-
Hi there.
I have a Bash script, which runs as root (for various reasons) and which then runs a second Bash script as an unprivileged user. The second script runs Conky. (Bear with me!) When I do this, Conky does run, but various (yet further!) helper programs (these ones written in Lua, and called from Conky) fail to print to the screen. When I run Conky normally, those helper programs work fine. Here is how the aforementioned first Bash script runs Conky:
Do I need to add some other option to
su
? I would appreciate any help.Beta Was this translation helpful? Give feedback.
All reactions