Skip to content
This repository has been archived by the owner on Mar 7, 2022. It is now read-only.

Add support for dual X11/Wayland #10

Open
mikeslattery opened this issue Jun 17, 2021 · 3 comments
Open

Add support for dual X11/Wayland #10

mikeslattery opened this issue Jun 17, 2021 · 3 comments

Comments

@mikeslattery
Copy link

mikeslattery commented Jun 17, 2021

Sometimes I login with XOrg due to screensharing not working with video chat flatpak app. I propose these changes, or at least documentation on how to do this.

  1. Change PREFIX to /usr/local
  2. In wl-clipboard-x11 shell script, check XDG_SESSION_TYPE value. If "x11", forward to the x11 command. Something like:
BASENAME="$(basename "$0")"
if [ "$XDG_SESSION_TYPE" = x11 -a "$0" = /usr/local/bin/$BASENAME -a -x /usr/bin/$BASENAME ]; then
  exec /usr/bin/$BASENAME "$@"
fi

(edit: bindir changed to prefix. Removed man step. Removed my workaround.)

@bugaevc
Copy link
Contributor

bugaevc commented Jun 17, 2021

  1. Change BINDIR to /usr/local/bin
  2. Don't link xsel.1,xclip.1 man files if they already exist as files (not links)

This is covered by setting PREFIX=/usr/local when installing, no?

@mikeslattery
Copy link
Author

mikeslattery commented Jun 17, 2021

  1. Change BINDIR to /usr/local/bin
  2. Don't link xsel.1,xclip.1 man files if they already exist as files (not links)

This is covered by setting PREFIX=/usr/local when installing, no?

Yes, I think that would probably be better.

I edited my OP as per your recommendation.

@mikeslattery
Copy link
Author

mikeslattery commented Jun 17, 2021

Another workaround that doesn't require changes to this project. Untested.

Install

PREFIX=/opt/wlc make install

Create /etc/profile.d/wlc.sh:

# wl-clipboard-x11.  Avoid conflict with x11 xsel/xclip
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then
    prefix=/opt/wlc
    export PATH="$prefix/bin:$PATH"
    export MANPATH="$prefix/share/man:$(manpath -q)"
    unset prefix
fi

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants