Copy text / xclip replacement

Questions about the experimental Wayland support on Linux Mint Cinnamon
Forum rules
Include your system information for help with troubleshooting. Report reproducible issues related to Wayland, whether for Cinnamon, an XApp, a Mint tool or any Linux Mint maintained software on the dedicated issue tracker. Topics in this forum are automatically closed after 6 months.
Post Reply
duracell80
Level 3
Level 3
Posts: 113
Joined: Fri Sep 23, 2022 5:51 pm

Copy text / xclip replacement

Post by duracell80 »

Hey guys,

I'm interested in helping out with Wayland testing and just came across a thought about xclip. What's the current state of clipboard support for the Wayland session in terminal?

If I use a package available "wl-clipboard" in terminal then Cinnamon crashes on wl-copy:
https://manpages.ubuntu.com/manpages/ki ... ste.1.html

Code: Select all

wl-copy "hello world"
Bug report: https://github.com/linuxmint/wayland/issues/71

Here is the basis of a nemo action that I'm working on to "copy the filename to the clipboard" in the right click menu, this could be useful for pasting a file or path to the command line from nemo. X11 works with xclip and I try to look for wclip in the packages and come up with nothing.

Code: Select all

FILE_NAME=$(basename $1)
DISP_TYPE=$(loginctl show-session `loginctl|grep $(whoami)|awk '{print $1}'` -p Type | cut -d "=" -f2)

if [[ $DISP_TYPE == "x11" ]]; then
    echo "${FILE_NAME}" | xclip -selection c
else
    echo "Wayland support coming"
    # elif [[ $DISP_TYPE == "wayland" ]]; then    
    #wl-clipboard
fi
Contenders so far:
- https://github.com/bugaevc/wl-clipboard
- https://gitlab.com/j64wang/wclip

Code: Select all

$ sudo apt install wclip
> E: Unable to locate package wclip
Would I compile wclip and give that a shot?

System Info:

Code: Select all

System:
  Kernel: 6.5.0-18-generic x86_64 bits: 64 compiler: N/A Desktop: Cinnamon 6.0.4 tk: GTK 3.24.33
    wm: muffin vt: 8 dm: LightDM 1.30.0 Distro: Linux Mint 21.3 Virginia base: Ubuntu 22.04 jammy
Machine:
  Type: Desktop System: HP product: HP EliteDesk 800 G4 DM 35W v: SBKPF
    serial: <superuser required> Chassis: type: 6 serial: <superuser required>
  Mobo: HP model: 83E2 v: KBC Version 07.D2.00 serial: <superuser required> UEFI: HP
    v: Q21 Ver. 02.25.00 date: 09/28/2023
Battery:
  Device-1: hidpp_battery_0 model: Logitech MX Keys Wireless Keyboard serial: <filter>
    charge: 55% (should be ignored) rechargeable: yes status: Discharging
  Device-2: hidpp_battery_1 model: Logitech M720 Triathlon Multi-Device Mouse serial: <filter>
    charge: 55% (should be ignored) rechargeable: yes status: Discharging
CPU:
  Info: 6-core model: Intel Core i5-8500T bits: 64 type: MCP smt: <unsupported> arch: Coffee Lake
    rev: A cache: L1: 384 KiB L2: 1.5 MiB L3: 9 MiB
  Speed (MHz): avg: 800 min/max: 800/3500 cores: 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800
    bogomips: 25199
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel CoffeeLake-S GT2 [UHD Graphics 630] vendor: Hewlett-Packard CometLake-S
    driver: i915 v: kernel ports: active: DP-3,HDMI-A-1 empty: DP-1, DP-2, HDMI-A-2, HDMI-A-3
    bus-ID: 00:02.0 chip-ID: 8086:3e92 class-ID: 0300
  Display: wayland server: X.org v: 1.21.1.4 with: Xwayland v: 22.1.1 driver: X:
    loaded: modesetting unloaded: fbdev,vesa gpu: i915 display-ID: 0
  Monitor-1: DP-3 model: HP 27w serial: <filter> res: 1920x1080 dpi: 82
    size: 598x336mm (23.5x13.2") diag: 686mm (27") modes: max: 1920x1080 min: 720x400
  Monitor-2: HDMI-A-1 model: Acer R240HY serial: <filter> res: 1920x1080 dpi: 93
    size: 527x296mm (20.7x11.7") diag: 604mm (23.8") modes: max: 1920x1080 min: 720x400
  OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2) v: 4.6 Mesa 23.0.4-0ubuntu1~22.04.1
    direct render: Yes
Audio:
  Device-1: Intel Cannon Lake PCH cAVS vendor: Hewlett-Packard driver: snd_hda_intel v: kernel
    bus-ID: 00:1f.3 chip-ID: 8086:a348 class-ID: 0403
  Device-2: C-Media Audio Adapter (Unitek Y-247A) type: USB
    driver: cmedia_hs100b,snd-usb-audio,usbhid bus-ID: 1-1:2 chip-ID: 0d8c:0014 class-ID: 0300
  Sound Server-1: ALSA v: k6.5.0-18-generic running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
  Device-1: Intel Cannon Lake PCH CNVi WiFi driver: iwlwifi v: kernel bus-ID: 00:14.3
    chip-ID: 8086:a370 class-ID: 0280
  IF: wlp0s20f3 state: down mac: <filter>
  Device-2: Intel Ethernet I219-LM vendor: Hewlett-Packard driver: e1000e v: kernel port: N/A
    bus-ID: 00:1f.6 chip-ID: 8086:15bb class-ID: 0200
  IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IF-ID-1: lxcbr0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB driver: btusb v: 0.8
    bus-ID: 1-14:4 chip-ID: 8087:0aaa class-ID: e001
  Report: hciconfig ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 3.0 lmp-v: 5.1
    sub-v: 100 hci-v: 5.1 rev: 100
Drives:
  Local Storage: total: 931.52 GiB used: 404.2 GiB (43.4%)
  ID-1: /dev/nvme0n1 vendor: Crucial model: CT500P3SSD8 size: 465.76 GiB speed: 31.6 Gb/s
    lanes: 4 type: SSD serial: <filter> rev: P9CR30A temp: 36.9 C scheme: GPT
  ID-2: /dev/nvme1n1 vendor: Crucial model: CT500P3SSD8 size: 465.76 GiB speed: 31.6 Gb/s
    lanes: 4 type: SSD serial: <filter> rev: P9CR30A temp: 34.9 C scheme: GPT
Partition:
  ID-1: / size: 454.29 GiB used: 201.5 GiB (44.4%) fs: ext4 dev: /dev/dm-1 mapped: vgmint-root
  ID-2: /boot size: 1.61 GiB used: 1.16 GiB (72.1%) fs: ext4 dev: /dev/nvme0n1p2
  ID-3: /boot/efi size: 511 MiB used: 49.7 MiB (9.7%) fs: vfat dev: /dev/nvme0n1p1
Swap:
  ID-1: swap-1 type: partition size: 980 MiB used: 512 KiB (0.1%) priority: -2 dev: /dev/dm-2
    mapped: vgmint-swap_1
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 16 rev: 2.0 speed: 480 Mb/s
    chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 1-1:2 info: C-Media Audio Adapter (Unitek Y-247A) type: Audio,HID
    driver: cmedia_hs100b,snd-usb-audio,usbhid interfaces: 4 rev: 1.1 speed: 12 Mb/s power: 100mA
    chip-ID: 0d8c:0014 class-ID: 0300
  Device-2: 1-2:3 info: Logitech Unifying Receiver type: Keyboard,Mouse,HID
    driver: logitech-djreceiver,usbhid interfaces: 3 rev: 2.0 speed: 12 Mb/s power: 98mA
    chip-ID: 046d:c52b class-ID: 0300
  Device-3: 1-14:4 info: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: Bluetooth
    driver: btusb interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA chip-ID: 8087:0aaa
    class-ID: e001
  Hub-2: 2-0:1 info: Super-speed hub ports: 10 rev: 3.1 speed: 10 Gb/s chip-ID: 1d6b:0003
    class-ID: 0900
Sensors:
  System Temperatures: cpu: 30.0 C pch: 38.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Repos:
  Packages: 2570 apt: 2537 flatpak: 22 snap: 11
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/deadsnakes-ppa-jammy.list
    1: deb [signed-by=/etc/apt/keyrings/deadsnakes-ppa-jammy.gpg] https: //ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy main
  Active apt repos in: /etc/apt/sources.list.d/expressvpn.list
    1: deb [signed-by=/usr/share/keyrings/expressvpn.asc] mirror+file: /usr/lib/expressvpn/repo_mirror.list any-version main
  Active apt repos in: /etc/apt/sources.list.d/nala-sources.list
    1: deb https: //mirror.vcu.edu/pub/gnu+linux/ubuntu/ jammy main restricted universe multiverse
    2: deb http: //www.gtlib.gatech.edu/pub/ubuntu/ jammy main restricted universe multiverse
    3: deb http: //babylon.cs.uh.edu/mirror-sites/ubuntu/ jammy main restricted universe multiverse
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
    1: deb https: //mirror.rackspace.com/linuxmint/packages virginia main upstream import backport
    2: deb http: //archive.ubuntu.com/ubuntu jammy main restricted universe multiverse
    3: deb http: //archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse
    4: deb http: //archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
    5: deb http: //security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
  Active apt repos in: /etc/apt/sources.list.d/spotify.list
    1: deb http: //repository.spotify.com stable non-free
Info:
  Processes: 282 Uptime: 5d 1h 11m wakeups: 263 Memory: 15.39 GiB used: 4.44 GiB (28.9%)
  Init: systemd v: 249 runlevel: 5 Compilers: gcc: 11.4.0 alt: 11/12 Client: Cinnamon v: 6.0.4
  inxi: 3.3.13
User avatar
LPH_[retired]
Level 2
Level 2
Posts: 85
Joined: Wed Dec 16, 2020 12:06 pm
Location: 3rd Rock
Contact:

Re: Copy text / xclip replacement

Post by LPH_[retired] »

You may be aware...

When you right click a file in Nemo and copy it, then pasting context determines what is pasted. If you paste in Nemo it'll paste the file itself. If you paste to the command line, the fully qualified filespec (path and file name) are pasted.

Regards
Alcohol is gods apology for making us self aware.
James May
duracell80
Level 3
Level 3
Posts: 113
Joined: Fri Sep 23, 2022 5:51 pm

Re: Copy text / xclip replacement

Post by duracell80 »

I didn't, that's pretty cool.
Post Reply

Return to “Cinnamon on Wayland”