-
Notifications
You must be signed in to change notification settings - Fork 39
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
hw_X11 and hw_xft don't work as expected in some cases #79
Comments
I agree that It may help considering that This means the environment where you execute Trying to fix Again, the solution is to use If you prefer an analogy, you can consider |
That behavior is expected.
I just mentioned passing OK. Challenge accepted! I'll give it a whirl. I think it will work well. |
One very simple and very effective thing you (or I) can do is to modify If it receives a command line argument Doing so will instruct twin server to open an X11 window on the As you pointed out, it's a more intuitive behavior than using twin server's environment variable |
Already done. Seems to work well. ;-) Needs more testing. |
Good :) |
Another things to consider while rejecting this idea. ;-)
The point is that $DISPLAY is highly volatile. There really is no point in hanging on to it. Might even be a good idea to expunge it from TWIN's environment... But somebody may have a use for it... starting X apps from TWIN? It will work in limited scenarios where there is one and only one user and the X server is always running and logged in as that one user. At least logged in when the user wants to start something X from TWIN. |
Exactly. Keeping the original value of After the patch we are currently discussing is merged, twin server's environment variable And anyway, if the user logged in changes, X11 server's And if someone uses |
Exactly.... and since we have a solution we can both agree on: enough said! :-D I'll be building packages shortly and then distribute it to my GUI systems. I'll re-run my In general its against my religion to do anything M$. So I'll just submit the patch here. Its pretty small... |
Well its working for me. Here's what I did:
|
…explicit option @<XDISPLAY> use as default X11 display the value of twattach's environment variable $DISPLAY (if set), instead of twin server's environment variable $DISPLAY, because the latter choice is not intuitive
You approach is correct, but once again I ended up modifying your patch - see commit 8f4b7d1 As a side note, using |
A shame. My solution was KISS++ and DRY++. It took care of all of the situations you mentioned in your email and the future potential or hacker shenanigans of hw driver names starting with the same prefix. FYI: I did test all three driver names, with and without @ and with and without arguments. Some 12 test cases. Which used two different X servers on the same machine and were repeated with TWIN sessions started in and out of an X environment. Very tedious. But at least others get the fix too. |
The primary situation occurs when a TWIN session is launched without
$DISPLAY
being set and then you try totwattach
from an X server on that same machine. So here's a common (for me) case:twattach...
.A second similar scenario where
$DISPLAY
causes unexpected things:twattach --hw=X...
. Huh?!?! nothing happened.And that scenario can be reversed. You have to
twdisplay
to attach it to a different X session (Xorg|VNC) on the same machine. This seems a waste and was certainly unexpected.The issue seems to stem from how $DISPLAY is set (or not) when the initial TWIN session is started. This creates surprising situations for unsuspecting users. At least if they access their machine(s) in as many different ways as I do. ;-)
It would seem like this could work much better if
twattach
passed the current$DISPLAY
from the environment in which it was launched. I see two potential issues:No. 2 seems the norm for anyone taking advantage of remote X (ie ssh -X). Making sure
$DISPLAY
is accurate for your remote scenario is the norm. And taking care ofxhost
to allow it if needed is also expected. I can see no.1 limiting TWIN to one X session at a time. IMO that's acceptable.The current behavior is quite unexpected for the initiate to TWIN land. So I consider this a bug.
The text was updated successfully, but these errors were encountered: