Bug#876885: fvwm: FvwmConsole can't be configured with X resources

2018-03-11 Thread Jaimos Skriletz
On Mon, Oct 9, 2017 at 1:43 PM, Jaimos Skriletz
 wrote:
> On Tue, Sep 26, 2017 at 11:05 PM, Danek Duvall  wrote:
>>> I see this as a bug in the man page to clarify this. Namely the
>>> default is FvwmConsole's resource is that of the terminal
>>> x-terminal-emulator points uses. Also clarify that the example
>>> resources were written for xterm with the -name FvwmConsole flag.
>>
>> I figured that would be the likely outcome.  That'd be okay by me.  But see
>> below.
>>
>> However, it occurred to me that there might be another way to do this.  I
>> discovered the RESOURCE_NAME environment variable, which I'd never used
>> before, but if I put
>>
>> setenv("RESOURCE_NAME", "FvwmConsole", 1);
>>

I tested this out, and it appears to be specific to xterm. I was not
able to get any
terminal except xterm to set the resource using that environment variable. Since
this doesn't seem to be supported for other terminals, I don't see it
being much use
either in Debian or upstream over just using the -name flag. I will
add clarification to
the manpage to use the -name option if supported to set the resource
to FvwmConsole.

jaimos



Bug#876885: fvwm: FvwmConsole can't be configured with X resources

2017-10-09 Thread Jaimos Skriletz
On Tue, Sep 26, 2017 at 11:05 PM, Danek Duvall  wrote:
>> I see this as a bug in the man page to clarify this. Namely the
>> default is FvwmConsole's resource is that of the terminal
>> x-terminal-emulator points uses. Also clarify that the example
>> resources were written for xterm with the -name FvwmConsole flag.
>
> I figured that would be the likely outcome.  That'd be okay by me.  But see
> below.
>
>> > For now, my workaround is to simply run FvwmConsole with the -name
>> > option explictly added to the commandline.
>>
>> I don't see this as a workaround, but how it should be handled in
>> Debian. If you want FvwmConsole's terminal to use a different resource
>> than your default terminal's resource for configuration, that is what
>> the -name feature is for. You can also use it in conjunction with the
>> -terminal option to ensure you are running a terminal that supports
>> it.
>
> I see it as a workaround because it requires explicit configuration where
> none should be necessary.  It seems obvious to me that one would want to
> use a different configuration from one's normal terminal emulator, since
> that's not really what's needed here.

This is a lot of personal opinion. To me I would rather not have a
separate terminal to configure for FvwmConsole by default, but the
option to create a separate config if I wanted. But I can see your way
too, which is more in the essence of the current upstream code.

> However, it occurred to me that there might be another way to do this.  I
> discovered the RESOURCE_NAME environment variable, which I'd never used
> before, but if I put
>
> setenv("RESOURCE_NAME", "FvwmConsole", 1);
>
> right before the execvp() call, it works perfectly, and should be
> completely ignored by non-X11-toolkit programs.  Using the environment
> makes sense here, since the process tree involved here is extremely minimal
> -- only FvwmConsoleC in addition to the terminal emulator, and it doesn't
> care.  In fact, I think this change (along with the one to remove -name)
> might be worth sending upstream.

This might overall be a better way to do it. This way FvwmConsole
won't pass the -name option, which is present in some (but not all)
terminals, to set the resource. To me this wouldn't remove -name
option from FvwmConsole, but only from FvwmConsole's call to the
terminal.

I am open for adapting the Debian patch to use this. I don't know
enough details here to help with the patch. If you would like to
submit a patch that does just this, I will forward it to upstream.

jaimos



Bug#876885: fvwm: FvwmConsole can't be configured with X resources

2017-09-26 Thread Danek Duvall
> I see this as a bug in the man page to clarify this. Namely the
> default is FvwmConsole's resource is that of the terminal
> x-terminal-emulator points uses. Also clarify that the example
> resources were written for xterm with the -name FvwmConsole flag.

I figured that would be the likely outcome.  That'd be okay by me.  But see
below.

> > For now, my workaround is to simply run FvwmConsole with the -name
> > option explictly added to the commandline.
> 
> I don't see this as a workaround, but how it should be handled in
> Debian. If you want FvwmConsole's terminal to use a different resource
> than your default terminal's resource for configuration, that is what
> the -name feature is for. You can also use it in conjunction with the
> -terminal option to ensure you are running a terminal that supports
> it.

I see it as a workaround because it requires explicit configuration where
none should be necessary.  It seems obvious to me that one would want to
use a different configuration from one's normal terminal emulator, since
that's not really what's needed here.  FvwmConsole simply needs some sort
of text widget with history and line editing and the ability to send a
finalized line to a listening program, which is only superficially similar
to a real terminal.  That said, a terminal emulator is easy to repurpose.

However, it occurred to me that there might be another way to do this.  I
discovered the RESOURCE_NAME environment variable, which I'd never used
before, but if I put

setenv("RESOURCE_NAME", "FvwmConsole", 1);

right before the execvp() call, it works perfectly, and should be
completely ignored by non-X11-toolkit programs.  Using the environment
makes sense here, since the process tree involved here is extremely minimal
-- only FvwmConsoleC in addition to the terminal emulator, and it doesn't
care.  In fact, I think this change (along with the one to remove -name)
might be worth sending upstream.

Thanks,
Danek



Bug#876885: fvwm: FvwmConsole can't be configured with X resources

2017-09-26 Thread Jaimos Skriletz
On Tue, Sep 26, 2017 at 11:40 AM, Danek Duvall  wrote:
> In my X resources file, I specify
>
> FvwmConsole*VT100*geometry: 40x4
>
> as suggested in the FvwmConsole(1) manpage, but this doesn't work; the console
> comes up with a different geometry entirely.
>
> I see that this is happening  because of fix-hardcoded-xterm.patch, which is
> there to conform to Debian policy
>
> 
> https://www.debian.org/doc/debian-policy/ch-customized-programs.html#s11.8.3
>
> which implies that the -name option isn't required by x-terminal-emulator, and
> so the patch removes its use.
>
> Unfortunately, that's the way that xterm lets you change the name under which 
> it
> figures out which resources to use.  At least, I don't know of a better way.
> And this has been working for decades under other operating systems.
>
> It's not clear to me what the right answer is, or even a good answer.  It 
> might
> involve tweaking the policy a bit (which also seems to exclude gnome-terminal 
> as
> a possible alternative, since its -t option is supposedly deprecated and may 
> be
> removed).  It may involve rewriting the manpage to at least be correct with 
> the
> way the code actually works on Debian.
>

I see the same thing. The -name option sets the terminal window's
Resource which is used for its configuration via ~/.Xresources. The
default is to not include this option, since the terminal
x-terminal-emulator points at is unknown. I see the issue you
mentioned, which is not all terminal emulators need to support the
-name option, but further different terminal emulators may not all
support the same resources in the ~/.Xresources file, so the resources
used may need tailoring to the terminal emulator being used.

I think it is best to keep it as it is, which is don't include -name
by default so the FvwmConsole's resource defaults to the terminal that
runs it. On my system this is xterm, so when configuring my resources
I just have to configure all my xterms via "xterm*VT100*geometry:
40x4" and it also affects FvwmConsole. The -name option is there if
the user wants to run FvwmConsole as it's own resource.

I see this as a bug in the man page to clarify this. Namely the
default is FvwmConsole's resource is that of the terminal
x-terminal-emulator points uses. Also clarify that the example
resources were written for xterm with the -name FvwmConsole flag.

> For now, my workaround is to simply run FvwmConsole with the -name option
> explictly added to the commandline.
>

I don't see this as a workaround, but how it should be handled in
Debian. If you want FvwmConsole's terminal to use a different resource
than your default terminal's resource for configuration, that is what
the -name feature is for. You can also use it in conjunction with the
-terminal option to ensure you are running a terminal that supports
it.

jaimos



Bug#876885: fvwm: FvwmConsole can't be configured with X resources

2017-09-26 Thread Danek Duvall
Package: fvwm
Version: 1:2.6.7-3
Severity: normal

In my X resources file, I specify

FvwmConsole*VT100*geometry: 40x4

as suggested in the FvwmConsole(1) manpage, but this doesn't work; the console
comes up with a different geometry entirely.

I see that this is happening  because of fix-hardcoded-xterm.patch, which is
there to conform to Debian policy

https://www.debian.org/doc/debian-policy/ch-customized-programs.html#s11.8.3

which implies that the -name option isn't required by x-terminal-emulator, and
so the patch removes its use.

Unfortunately, that's the way that xterm lets you change the name under which it
figures out which resources to use.  At least, I don't know of a better way.
And this has been working for decades under other operating systems.

It's not clear to me what the right answer is, or even a good answer.  It might
involve tweaking the policy a bit (which also seems to exclude gnome-terminal as
a possible alternative, since its -t option is supposedly deprecated and may be
removed).  It may involve rewriting the manpage to at least be correct with the
way the code actually works on Debian.

For now, my workaround is to simply run FvwmConsole with the -name option
explictly added to the commandline.

-- System Information:
Debian Release: 9.1
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)

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

Versions of packages fvwm depends on:
ii  libc6   2.24-11+deb9u1
ii  libcairo2   1.14.8-1
ii  libfontconfig1  2.11.0-6.7+b1
ii  libfreetype62.6.3-3.2
ii  libfribidi0 0.19.7-1+b1
ii  libgdk-pixbuf2.0-0  2.36.5-2+deb9u1
ii  libglib2.0-02.50.3-2
ii  libice6 2:1.0.9-2
ii  libperl4-corelibs-perl  0.003-2
ii  libpng16-16 1.6.28-1
ii  libreadline77.0-3
ii  librplay3   3.3.2-16+b2
ii  librsvg2-2  2.40.16-1+b1
ii  libsm6  2:1.2.2-1+b3
ii  libstroke0  0.5.1-8
ii  libtinfo5   6.0+20161126-1
ii  libx11-62:1.6.4-3
ii  libxcursor1 1:1.1.14-1+b4
ii  libxext62:1.3.3-1+b2
ii  libxft2 2.3.2-1+b2
ii  libxinerama12:1.1.3-1+b3
ii  libxpm4 1:3.5.12-1
ii  libxrender1 1:0.9.10-1
ii  perl5.24.1-3+deb9u2

Versions of packages fvwm recommends:
ii  lxmenu-data  0.1.5-2
ii  python   2.7.13-2
ii  python-xdg   0.25-4

Versions of packages fvwm suggests:
ii  cpp   4:6.3.0-4
pn  libx11-protocol-perl  
ii  m41.4.18-1
pn  perl-tk   
pn  stalonetray   

-- no debconf information