Bios-Marcel / cordless

The Discord terminal client you never knew you wanted.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error when trying to copy text from chatview.

eddyizm opened this issue · comments

How have you installed cordless

  • [* ] git clone & go build .

What happened

I wanted to copy a message, eg link to paste into a browser. Needed to install an additional utility. I install the first one suggested which at this point I can' recall. .

Error output

An Error occured. Error copying message: Exit Status 1

How do you reproduce this bug

go to chat view, select a message, press C

System information

| OS | Ubuntu 20.04 (on windows WSL2)
| Architecture | amd64
| Terminal | windows terminal
| Go version | go version go1.13.8 linux/amd64

You probably need to install xclip

looks like that's what I had installed

xclip is already the newest version (0.13-1).

Any ideas on where to look for the issue?

I've already seen this a couple of times. For some people downloading xclip solved the problem, for others it didn't.
What's weird, is that the clipboard lib should've already handled this.
Hm, however, you are on WSL, I am not sure whether xclip even works there, as it'd mean that it'd have to put stuff into the windows clipboard. Can you try copying text in WSL via xclip and paste it in windows?

I'm in cordless (in the new windows terminal > WSL2/Ubuntu tab) going to the chatview and selecting a message. pressing C in o rder to copy a link from the chat. cordless throws the highlighted error and i don't get the text into my cliipboard.
Generally in this terminal, ctrl +C or ctrl +shift+C will copy but that obviously kills cordless when I try that.

Yeah I understand that, but can you copy stuff outside of cordless in WSL via xclip?

Got it, sorry. I am am able to copy and paste from WSL but i am not familiar with xclip so not sure how to test it. looking up the man pages, i try to read a python script in WSL/UBUNTU and get this error:

xclip -i search_text_files.py
Error: Can't open display: (null)

I see, that's probably the problem. So the x in xclip comes from the so called xserver. It's basically the thing that renders all your windows and stuff on a linux system. All xclip does is offer a cli for copy and pasting. So xclip itself doesn't have a clipboard or anything. The problem is, that WSL runs "headless", meaning there's no graphical environment. Maybe you need am x-server first. I know this is possible, as I've already done it. Just look it up. I am not on windows, so i can't help ya on that one.

Or you know ... use cordless in Windows directly ^^

haha, it's a work system so i was trying to be discreet.Thanks for your help. I'l look up xserver.