1 |
On Fr, 21 Apr 00:12:28 +0200 |
2 |
Miroslav Rovis <miro.rovis@××××××××××××××.hr> wrote: |
3 |
>On 170420-05:57+0200, Floyd Anderson wrote: |
4 |
>> On Do, 13 Apr 21:55:29 +0200 |
5 |
>> Miroslav Rovis <miro.rovis@××××××××××××××.hr> wrote: |
6 |
>... |
7 |
>> > |
8 |
>> >But I forgot floyd has got a "patch to keep the window position while |
9 |
>> >resizing the font" and offered it: |
10 |
>> > |
11 |
>> >https://marc.info/?l=gentoo-user&m=149205691530349&w=2 |
12 |
>... |
13 |
>> |
14 |
>> Hi Miroslav, |
15 |
>> |
16 |
>> back from some computer-free holidays, |
17 |
>I hope you had good and restful time! |
18 |
Yes, thanks, it was like that and I had better stay there because after |
19 |
an update yesterday, xorg-server kills my last nerve while I am fighting |
20 |
with a "Segmentation fault at address 0x0" server error. :-( |
21 |
|
22 |
>> The patch is too unimportant to solve some/all of the above issues |
23 |
>> and/or bloating up the urxvt extension script. And additionally, |
24 |
>> rxvt-unicode won’t and doesn’t expose all Xlib functions (such as |
25 |
>> XGetWindowAttributes) in urxvtperl, the embedded perl interpreter. So it |
26 |
>$ man urxvtperl # but how cryptic!, how long study that will be... I don't |
27 |
> have all those hours right now... |
28 |
> I hope I'll find a solution with less time to invest, |
29 |
> else... |
30 |
Yes it needs investigation. That was the reason why I does not realise |
31 |
firstly, that the changes to my local font-size extension script were |
32 |
made by me (as I mentioned in an earlier reply). I could not believe |
33 |
that I spend my time to those cryptic stuff (have not used Git for this |
34 |
in the past, which had simply shown myself as the author). |
35 |
|
36 |
>> My used and tested urxvt-font-size related Xresource settings: |
37 |
>> URxvt.font-size.keepwin: true |
38 |
>> URxvt.font-size.step: 4 |
39 |
>> URxvt.keysym.C-0xffad: font-size:decrease |
40 |
>> URxvt.keysym.C-0xffab: font-size:increase |
41 |
>> URxvt.keysym.C-0xffb0: font-size:reset |
42 |
>> |
43 |
>> Since I use the default keysyms for font-size:{decrease,increase,reset} |
44 |
>> in Vim, I changed those defaults to C-KP_Substract (C-0xffad), C-KP_Add |
45 |
>> (C-0xffab), C-KP_0 (C-0xffb0) like in Firefox and others. |
46 |
>I don't get what these are. Not at this time. And this is my second |
47 |
>reading of your email... |
48 |
> |
49 |
>NOTE (at proofreading): Is that 'C-KP_Substract' should read |
50 |
>'C-KP_Subtract'?, the "-" on the keypad? So 'C-KP_Subtract' means |
51 |
>Ctrl-<minus>?, and C-KP_0 means Ctrl-0? |
52 |
Sorry, I was not quite verbose about this. Yes your are right, the "C" |
53 |
means control key and "KP" stands for keypad. Normally you can use those |
54 |
identifier directly in the keysym definitions but those for keypad keys |
55 |
does not work for me, so I used their hexadecimal keycode equivalents. |
56 |
You can find the keycodes with the command `xev` or by looking in the |
57 |
header file "/usr/include/X11/keysymdef.h" near line 202. |
58 |
|
59 |
>I also compared what I have currently installed: |
60 |
> |
61 |
># eix urxvt-font-size |
62 |
>[I] x11-misc/urxvt-font-size |
63 |
> Available versions: 1.1 **9999 |
64 |
> Installed versions: 1.1(13:07:28 22/02/15) |
65 |
> Homepage: https://github.com/majutsushi/urxvt-font-size/ |
66 |
> Description: Perl extension for rxvt-unicode to change the font size on the fly |
67 |
> |
68 |
># |
69 |
> |
70 |
># qlist urxvt-font-size |
71 |
>/usr/lib64/urxvt/perl/font-size |
72 |
>/usr/share/doc/urxvt-font-size-1.1/README.markdown.bz2 |
73 |
># |
74 |
> |
75 |
>[I compared what I have currently installed] with the 9999 version, which |
76 |
>is the version that, IIUC, I plan to hopefully try and patch with your |
77 |
>patch... |
78 |
Cannot figure out what IIUC is but anyway. Patching will fail with the |
79 |
v1.1-tag commit (two years, four month old). |
80 |
|
81 |
I would recommend not to hassle portage with those tiny installs (at |
82 |
least on a single user machine). Simply tell rxvt-unicode where it can |
83 |
find your additionally extension script(s) by using for instance: |
84 |
URxvt.perl-lib: $HOME/.config/urxvt/ext |
85 |
|
86 |
in your Xresource file for rxvt-unicode. Have a look at urxvt(1) manual |
87 |
for more alternatives. I see only one disadvantage, you have to apply |
88 |
the patch manually but only once if you are using a local Git repo (as |
89 |
you do and mentioned in your reply). |
90 |
|
91 |
>> [2] <https://archives.gentoo.org/gentoo-user/message/a4d58e993934aa4a273998eda030d115> |
92 |
>The link that Savchenko gave in that email is puzzling me: |
93 |
>http://rcr.io/words/dynamic-xterm-colors.html |
94 |
>I want to try and figure out that bash script there... It's very |
95 |
>educational. |
96 |
> |
97 |
>I need more time to study this. […] |
98 |
Not necessary if you rarely use it (in my opinion) but always good to |
99 |
known that it is there when you need it. Becomes probably very handy |
100 |
e.g. for terminal prompt designs, window titling or: |
101 |
- quickly change/test fonts, where <type> is one of {710..713} which |
102 |
stands for regular, bold, italic, bold-italic and <font> something |
103 |
like 9x15, fixed or xft:termminus-12 and so on. |
104 |
$ printf '\e]%s;%s\007' "<type>" "<font>" |
105 |
- query RGB colour values, where <colournumber> is one of {0..255} |
106 |
$ echo -ne "\033]4;<colournumber>;?\007" |
107 |
- window sizing/positioning (e.g. 1144x954+0+0 bound to Ctrl+F11) in |
108 |
urxvt. Did you remember the syntax? :-) |
109 |
URxvt.keysym.C-F11: command:\033[4;1144;954t\033[3;0;0t |
110 |
- ... |
111 |
|
112 |
> […] But I do have a question: |
113 |
> |
114 |
>I read, somewhere, spender (the author of grsecurity) wrote it, but I |
115 |
>don't recall the entire context, and so I can only vaguely paraphrase |
116 |
>what I remember he wrote, that... Aaargh, can't remember well at all... |
117 |
>I think it wasn't about perl only, or perl wasn't even mentioned |
118 |
>explicity, but it was spender saying how running scripts by using stuff |
119 |
>like: |
120 |
> |
121 |
>#!/usr/bin/env [perl|python|...] |
122 |
>( |
123 |
>in the new script it's |
124 |
>#!/usr/bin/env perl |
125 |
>) |
126 |
Yes, with commit 83da253a7946c85d65fbf9c3a983bd6ef51420aa the explicit |
127 |
path declaration for perl was removed. |
128 |
|
129 |
>instead of the more simple, traditional shebang line: |
130 |
> |
131 |
>#!/usr/bin/<interpreter> # perl or python or bash |
132 |
> |
133 |
>( |
134 |
>in the old script it's |
135 |
>#!/usr/bin/perl |
136 |
>) |
137 |
> |
138 |
>that the former (...env <interpreter>) is not as safe as the latter |
139 |
>(...bin/<interpreter>). |
140 |
> |
141 |
>Why was it necessary to introduce that change? I'm referring to Jan's |
142 |
>change, of course. |
143 |
> |
144 |
>It can't be it does not bring a tiny bit more into the attack surface, |
145 |
>can it? |
146 |
I do not think so. It is probably rather a portability related decision. |
147 |
Have a look at a blog post by Michał Górny [1] for some light on this. |
148 |
|
149 |
>And my plan is... Probably bump the ebuild into my custom overlay, as I |
150 |
>don't install online from git (until it becomes possible to verifiably |
151 |
>install packages while online, I mean: for non-experts like me; it is |
152 |
>possible to verifiably install packages with the old webrsync, also |
153 |
>while online...; OTOH app-crypt/gkeys that Savchenko recommended to me |
154 |
>in an email a month or two ago to try and test, those do bring in |
155 |
>more verifiability when installing from git, but I haven't found time to |
156 |
>study gkeys yet...) |
157 |
Same here. I does not knew app-crypt/gkeys previously and it sounds very |
158 |
interesting. It is totally overdue nowadays to have something like that |
159 |
for the rsync protocol. |
160 |
|
161 |
>[And my plan is... Probably bump the ebuild into my custom overlay,] |
162 |
>modify it to get the git source served from my local Apache cgit repo |
163 |
>[1] (and urxvt-font-size package is not even PGP-signed, neither tags |
164 |
>nor commits, which is always an important feature missing with the code, |
165 |
>for me...) |
166 |
Maybe a kindly request upstream for signed tags may change this. |
167 |
|
168 |
>[modify it to get the git source from my local Apache cgit repo], put |
169 |
>your patch in /etc/portage/patches/x11-misc/urxvt-font-size/ check that |
170 |
>my /etc/portage/bashrc is ready to apply user patches (I recently |
171 |
>updated it as per the wiki page, gave the link in another email a couple |
172 |
>of days ago, to this list, yeah, it was in the non-replied-to message to |
173 |
>Ian Zimmermann in a 2 emails --so far-- thread split from this one... |
174 |
>which was about window positions as well!... [2]), and... |
175 |
> |
176 |
>...And emerge it: |
177 |
> |
178 |
># emerge urxvt-font-size |
179 |
> |
180 |
>Courious to read what your opinion is on usage of /env vs plain /bin |
181 |
>scripts security-wise, as I put it further above! And why that change... |
182 |
> |
183 |
>Regards! |
184 |
>--- |
185 |
>[1] I have actually learned when installing gnunet from |
186 |
> youbroketheinternet-overlay just two days ago that I probably can |
187 |
> use local overlay even without seving it with cgit and Apache, |
188 |
> simply from local filesystem! |
189 |
> |
190 |
>[2] openbox window positions |
191 |
> https://lists.gt.net/gentoo/user/325342 |
192 |
> (and my reply to it contains digressions, but also simple |
193 |
> questions...) |
194 |
> |
195 |
Your plan with the Apache cgit repo seems to be a nice challenge to |
196 |
learn something but as I noted above, creating and maintaining an |
197 |
overlay for so tiny things is a little bit overkill in my opinion. |
198 |
Fetching the related Git repository from time to time and you are done |
199 |
while an overlay needs probably more significant work. |
200 |
|
201 |
As an example, I am currently just imagine I have to create overlays for |
202 |
my favourite Vim plugins instead of using well known manager like |
203 |
Vundle, NeoBundle, Dein or what else. That were a lot of work for the |
204 |
overlay solution or did I miss the point? |
205 |
|
206 |
|
207 |
References: |
208 |
[1] <https://blogs.gentoo.org/mgorny/2016/02/08/a-quick-note-on-portable-shebangs/> |
209 |
|
210 |
-- |
211 |
Regards, |
212 |
floyd |