Closed timsofteng closed 4 years ago
Hi!
What, exactly, do you mean by "to superuser" / "into root"? Do you just run wl-clipboard as root (e.g. sudo wl-paste
), or do you run a separate session as root, or what?
Do other Wayland clients work when run that way?
Hi!
What, exactly, do you mean by "to superuser" / "into root"? Do you just run wl-clipboard as root (e.g.
sudo wl-paste
), or do you run a separate session as root, or what?Do other Wayland clients work when run that way?
I'll try to explain. I'm using neovim. And when I try to edit some system file with sudo nvim /path_to_file.file
I can't use clipboard from non-root user.
This is probably because sudo
messes with the environment, so you end up with XDG_RUNTIME_DIR
unset. It should fail like this:
$ sudo wl-paste
error: XDG_RUNTIME_DIR not set in the environment.
Failed to connect to a Wayland server
Try using sudo -E
to keep the environment.
I assume that worked :slightly_smiling_face:
Having this problem, I don't use 'sudo' but 'su' , any solution when using that one ?
Maybe su --preserve-environment
?
Did try that, but I'm getting this :
su: ignoring --preserve-environment, it's mutually exclusive with --login
I couldn't overcome that one.
Hello. When I copy something under ordinary user and then trying to paste it into root wl-clipboard is empty. Is it any solution to fix this behavior?