-
Notifications
You must be signed in to change notification settings - Fork 14
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
reuse $DISPLAY variable #8
Comments
as a workaround, I wrote in my
|
Thank you for your feedback! Maybe an option to check existing What happens if you just run your |
One idea: runx could run a check with The port number to access X is 6000+displaynumber. In your example it would be 6123.
If it succeeds, you should see a line |
No, it doesn't work the way I expect. When I run a new terminal, it doesn't inherit variables from other one, so I have
It doesn't work too. Author of VcXsrv didn't expected that anyone will run two copies of it with same port. So, it shows a window with a fatal error message.
Yes, it works as you describe:
On MSYS2 I understand your explanation, thanks. I think would be better to close this issue without changes in |
I am working at a solution. Could you test this runx script stored at pastebin? https://pastebin.com/5FjmDqqp The idea is: If you run runx with So, if you have a line in your
Once you open a terminal, this should run an X server in background and set |
Thanks, it works as you describe. |
Good news!
Good point, it's done.
Oh, ok. So Let's try some hopefully faster alternatives to the current A bash internal TCP access feature:
Another attempt using netcat:
Another telnet attempt:
perl:
nmap:
If one of them is reasonable fast, I would replace the current |
Sorry, it is a my mistake. So, on MSYS telnet works fast when socket already open (only 35 millisec). Maybe I tried to connect to closed socket (in this case telnet hangs for 2 seconds). But issue with a slow running is still here.
I have not a much experience with bash, could you explain how to benchmark it ? |
Thank you for the tests! I have replaced
There is no ready solution for bash benchmark tests.
Instead of sourcing at each startup you could still use an alias. |
Unfortunately, it doesn't helps. I cannot see any significant gaps between messages, but whole run time is still 1.7 .. 2.0 seconds Looks like MSYS bash just compiled without speed optimizations (but with simple scripts it runs fine). |
@mviereck Martin, by the way, issue with message to stderr appeared again:
|
That's odd. It seems I cannot supress the error message:
Edit:
|
To re-use an already running X server, it is enough to source the file with So if you need an X server, just run
To use the X server in another terminal, run:
The line You would not need to (but still can) specify IP or display number in the |
Hello Martin!
Could you enhance your script to get IP / display number from DISPLAY variable ?
How do I want to use it:
I need only one X-Server on my machine (I think it is most popular option)
set
$DISPLAY=127.0.0.1:bla-bla
always on startup inbashrc
start X-Server manually, when I need it
run clients from several terminals
The text was updated successfully, but these errors were encountered: