GithubHelp home page GithubHelp logo

Comments (10)

kaushalruparel avatar kaushalruparel commented on August 14, 2024

This only happens if copy-paste is done from terminator itself. Copy from terminator and pasting elsewhere and copy from elsewhere and pasting in terminator is working fine.

from jessies.

martindorey avatar martindorey commented on August 14, 2024

12 days without any response, sorry, that's unusually poor.

A quick Google query reinforces my suspicion, from "el8", that "OL8" is Oracle's warmed-over RHEL 8, so mainstream, reasonably current Linux. Java 8 but a new build thereof. I failed to reproduce the problem on a new build of Terminator with Java 8u252-b09-1~deb9u1 on Debian Buster. Debian offers a packaging of 8u312 but it wants to upgrade libc6 to Debian Bullseye and I'm not currently willing to let it do that. OK, https://adoptium.net/download gives me an 8u322 that runs out of the box on Debian Buster, giving me:

mad@shuttle:~$ PATH=$(pwd)/jdk8u322-b06-jre/bin:$PATH DEBUGGING_TERMINATOR=y ~/jessies/work/terminator/bin/terminator
2022-04-10T17:52:38.724-0700 Terminator: Java 1.8.0_322 (VM 25.322-b06, runtime 1.8.0_322-b06)
2022-04-10T17:52:38.724-0700 Terminator: Linux 5.10.0-9-amd64/amd64 x8
2022-04-10T17:52:38.724-0700 Terminator: Package 29.44.7468
2022-04-10T17:52:38.724-0700 Terminator: Revision 7468 (7468)
2022-04-10T17:52:38.724-0700 Terminator: Built 2022-04-10T17:52:18-07:00

Middle button paste from Terminator into the same terminal or a different one worked just fine.

Sounds a bit like https://bugs.openjdk.java.net/browse/JDK-7201163 (10 second hang in clipboard API on Linux under certain circumstances), though the "Owner timed out" symptom isn't mentioned and that seems likely important. Shame the original attachment isn't there.

from jessies.

kaushalruparel avatar kaushalruparel commented on August 14, 2024

This one also is very similar : https://bugs.openjdk.java.net/browse/JDK-6340263
Not sure whether there is any w/a though. This issue is stopping me to use terminator as my default terminal for my OL8 instance. BTW if it helps in anyway, I am doing all of this over VNC

from jessies.

kaushalruparel avatar kaushalruparel commented on August 14, 2024

I did some more test after posting the comment above.

  1. The hang occurs only when following sequence is followed. Also only when copy & paste are both from & to terminator
    Select a piece of text -> press terminator paste shortcut (Alt + V).
  2. Does not happen in below cases (ie. everything is smooth and buttery :) )
    Select a piece of text -> press terminator copy shortcut (Alt + C) -> press terminator paste shortcut (Alt + V)
    Select a piece of text -> press global paste shortcut (Shift + Ins)

from jessies.

martindorey avatar martindorey commented on August 14, 2024

Select a piece of text -> press terminator paste shortcut (Alt + V).

That's pasting whatever was in the clipboard, not what was selected in Terminator. Point 2 says that whatever was in the clipboard wasn't put there by Terminator, because that works, so what, I wonder, is supplying the clipboard in the problem case, 1?

from jessies.

kaushalruparel avatar kaushalruparel commented on August 14, 2024

Some clarification:
Select a piece of text from terminator and pasting anywhere else (say in vim with Shift + Ins) puts what was selected in terminator into it. So selection in terminator is copying stuff to clipboard. The same thing stands for windows terminator with cygwin. For eg: Command not found <<< This is pasted here from terminator by just selecting the text over VNC.

Regarding supplying clipboard for point 1, I do not know how to do that. If there is any command for getting that, I would be glad to provide that.
Thanks

from jessies.

martindorey avatar martindorey commented on August 14, 2024

So selection in terminator is copying stuff to clipboard

I'm afraid it's not quite that simple. X11 has two commonly used things that behave similarly to eg Windows's clipboard. The four lines from https://github.com/astrand/xclip/blob/master/README#L100 explain. When you select text in Terminator, it becomes available as XA_PRIMARY. It's only if you do Alt + C that we change XA_CLIPBOARD.

Hmm, your mentions of VNC. I bet that's going to be relevant somehow, because it's going to be trying to synchronize the clipboard or the selection or both with your client. I wonder what the VNC server and client programs are. When I've looked into such problems before, yon xclip program has been useful, in particular this sort of invocation:

mad@shuttle:~/jessies/work$ xclip -o -target TARGETS -selection CLIPBOARD
UTF8_STRING
TEXT
STRING
text/plain;charset=UTF-16
text/plain;charset=UTF-8
text/plain;charset=UTF-16BE
text/plain;charset=UTF-16LE
text/plain;charset=ISO-8859-1
text/plain;charset=US-ASCII
text/plain
text/plain;charset=unicode
mad@shuttle:~/jessies/work$ xclip -o -target TARGETS -selection PRIMARY
TIMESTAMP
TARGETS
SAVE_TARGETS
MULTIPLE
STRING
UTF8_STRING
TEXT
text/plain
text/plain;charset=utf-8
mad@shuttle:~/jessies/work$ 

The clipboard there was set by Terminator, where the selection was set by Chrome. I didn't have any remote desktop involved. I wonder what program had set the clipboard in scenario 1.

from jessies.

kaushalruparel avatar kaushalruparel commented on August 14, 2024

Sorry for late followup. Here is the output from xclip:

Output after I select some text in terminator (Case 1)

bash-4.4$ xclip -o -target TARGETS -selection PRIMARY
UTF8_STRING
TEXT
STRING
text/plain;charset=UTF-16
text/plain;charset=UTF-8
text/plain;charset=UTF-16BE
text/plain;charset=UTF-16LE
text/plain;charset=ISO-8859-1
text/plain;charset=US-ASCII
text/plain

bash-4.4$ xclip -o -target TARGETS -selection CLIPBOARD
TARGETS
TIMESTAMP
STRING
TEXT
UTF8_STRING

Below is after I press Alt + C (Case 2)

bash-4.4$ xclip -o -target TARGETS -selection PRIMARY
UTF8_STRING
TEXT
STRING
text/plain;charset=UTF-16
text/plain;charset=UTF-8
text/plain;charset=UTF-16BE
text/plain;charset=UTF-16LE
text/plain;charset=ISO-8859-1
text/plain;charset=US-ASCII
text/plain
bash-4.4$ xclip -o -target TARGETS -selection CLIPBOARD
UTF8_STRING
TEXT
STRING
text/plain;charset=UTF-16
text/plain;charset=UTF-8
text/plain;charset=UTF-16BE
text/plain;charset=UTF-16LE
text/plain;charset=ISO-8859-1
text/plain;charset=US-ASCII
text/plain
text/plain;charset=unicode

from jessies.

martindorey avatar martindorey commented on August 14, 2024

That shows that the clipboard - the thing that Terminator will paste with Alt + V - doesn’t look like it was set by Terminator if you don’t do Alt + C, just as I’d expect. So what did own it and why wouldn’t it give its content to Terminator without timing out? Will it give its content, say its UTF8_STRING, to xclip? https://www.uninformativ.de/blog/postings/2017-04-02/0/POSTING-en.html has some code for working out which window opens the clipboard.

from jessies.

kaushalruparel avatar kaushalruparel commented on August 14, 2024

When I select something in terminator and then do xowners (small C program from https://www.uninformativ.de/blog/postings/2017-04-02/0/POSTING-en.html) I get below

bash-4.4$ ./xowners

Owner of 'PRIMARY': 0x240000F
Owner of 'SECONDARY': 0x0
Owner of 'CLIPBOARD': 0x52F
Owner of 'FOOBAR': 0x0

bash-4.4$ xwininfo -id 0x52F

xwininfo: Window id: 0x52f (has no name)

  Absolute upper-left X:  0
  Absolute upper-left Y:  0
  Relative upper-left X:  0
  Relative upper-left Y:  0
  Width: 100
  Height: 100
  Depth: 0
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOnly
  Colormap: 0x0 (not installed)
  Bit Gravity State: ForgetGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsUnMapped
  Override Redirect State: no
  Corners:  +0+0  -1180+0  -1180-557  +0-557
  -geometry 100x100+0+0

bash-4.4$ xwininfo -id 0x240000F

xwininfo: Window id: 0x240000f "Terminator"

  Absolute upper-left X:  1
  Absolute upper-left Y:  1
  Relative upper-left X:  1
  Relative upper-left Y:  1
  Width: 1
  Height: 1
  Depth: 0
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOnly
  Colormap: 0x0 (not installed)
  Bit Gravity State: ForgetGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsUnMapped
  Override Redirect State: no
  Corners:  +1+1  -1278+1  -1278-655  +1-655
  -geometry 1x1+1+1

I can send the UTF8_STRING of Primary (Primary is the one which is set on selection) to xclip successfully.

from jessies.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.