Bug#820904: ssh-askpass: cannot control position of ssh-askpass window

2017-09-04 Thread Tony Finch

> On 1 Sep 2017, at 22:18, Philip Hands  wrote:
> 
> Anyway, since I'm now preparing a release, I looked at this, and it
> occurs to me that it might be more useful to be able to specify the
> position on the screen as e.g. a percentage of the width/height.

That would be a satisfactory solution for me, thanks!

Tony.
-- 
f.anthony.n.finchhttp://dotat.at



Bug#820904: ssh-askpass: cannot control position of ssh-askpass window

2017-09-01 Thread Philip Hands
Tony Finch  writes:

> Package: ssh-askpass
> Version: 1:1.2.4.1-9
> Severity: wishlist
> Tags: upstream patch
>
> Dear Philip,
>
> I am using i3-wm with two monitors and Xrandr.
>
> In this setup, ssh-askpass plonks itself over the crack between the screens.
> It doesn't have any facility to control where it places itself.

Sorry for the tardy response -- dealing with ssh-askpass bugs has been
bobbing just below the point where I get round to it on my TODO list for
far too long.

Anyway, since I'm now preparing a release, I looked at this, and it
occurs to me that it might be more useful to be able to specify the
position on the screen as e.g. a percentage of the width/height.

Currently it goes for the middle of the X axis, and one third from the
top on the Y.  We could therefore have resources xPercent and yPercent
that default to 50 and 33 respectively to attain the same effect (bar
rounding) and for your 2 screen setup you could set yPercent to 25, say,
to get it in the middle of one screen.

Would that work for you?

That strikes me as better than using an absolute position, but perhaps
there is something I'm not considering.

Cheers, Phil.
-- 
|)|  Philip Hands  [+44 (0)20 8530 9560]  HANDS.COM Ltd.
|-|  http://www.hands.com/http://ftp.uk.debian.org/
|(|  Hugo-Klemm-Strasse 34,   21075 Hamburg,GERMANY


signature.asc
Description: PGP signature


Bug#820904: ssh-askpass: cannot control position of ssh-askpass window

2016-04-13 Thread Tony Finch
Package: ssh-askpass
Version: 1:1.2.4.1-9
Severity: wishlist
Tags: upstream patch

Dear Philip,

I am using i3-wm with two monitors and Xrandr.

In this setup, ssh-askpass plonks itself over the crack between the screens.
It doesn't have any facility to control where it places itself.

I have tried configuring i3 to place it elsewhere, for example,

for_window [title=".*OpenSSH.*"] move position 400px 400px

This works for other windows (e.g. if I make a floating xterm and 
change the title to OpenSSH), but not for ssh-askpass. It always
appears in the same place whatever I try with i3.

So I thought I would add some X resources to ssh-askpass so I could
control its position. (This is much easier than making it respect
Xrandr.)

Here's a trivial and somewhat half-arsed patch.

--- ssh-askpass-1.2.4.1/x11-ssh-askpass.c   2001-09-17 08:42:50.0 
+0100
+++ ssh-askpass-1.2.4.1-hacked/x11-ssh-askpass.c2016-04-13 
15:02:21.108646156 +0100
@@ -690,9 +690,10 @@
calcButtonLabelPosition(&(d->okButton));
calcButtonLabelPosition(&(d->cancelButton));
 
-   d->w3.w.x = (WidthOfScreen(app->screen) - d->w3.w.width) / 2;
-   d->w3.w.y = (HeightOfScreen(app->screen) - d->w3.w.height) / 3;
-   
+   d->w3.w.x = get_integer_resource("x", "X",
+  (WidthOfScreen(app->screen) - d->w3.w.width) / 2);
+   d->w3.w.y = get_integer_resource("y", "Y",
+  (HeightOfScreen(app->screen) - d->w3.w.height) / 3);
app->dialog = d;
 }


-- System Information:
Debian Release: 8.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages ssh-askpass depends on:
ii  libc6 2.19-18+deb8u4
ii  libice6   2:1.0.9-1+b1
ii  libsm62:1.2.2-1+b1
ii  libx11-6  2:1.6.2-3
ii  libxt61:1.1.4-1+b1

ssh-askpass recommends no packages.

ssh-askpass suggests no packages.

-- no debconf information