Re: ctrl+alt and ssh
Re: ctrl+alt and ssh
- Subject: Re: ctrl+alt and ssh
- From: Jeremy Huddleston <email@hidden>
- Date: Mon, 17 Jan 2011 20:15:35 -0800
I don't have this problem. Note the state in the p-press reflects the control or control-meta keypresses.
Your state similarly shows two modifiers pressed.
On Jan 17, 2011, at 18:18, email@hidden wrote:
> I'm having trouble with two things logged in from OS X to NetBSD via ssh with X11
> forwarding on (oclock works):
>
> Problem 1. Running the HTML editor "bluefish", ctrl-option-p and ctrl-command-p both seem to the application to be just ctrl-p. xev reports:
>
> ...
> KeyPress event, serial 29, synthetic NO, window 0x1200001,
> root 0x67d, subw 0x0, time 2527630765, (184,160), root:(228,222),
> state 0x2004, keycode 43 (keysym 0x70, p), same_screen YES,
> XLookupString gives 1 bytes: (10) "^P"
> XmbLookupString gives 1 bytes: (10) "^P"
> XFilterEvent returns: False
That looks correct. Look at the 'state' Similarly, here's mine (note the state for each):
KeyPress event, serial 26, synthetic NO, window 0xa00001,
root 0x781, subw 0x0, time 2538360868, (1040,689), root:(2960,733),
state 0x0, keycode 67 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 29, synthetic NO, window 0xa00001,
root 0x781, subw 0x0, time 2538361557, (1040,689), root:(2960,733),
state 0x4, keycode 43 (keysym 0x70, p), same_screen YES,
XLookupString gives 1 bytes: (10) ""
XmbLookupString gives 1 bytes: (10) ""
XFilterEvent returns: False
...
KeyPress event, serial 29, synthetic NO, window 0xa00001,
root 0x781, subw 0x0, time 2538363836, (1040,689), root:(2960,733),
state 0x0, keycode 67 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 29, synthetic NO, window 0xa00001,
root 0x781, subw 0x0, time 2538364452, (1040,689), root:(2960,733),
state 0x4, keycode 63 (keysym 0xffe7, Meta_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 29, synthetic NO, window 0xa00001,
root 0x781, subw 0x0, time 2538364876, (1040,689), root:(2960,733),
state 0x14, keycode 43 (keysym 0x70, p), same_screen YES,
XLookupString gives 1 bytes: (10) ""
XmbLookupString gives 1 bytes: (10) ""
XFilterEvent returns: False
...
KeyPress event, serial 26, synthetic NO, window 0xa00001,
root 0x781, subw 0x0, time 2538531961, (898,516), root:(2818,560),
state 0x0, keycode 67 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 29, synthetic NO, window 0xa00001,
root 0x781, subw 0x0, time 2538532465, (898,516), root:(2818,560),
state 0x4, keycode 66 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 29, synthetic NO, window 0xa00001,
root 0x781, subw 0x0, time 2538533193, (898,516), root:(2818,560),
state 0x24, keycode 43 (keysym 0x70, p), same_screen YES,
XLookupString gives 1 bytes: (10) ""
XmbLookupString gives 1 bytes: (10) ""
XFilterEvent returns: False
...
KeyPress event, serial 29, synthetic NO, window 0xa00001,
root 0x781, subw 0x0, time 2538554801, (108,-4), root:(2028,40),
state 0x0, keycode 67 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 29, synthetic NO, window 0xa00001,
root 0x781, subw 0x0, time 2538555281, (108,-4), root:(2028,40),
state 0x4, keycode 69 (keysym 0xff7e, Mode_switch), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 29, synthetic NO, window 0xa00001,
root 0x781, subw 0x0, time 2538556082, (108,-4), root:(2028,40),
state 0x2004, keycode 43 (keysym 0x70, p), same_screen YES,
XLookupString gives 1 bytes: (10) ""
XmbLookupString gives 1 bytes: (10) ""
XFilterEvent returns: False
>
> Along the same lines, when I type option-p and option-f Bluefish (running remotely) displays the integral and Pi signs, just as TextEdit and Terminal do locally.
Right.
> As far as I'm concerned, in a GTK application those keys should invoke the menu; in this case the File and Project menus, respectively.
Then choose option to behave as Alt instead of AltGr/Mode_switch in X11's preferences.
> Both problems occur on my new MacBook Pro running the stock X11 that came with 10.6.5. My old Powerbook had no such touble (although it had others, to be sure).
You probably had a ~/.Xmodmap setup to change the Mode_switch to Alt on your Powerbook.
> Problem 2. And now for soemthing completely different: permissions.
>
> Suppose two people are each logged in from OS X to a NetBSD machine via "ssh -Y". How can one permit the other to open the display?
>
> For user A to write to B's display, my theory is that I should add the cookies from the .Xauthority on B's Mac to A's .Xauthority on the NetBSD machine. Because A's client passes its cookies to B's server to get permission. Is any of that even remotely right, so to speak?
Close.
Mac A/User A ssh -Y's to NetBSD
Mac B/User B ssh's to NetBSD
NetBSD/User A does 'echo $DISPLAY'
NetBSD/User B sets DISPLAY to that value
NetBSD/User A does 'xauth list' to get the key for that DISPLAY
NetBSD/User B does 'xauth add ...' for that key
That *should* work in theory...
> Just so you know I'm not crazy: we want to run xscrabble on two continents. Xscrabble is started by one user who enters the all the players' names and their displays. In a university environment 15 years ago, whence xcrabble comes, everyone could just run "xhost +hostname" and start playing. But we don't want to do that over the wild Internet, and we don't want to learn about Kerberos just to play scrabble.
Wow... I guess that's one way to do it... ;)
>
> Many thanks for your guidance.
>
> --jkl
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> X11-users mailing list (email@hidden)
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden