Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Linux] Fails to move information to clipboard #9

Open
MrSchism opened this issue Aug 14, 2014 · 14 comments
Open

[Linux] Fails to move information to clipboard #9

MrSchism opened this issue Aug 14, 2014 · 14 comments

Comments

@MrSchism
Copy link

OS: Elementary OS (Luna)

Copy fails to move text to the clipboard.
Cut removes the text from the editor, but does not move it to the clipboard.
Paste seems to work, but only pastes what's taken via Edit > {Cut,Paste} / Ctrl+{X,C}

@jbardnz
Copy link
Owner

jbardnz commented Aug 14, 2014

Hi

I have a laptop running Elementary OS that I can test this on next week.
I'm guessing this is related to the underlying node-copy plugin but I will check it out.

@Romane-T
Copy link

Just tried the download from https://github.com/jbardnz/RightClickExtended (downloads as master.zip). Issue still exists. Copy using ctrl-C works as can past via shift-insert. Cut works. Unable to past via the right click regardless how copy done. This is the only functionality at this stage I need to make Brackets usable for me (lifting head up and down to use keyboard makes me nauseous and dizzy).

Usng Debian Jessie, 64 bit, desktop PC. Will test tomorrow (almost midnight my time now) on a 32 bit machine I have (still Debian Jessie) - an old netbook.

Have looked at the code. Sorry, out of my field. Any tests I can do that will help you at all? (will need instructions, as not familiar with java, only elementary HTML and CSS, but happy to change code according to your instruction)

@jbardnz
Copy link
Owner

jbardnz commented Sep 28, 2014

Hi

So i'm fairly sure this is related to the underlying node-copy plugin.

As far as testing goes, if you could install node and node-copy (https://github.com/xavi-/node-copy-paste/). Could you then check if you are able to paste with this, if so then the issue is with my plugin and I am happy to look at it.

Cheers
Jarrad

@Romane-T
Copy link

Well, that was fun:) Debian packages it as nodejs (name conflict). Installing npm dragged it in as a dependency anyway. Just a note if needed in future, and good for my education.

node-copy-paste wouldn't install, I found out very quickly, as a zip file. No main.js. Followed advice on page and used npm.

No go. Without your plugin, there is no right-click available in Brackets, and node-copy-paste adds nothing into menu's. Manual (keyboard) copy/cut/paste working fine regardless. Cut from right-click works fine. Nothing appears to be going to the clipboard, as even with keyboard, was nothing to paste after a cut. Copy and paste functions non-functional.

Strange. Reviews / reports that works fine in Windows (and Apple?).

Any other ways to your mind I can go about this that may work?

With greetings

Romane

@Romane-T
Copy link

Downloading msi. Will try running it under Wine, see what happens.

Tried running as root (have seen some applications misbehave unless run as root (bugbugbug)). No change to when run as self.

With greetings

Romane

@Romane-T
Copy link

Wine did not recognise .msi, but I remembered a laptop daughter left here about a year or two ago with Windows.

Works perfectly under Windows. Fails on Linux. That would suggest to me that the underlying code is correct in general except for Linux. Missing something, maybe a dependancy or something? Something missing from the Java install? etc. etc.

Looks like I might have to step into my discomfort zone :)

With greetings

Romane

@jbardnz
Copy link
Owner

jbardnz commented Sep 28, 2014

Hello

So I probably should have been a little clearer in my first post.
After installing node-copy-paste via npm can you run the paste command via the command line:

https://github.com/xavi-/node-copy-paste

Installing this via npm won't effect anything in brackets, you won't see any change over their. Maybe just setup a really simple js file which requires require("copy-paste") and then calls paste(). Hopefully that makes sense.

One thing I remembered is that node-copy-paste has an experimental fallback branch:
https://github.com/xavi-/node-copy-paste/tree/experimental-fallbacks/platform

I should be able to find time today to implement this, I will make it an option in brackets to switch this on/off.

@Romane-T
Copy link

Good morning Jarrad

An apology, but am a little confused. Yes, am comfortable with the
command line, but don't understand really what you mean below. Let's
just attribute that to age :) - occasionally, things need to be boringly
spelled out to me :(

That said, I opened a terminal (bash), and tried the right click copy in
Brackets, then went to the terminal and attempted to paste. Nothing.
Again, copy with the keyboard resulted in content to paste to the
terminal. Is this the test you were after?

Am still inclined to think the problem is in Linux (though the
likelihood of being wrong is pretty strong), as everything works in
Windows. My understanding of Java is that it is cross-platform, so what
works on one should work on another. Please correct me if that is the
wrong impression. So, will explore my set-up and let you know if any
particular file makes a change. Though do not understand Java code, this
is something I that can examine easily.

With greetings

Romane

On 29/09/14 07:04, jbardnz wrote:

Hello

So I probably should have been a little clearer in my first post.
After installing node-copy-paste via npm can you run the paste command
via the command line:

https://github.com/xavi-/node-copy-paste

Installing this via npm won't effect anything in brackets, you won't
see any change over their. Maybe just setup a really simple js file
which requires require("copy-paste") and then calls paste(). Hopefully
that makes sense.

One thing I remembered is that node-copy-paste has an experimental
fallback branch:
https://github.com/xavi-/node-copy-paste/tree/experimental-fallbacks/platform

I should be able to find time today to implement this, I will make it
an option in brackets to switch this on/off.


Reply to this email directly or view it on GitHub
#9 (comment).

@jbardnz
Copy link
Owner

jbardnz commented Sep 28, 2014

Hey

So just a note this plugin is written in JavaScript which is different to Java, although still cross-platform.
I would suggest holding off on any more tests until I get a chance to add the experimental fallbacks.

Cheers
Jarrad

@Romane-T
Copy link

Good morning Jarrad

It is something to do with Linux.

xclip was not installed. Once I installed that, everything worked. A
simple note in the appropriate places for Linux users to ensure that
xclip is installed will take care of the problem as I found it.

With excited greetings

Romane

On 29/09/14 07:34, jbardnz wrote:

Hey

So just a note this plugin is written in JavaScript which is different
to Java, although still cross-platform.
I would suggest holding off on any more tests until I get a chance to
add the experimental fallbacks.

Cheers
Jarrad


Reply to this email directly or view it on GitHub
#9 (comment).

@jbardnz
Copy link
Owner

jbardnz commented Sep 29, 2014

Hi Romane

Great find! That should make it easy enough for Linux users.

The experimental fallbacks should actually remove the dependency for xclip so I will continue with this development.

@neo-art
Copy link

neo-art commented Oct 6, 2014

Hi @Romane-T ,

Thank you for the hint. :)
Had the same issue on Manjaro (+Brackets+RightClickExtended), installed xclip and now everything works.

@aktary
Copy link

aktary commented Oct 24, 2014

For the uninitiated here's a bit about xclip: http://www.cyberciti.biz/faq/xclip-linux-insert-files-command-output-intoclipboard/
tl;dr:
on debian/ubuntu: sudo apt-get install xclip
on Red hat / CentOS / RHEL / Fedora: yum install xclip

@MrSchism
Copy link
Author

Oh, xclip... why must you task me so?

I keep finding myself annoyed that xclip (or the functionality thereof) isn't a default in most systems (and that I keep forgetting it). I have a feeling that once wayland gets more stable, xclip will become a thing of the past, though.

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

No branches or pull requests

5 participants