I have a root script to sync my files on a pen-drive. This script is a root one, because I have to stop (at the beginning) and restart (at the end) a mariadb server (I can do this only as root).
I have also to close (before syncing) and re-open (after syncing) copyq.
So far (before switch to 22.04 lts, I have KDE Neon) this code worked:
and
Now the second code doesn't work anymore: the error message is
Nothing to do, adding
to my .bashrc.
To sum up: no way to restart copyq as user in a root script.
Any idea? A bug?
Thank you!
I have also to close (before syncing) and re-open (after syncing) copyq.
So far (before switch to 22.04 lts, I have KDE Neon) this code worked:
Code:
sudo -u myusername env QT_QPA_PLATFORM=xcb copyq exit
Code:
sudo -u myusername env QT_QPA_PLATFORM=xcb copyq &
Code:
QtWarning: env says KDE is running but SNI unavailable -- check KDE_FULL_SESSION and XDG_CURRENT_DESKTOP
Code:
export XDG_CURRENT_DESKTOP=KDE export KDE_FULL_SESSION=true
To sum up: no way to restart copyq as user in a root script.
Any idea? A bug?
Thank you!
Comment