-
Notifications
You must be signed in to change notification settings - Fork 3
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
[PATCH] Allow running clipboard commands if DISPLAY is not set #4133
Comments
|
What about get rid of $DISPLAY usage here at all instead of adding yet another micro-option? |
the concerns are:
|
Replying to andrew_b:
clipboard_file_from_ext_clip() should be reworked in this case.
Running with:
with DISPLAY unset, or just with any failing command:
breaks the mc clipboard.
If this bug is fixed and there are no other hidden reasons for checking DISPLAY, it seems better to throw the check away. |
Replying to devzero:
Correct. Expected that DISPLAY is set appropriately.
Why this is a bug?
Look at the vim. It is also requires the DISPLAY variable: DISPLAY environment variable on Linux systems
Make sure your DISPLAY environment variable is set appropriately - otherwise vim can not connect to your x-session to access the clipboard. |
ehm, i kind of expect mc's clipboard to work on a plain console.
yes - when you explicitly ask for the x11 clipboard. |
mc's clipboard is work with global clipboard (X-clipboard) throuth 'xclip' if DISPLAY is set, and local (editor, fields, command line) throuth mc-clip-file. |
(Deleted. Looks like My tests were incorrect. Sorry.) |
Replying to andrew_b:
Sorry for the misinformation. Looks like something was wrong in my configuration the last night, when I detected the "bug". I double checked it now.
You are right, the check for DISPLAY seems unneeded and the deletion of the check seems to have no visible effect on the application functioning. |
Branch: 4133_clipboard_no_display |
|
|
Important
This issue was migrated from Trac:
devzero
(vadim.ush@….com)Hello!
I ran into a restriction related to the options clipboard_store and clipboard_paste.
I'm currently working on a script that brings a transparent clipboard support to any application that supports executing arbitrary commands on the copy and paste actions in the same way as mc does. It also works for applications running on a virtual terminal and falls back to the file-based clipboard storage if an X server is not running or cannot be detected.
Here is the script:
https://github.com/sde-gui/sde-common-clipboard/blob/master/sde-common-clipboard
I noticed that mc refuses running clipboard_store and clipboard_paste commands if the DISPLAY environment variable is not set. This limitation didn't seem to be explicitly stated in the documentation (especially in the russian manual page -- it lacks any mention of X11 regarding clipboard at all), so I had to check the source code out to make sure that was the case.
My suggestion is to bring a new configuration variable controlling this behavior. The attached patch implements a new option clipboard_force_no_display allowing to override the default behavior.
Note
Original attachments:
devzero
(vadim.ush@….com) onOct 15, 2020 at 17:54 UTC
The text was updated successfully, but these errors were encountered: