Discussion:
terminal with right-click = paste?
(too old to reply)
Lee
2019-04-10 19:50:01 UTC
Permalink
I installed the xfce version of debian 9 & have a terminal icon on the
menu bar that starts xfce4-terminal

Is there some way to configure xfce4-terminal so that a right mouse
click pastes text?
What I have now is right-click brings up a menu where I have to left
click on paste. ick.

How do I find out what other terminal programs are already installed
that I can try?

What terminal programs are available that have a 'right click pastes
text' option _and_ has a scroll bar that is
1. easily visible
2. goes up/down a page at a time when left-clicking above/below the scroll bar
3. has up/down buttons on the scroll bar that scrolls a line at a time
when clicking on the button

Thanks
Lee
Alexander V. Makartsev
2019-04-10 20:00:02 UTC
Permalink
Post by Lee
I installed the xfce version of debian 9 & have a terminal icon on the
menu bar that starts xfce4-terminal
Is there some way to configure xfce4-terminal so that a right mouse
click pastes text?
What I have now is right-click brings up a menu where I have to left
click on paste. ick.
How do I find out what other terminal programs are already installed
that I can try?
What terminal programs are available that have a 'right click pastes
text' option _and_ has a scroll bar that is
1. easily visible
2. goes up/down a page at a time when left-clicking above/below the scroll bar
3. has up/down buttons on the scroll bar that scrolls a line at a time
when clicking on the button
Thanks
Lee
Try keyboard shortcuts instead.
Shift+Ctrl+V - Paste
It's more convenient IMO, you won't move your hands away from keyboard
and simply continue typing after paste.
--
With kindest regards, Alexander.

⢀⣎⠟⠻⢶⣊⠀
⣟⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀⠀⠀⠀
Lee
2019-04-10 20:40:01 UTC
Permalink
Post by Alexander V. Makartsev
Post by Lee
I installed the xfce version of debian 9 & have a terminal icon on the
menu bar that starts xfce4-terminal
Is there some way to configure xfce4-terminal so that a right mouse
click pastes text?
What I have now is right-click brings up a menu where I have to left
click on paste. ick.
How do I find out what other terminal programs are already installed
that I can try?
What terminal programs are available that have a 'right click pastes
text' option _and_ has a scroll bar that is
1. easily visible
2. goes up/down a page at a time when left-clicking above/below the scroll bar
3. has up/down buttons on the scroll bar that scrolls a line at a time
when clicking on the button
Thanks
Lee
Try keyboard shortcuts instead.
Shift+Ctrl+V - Paste
It's more convenient IMO, you won't move your hands away from keyboard
and simply continue typing after paste.
But how do you get something into the paste buffer without using the mouse?

Left double-click to select a "word" & right click to paste is pretty
much automatic for me now - which is why I'm looking for a xfce4
terminal replacement

Thanks anyway tho
Lee
arne
2019-04-11 01:50:01 UTC
Permalink
On Wed, 10 Apr 2019 16:37:15 -0400
Post by Lee
[...]
[...]
But how do you get something into the paste buffer without using the mouse?
Left double-click to select a "word" & right click to paste is pretty
much automatic for me now - which is why I'm looking for a xfce4
terminal replacement
I fell in love with terminator

sudo apt install terminator

double left button click = copy

middle button click = paste
(when no middle button available, I think xorg has the possibility to workaround with left and right
button simultaneous)

right button click = options

on fluxbox it works like a charme
arne
2019-04-11 02:10:02 UTC
Permalink
On Thu, 11 Apr 2019 03:27:44 +0200
Post by arne
On Wed, 10 Apr 2019 16:37:15 -0400
Post by Lee
[...]
[...]
But how do you get something into the paste buffer without using the mouse?
Left double-click to select a "word" & right click to paste is
pretty much automatic for me now - which is why I'm looking for a
xfce4 terminal replacement
I fell in love with terminator
sudo apt install terminator
double left button click = copy
middle button click = paste
(when no middle button available, I think xorg has the possibility to
workaround with left and right button simultaneous)
right button click = options
on fluxbox it works like a charme
and when you right click, choose Preferences, puTTY style paste, you
will have your right click paste.

Shift middle click gives you Preferences then.

Thanks for pointing out, I hate middle button clicks!

I will investigate for the swap in X.
Lee
2019-04-11 04:30:02 UTC
Permalink
Post by arne
On Wed, 10 Apr 2019 16:37:15 -0400
Post by Lee
[...]
[...]
But how do you get something into the paste buffer without using the mouse?
Left double-click to select a "word" & right click to paste is pretty
much automatic for me now - which is why I'm looking for a xfce4
terminal replacement
I fell in love with terminator
sudo apt install terminator
double left button click = copy
middle button click = paste
(when no middle button available, I think xorg has the possibility to
workaround with left and right
button simultaneous)
right button click = options
on fluxbox it works like a charme
That looks interesting - thanks for the link

Lee
Alexander V. Makartsev
2019-04-11 04:30:02 UTC
Permalink
Post by Lee
Post by Alexander V. Makartsev
Post by Lee
I installed the xfce version of debian 9 & have a terminal icon on the
menu bar that starts xfce4-terminal
Is there some way to configure xfce4-terminal so that a right mouse
click pastes text?
What I have now is right-click brings up a menu where I have to left
click on paste. ick.
How do I find out what other terminal programs are already installed
that I can try?
What terminal programs are available that have a 'right click pastes
text' option _and_ has a scroll bar that is
1. easily visible
2. goes up/down a page at a time when left-clicking above/below the scroll bar
3. has up/down buttons on the scroll bar that scrolls a line at a time
when clicking on the button
Thanks
Lee
Try keyboard shortcuts instead.
Shift+Ctrl+V - Paste
It's more convenient IMO, you won't move your hands away from keyboard
and simply continue typing after paste.
But how do you get something into the paste buffer without using the mouse?
That depends of course. I use 'vim' to edit files and 'tmux' [1], so
most of the time I copy text from terminal (from opened man pages,
sample config files, output of another command in another terminal
section, ssh sessions, etc) using keyboard shortcuts.
These programs encourage you (and make it possible) to use more of a
keyboard and much less of a mouse.
Post by Lee
Left double-click to select a "word" & right click to paste is pretty
much automatic for me now - which is why I'm looking for a xfce4
terminal replacement
Thanks anyway tho
Lee
[1] https://www.hamvocke.com/blog/a-quick-and-easy-guide-to-tmux/
--
With kindest regards, Alexander.

⢀⣎⠟⠻⢶⣊⠀
⣟⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀⠀⠀⠀
Dan Ritter
2019-04-10 20:10:02 UTC
Permalink
Post by Lee
I installed the xfce version of debian 9 & have a terminal icon on the
menu bar that starts xfce4-terminal
Is there some way to configure xfce4-terminal so that a right mouse
click pastes text?
What I have now is right-click brings up a menu where I have to left
click on paste. ick.
Middle button is probably set to paste right now. If you have a
wheel, it's probably set to to click in as the middle button.
Otherwise, left+right together may be middle button.

Finally, you can put this in your .Xresources:

XTerm*VT100.Translations: \
#override BackSpace: string(0x08) \n\
Delete: string(0x1b) string("[3~") \n\
~Shift ~Ctrl ~Meta :
insert-selection(PRIMARY,CUT_BUFFER0) \n\
~Ctrl ~Meta : ignore() \n\
~Shift ~Ctrl ~Meta :
insert-selection(PRIMARY,CUT_BUFFER0) \n\
: select-end(PRIMARY,CLIPBOARD,CUT_BUFFER0)

and run actual xterm.
Post by Lee
How do I find out what other terminal programs are already
installed
Post by Lee
that I can try?
dpkg --get-selections|grep term
is close but not definitive

-dsr-
Lee
2019-04-10 21:00:02 UTC
Permalink
Post by Dan Ritter
Post by Lee
I installed the xfce version of debian 9 & have a terminal icon on the
menu bar that starts xfce4-terminal
Is there some way to configure xfce4-terminal so that a right mouse
click pastes text?
What I have now is right-click brings up a menu where I have to left
click on paste. ick.
Middle button is probably set to paste right now.
It is!! So how do I change that setting so that right click is set to paste?
Post by Dan Ritter
If you have a
wheel, it's probably set to to click in as the middle button.
Otherwise, left+right together may be middle button.
XTerm*VT100.Translations: \
#override BackSpace: string(0x08) \n\
Delete: string(0x1b) string("[3~") \n\
insert-selection(PRIMARY,CUT_BUFFER0) \n\
~Ctrl ~Meta : ignore() \n\
insert-selection(PRIMARY,CUT_BUFFER0) \n\
: select-end(PRIMARY,CLIPBOARD,CUT_BUFFER0)
and run actual xterm.
Is there anything in your XTerm*VT100.Translations that means 'right
mouse button'?
If I do go with xterm I'll read up on .Xresources, but in the mean
time I'm not seeing anything in your snippet that even remotely looks
like 'mouse button'
Post by Dan Ritter
Post by Lee
How do I find out what other terminal programs are already installed
that I can try?
dpkg --get-selections|grep term
is close but not definitive
looks like xterm is my only other already installed option
$ dpkg --get-selections | grep term
ncurses-term install
xfce4-terminal install
xterm install

Thanks
Lee
Dan Ritter
2019-04-10 21:00:02 UTC
Permalink
Post by Lee
Post by Dan Ritter
Post by Lee
I installed the xfce version of debian 9 & have a terminal icon on the
menu bar that starts xfce4-terminal
Is there some way to configure xfce4-terminal so that a right mouse
click pastes text?
What I have now is right-click brings up a menu where I have to left
click on paste. ick.
Middle button is probably set to paste right now.
It is!! So how do I change that setting so that right click is set to paste?
You don't! The programmers didn't include that.

You can change your button mapping for all of X with xmodmap.

-dsr-
Lee
2019-04-10 21:30:01 UTC
Permalink
Post by Dan Ritter
Post by Lee
Post by Dan Ritter
Post by Lee
I installed the xfce version of debian 9 & have a terminal icon on the
menu bar that starts xfce4-terminal
Is there some way to configure xfce4-terminal so that a right mouse
click pastes text?
What I have now is right-click brings up a menu where I have to left
click on paste. ick.
Middle button is probably set to paste right now.
It is!! So how do I change that setting so that right click is set to paste?
You don't! The programmers didn't include that.
wow. just.. wow. I wonder if that omission has anything to do with
the xterm popcon graph showing about 100K users & xfce4-terminal
about 28K
Post by Dan Ritter
You can change your button mapping for all of X with xmodmap.
but then everywhere I expect a right click to pull up a menu won't - correct?

Oh well... I'll give xterm a try.

Thanks
Lee
Dan Ritter
2019-04-10 22:40:01 UTC
Permalink
Post by Lee
Post by Dan Ritter
You don't! The programmers didn't include that.
wow. just.. wow. I wonder if that omission has anything to do with
the xterm popcon graph showing about 100K users & xfce4-terminal
about 28K
Probably more to do with the fact that xterm comes as a default
with all X11 installations.
Post by Lee
Post by Dan Ritter
You can change your button mapping for all of X with xmodmap.
but then everywhere I expect a right click to pull up a menu won't - correct?
Correct. If you swap your middle button with your right button,
they will be consistently swapped.

-dsr-
Lee
2019-04-10 22:50:01 UTC
Permalink
Post by Dan Ritter
Post by Lee
Post by Dan Ritter
You don't! The programmers didn't include that.
wow. just.. wow. I wonder if that omission has anything to do with
the xterm popcon graph showing about 100K users & xfce4-terminal
about 28K
Probably more to do with the fact that xterm comes as a default
with all X11 installations.
Post by Lee
Post by Dan Ritter
You can change your button mapping for all of X with xmodmap.
but then everywhere I expect a right click to pull up a menu won't - correct?
Correct. If you swap your middle button with your right button,
they will be consistently swapped.
Thanks for saving me the trouble of figuring out how to swap mouse
buttons & testing. Having to press the mouse wheel button to pull up
a menu is a non-starter.

Lee
David Wright
2019-04-11 02:00:01 UTC
Permalink
Post by Lee
Post by Dan Ritter
Post by Lee
Post by Dan Ritter
Post by Lee
I installed the xfce version of debian 9 & have a terminal icon on the
menu bar that starts xfce4-terminal
Is there some way to configure xfce4-terminal so that a right mouse
click pastes text?
What I have now is right-click brings up a menu where I have to left
click on paste. ick.
Middle button is probably set to paste right now.
It is!! So how do I change that setting so that right click is set to paste?
You don't! The programmers didn't include that.
wow. just.. wow. I wonder if that omission has anything to do with
the xterm popcon graph showing about 100K users & xfce4-terminal
about 28K
Post by Dan Ritter
You can change your button mapping for all of X with xmodmap.
but then everywhere I expect a right click to pull up a menu won't - correct?
Oh well... I'll give xterm a try.
I have a mouse with a wheel, but pressing it (as opposed to scrolling
it) is very unreliable. I have changed the middle-click method from
pressing the wheel to the old-fashioned way of dealing with 2-button
mice: pressing both buttons at once.

AFAIK this change is at the level of X and doesn't depend on the term.
Here are the steps I used. You might need to tweak the filename
~/.xsession for a DE as I use just startx and fvwm. For setting stuff
automatically, you need to ascertain the name of your X startup file.

At the end of ~/.xsession I routinely put
xinput
which lists the devices in ~/.xsession-errors which I copy into my
configuration archive. But you can just type
$ xinput at any commandline in X:
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech M325 id=10 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=14 [slave pointer (2)]
⎜ ↳ ELAN Touchscreen id=9 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ Lenovo EasyCamera id=11 [slave keyboard (3)]
↳ Ideapad extra buttons id=12 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=13 [slave keyboard (3)]
$

Having read that list, I add lines for devices that might interest me
in a similar way (in ~/.xsession-9-wren¹), and again you can type this
at a commandline:
$ xinput list-props "Logitech M325"
Device 'Logitech M325':
Device Enabled (141): 1
Coordinate Transformation Matrix (143): 0.300000, 0.000000, 0.000000, 0.000000, 0.300000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Accel Speed (281): 0.000000
libinput Accel Speed Default (282): 0.000000
libinput Accel Profiles Available (283): 1, 1
libinput Accel Profile Enabled (284): 1, 0
libinput Accel Profile Enabled Default (285): 1, 0
libinput Natural Scrolling Enabled (286): 0
libinput Natural Scrolling Enabled Default (287): 0
libinput Send Events Modes Available (262): 1, 0
libinput Send Events Mode Enabled (263): 0, 0
libinput Send Events Mode Enabled Default (264): 0, 0
libinput Left Handed Enabled (288): 0
libinput Left Handed Enabled Default (289): 0
libinput Scroll Methods Available (290): 0, 0, 1
libinput Scroll Method Enabled (291): 0, 0, 0
libinput Scroll Method Enabled Default (292): 0, 0, 0
libinput Button Scrolling Button (293): 2
libinput Button Scrolling Button Default (294): 2
libinput Middle Emulation Enabled (295): 1
libinput Middle Emulation Enabled Default (296): 0
Device Node (265): "/dev/input/event16"
Device Product ID (266): 1133, 16394
libinput Drag Lock Buttons (297): <no items>
libinput Horizontal Scroll Enabled (298): 1
$

Your list would look different even with the same hardware because
mine shows the effect of the mouse commands I have already added
to ~/.xsession:
# Pointers tend to be too sensitive.
# Leave the last number as 1: the other numbers are ratio'd with it.
xinput --set-prop "Logitech M325" "Coordinate Transformation Matrix" .3, 0, 0, 0, .3, 0, 0, 0, 1
# My mouse wheel is very unreliable for button 2, so use buttons 1&3.
xinput --set-prop "Logitech M325" "libinput Middle Emulation Enabled" 1

Now I can use either a wheel press or a both-button-click to paste.
The wheel still scrolls.

¹ A note on the filenames: My .xsession has hooks for host-specific
commands at three stages:

Earlyconfig="$HOME/.xsession-1-$HOSTNAME"
Midconfig="$HOME/.xsession-5-$HOSTNAME"
Lateconfig="$HOME/.xsession-9-$HOSTNAME"

… various commands here …
… and, nearing the end: …

[ -f "$Lateconfig" ] && . "$Lateconfig"

so the specific device lists are only about the hosts' own hardware,
plus things that might be connected, whereas the configuration
commands themselves are executed on all my hosts (and are ignored
if not present). That way, the both-button-click works wherever the
mouse is connected.

Cheers,
David.
Lee
2019-04-11 05:30:02 UTC
Permalink
Post by David Wright
Post by Lee
Post by Dan Ritter
Post by Lee
Post by Dan Ritter
Post by Lee
I installed the xfce version of debian 9 & have a terminal icon on the
menu bar that starts xfce4-terminal
Is there some way to configure xfce4-terminal so that a right mouse
click pastes text?
What I have now is right-click brings up a menu where I have to left
click on paste. ick.
Middle button is probably set to paste right now.
It is!! So how do I change that setting so that right click is set to paste?
You don't! The programmers didn't include that.
wow. just.. wow. I wonder if that omission has anything to do with
the xterm popcon graph showing about 100K users & xfce4-terminal
about 28K
Post by Dan Ritter
You can change your button mapping for all of X with xmodmap.
but then everywhere I expect a right click to pull up a menu won't - correct?
Oh well... I'll give xterm a try.
I have a mouse with a wheel, but pressing it (as opposed to scrolling
it) is very unreliable. I have changed the middle-click method from
pressing the wheel to the old-fashioned way of dealing with 2-button
mice: pressing both buttons at once.
AFAIK this change is at the level of X and doesn't depend on the term.
Here are the steps I used. You might need to tweak the filename
~/.xsession for a DE as I use just startx and fvwm. For setting stuff
automatically, you need to ascertain the name of your X startup file.
I don't know enough to appreciate all this, much less comment on it,
but still, it looks amazing!

$ find / -name xinput 2>/dev/null
$

so another package I need to install..

.. which breaks the login process for me :(

$ echo xinput > ~/.xsession

logout, try to log in, get a blank screen for a few seconds & I'm back
at the login screen again.

ssh in from my windows machine, rm .xsession, and I can log in on the
debian machine again.

Dunno if this means anything, but the last few lines in .xsession-errors.old are
dbus-update-activation-environment: setting GDMSESSION=lightdm-xsession
dbus-update-activation-environment: setting QT_ACCESSIBILITY=1
dbus-update-activation-environment: setting QT_XCB_FORCE_SOFTWARE_OPENGL=1
dbus-update-activation-environment: setting
GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
dbus-update-activation-environment: setting PWD=/home/lee
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ ImPS/2 Generic Wheel Mouse id=9 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Power Button id=7 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=8 [slave keyboard (3)]

Why does putting 'xinput' in my .xsession keep me from being able to
log in & it works just fine for you?

Thanks,
Lee
Post by David Wright
At the end of ~/.xsession I routinely put
xinput
which lists the devices in ~/.xsession-errors which I copy into my
configuration archive. But you can just type
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech M325 id=10 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=14 [slave pointer (2)]
⎜ ↳ ELAN Touchscreen id=9 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ Lenovo EasyCamera id=11 [slave keyboard (3)]
↳ Ideapad extra buttons id=12 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=13 [slave keyboard (3)]
$
Having read that list, I add lines for devices that might interest me
in a similar way (in ~/.xsession-9-wren¹), and again you can type this
$ xinput list-props "Logitech M325"
Device Enabled (141): 1
Coordinate Transformation Matrix (143): 0.300000, 0.000000, 0.000000,
0.000000, 0.300000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Accel Speed (281): 0.000000
libinput Accel Speed Default (282): 0.000000
libinput Accel Profiles Available (283): 1, 1
libinput Accel Profile Enabled (284): 1, 0
libinput Accel Profile Enabled Default (285): 1, 0
libinput Natural Scrolling Enabled (286): 0
libinput Natural Scrolling Enabled Default (287): 0
libinput Send Events Modes Available (262): 1, 0
libinput Send Events Mode Enabled (263): 0, 0
libinput Send Events Mode Enabled Default (264): 0, 0
libinput Left Handed Enabled (288): 0
libinput Left Handed Enabled Default (289): 0
libinput Scroll Methods Available (290): 0, 0, 1
libinput Scroll Method Enabled (291): 0, 0, 0
libinput Scroll Method Enabled Default (292): 0, 0, 0
libinput Button Scrolling Button (293): 2
libinput Button Scrolling Button Default (294): 2
libinput Middle Emulation Enabled (295): 1
libinput Middle Emulation Enabled Default (296): 0
Device Node (265): "/dev/input/event16"
Device Product ID (266): 1133, 16394
libinput Drag Lock Buttons (297): <no items>
libinput Horizontal Scroll Enabled (298): 1
$
Your list would look different even with the same hardware because
mine shows the effect of the mouse commands I have already added
# Pointers tend to be too sensitive.
# Leave the last number as 1: the other numbers are ratio'd with it.
xinput --set-prop "Logitech M325" "Coordinate Transformation Matrix" .3, 0,
0, 0, .3, 0, 0, 0, 1
# My mouse wheel is very unreliable for button 2, so use buttons 1&3.
xinput --set-prop "Logitech M325" "libinput Middle Emulation Enabled" 1
Now I can use either a wheel press or a both-button-click to paste.
The wheel still scrolls.
¹ A note on the filenames: My .xsession has hooks for host-specific
Earlyconfig="$HOME/.xsession-1-$HOSTNAME"
Midconfig="$HOME/.xsession-5-$HOSTNAME"
Lateconfig="$HOME/.xsession-9-$HOSTNAME"
… various commands here …
… and, nearing the end: …
[ -f "$Lateconfig" ] && . "$Lateconfig"
so the specific device lists are only about the hosts' own hardware,
plus things that might be connected, whereas the configuration
commands themselves are executed on all my hosts (and are ignored
if not present). That way, the both-button-click works wherever the
mouse is connected.
Cheers,
David.
Greg Wooledge
2019-04-11 12:20:01 UTC
Permalink
Post by Lee
so another package I need to install..
.. which breaks the login process for me :(
$ echo xinput > ~/.xsession
If you use a .xsession file, you have to go all in. Your ~/.xsession
file will completely replace the system default X11 session. That means
you have to invoke your window manager (or desktop session manager if
you use one of those), as well as any other programs that you'd like
to start as part of your personally customized X session.

If instead you just want to ADD a program to the system default X session,
Debian created a ~/.xsessionrc file which is run in ADDITION to the
default session, so you don't have to replicate all of the functionality
yourself.

https://wiki.debian.org/Xsession
Vincent Lefevre
2019-04-15 11:00:01 UTC
Permalink
If you want to replace the system default X11 session, do this
with a .xinitrc script. By default, it is /etc/X11/xinit/xinitrc,
which does: . /etc/X11/Xsession
Actually startx (via xinit) honors .xinitrc, but not the graphical
login managers. See also

https://lists.debian.org/debian-user/2013/12/msg00903.html
--
Vincent Lefèvre <***@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Vincent Lefevre
2019-04-15 11:00:02 UTC
Permalink
Post by Greg Wooledge
Post by Lee
so another package I need to install..
.. which breaks the login process for me :(
$ echo xinput > ~/.xsession
If you use a .xsession file, you have to go all in. Your ~/.xsession
file will completely replace the system default X11 session.
No, it just replaces the session manager or window manager
(see /etc/X11/Xsession.d/50x11-common_determine-startup).
But /etc/X11/Xsession runs as normal.

In short, /etc/X11/Xsession defines USERXSESSION=$HOME/.xsession
which is used by /etc/X11/Xsession.d/50x11-common_determine-startup
to set the STARTUP variable, and this variable is used at the end
of the X session init, in /etc/X11/Xsession.d/99x11-common_start,
which does: exec $STARTUP

If you want to replace the system default X11 session, do this
with a .xinitrc script. By default, it is /etc/X11/xinit/xinitrc,
which does: . /etc/X11/Xsession
--
Vincent Lefèvre <***@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
David Wright
2019-04-11 15:00:02 UTC
Permalink
Post by Lee
Post by David Wright
Post by Lee
Post by Dan Ritter
Post by Lee
Post by Dan Ritter
Post by Lee
I installed the xfce version of debian 9 & have a terminal icon on the
menu bar that starts xfce4-terminal
Is there some way to configure xfce4-terminal so that a right mouse
click pastes text?
What I have now is right-click brings up a menu where I have to left
click on paste. ick.
Middle button is probably set to paste right now.
It is!! So how do I change that setting so that right click is set to paste?
You don't! The programmers didn't include that.
wow. just.. wow. I wonder if that omission has anything to do with
the xterm popcon graph showing about 100K users & xfce4-terminal
about 28K
Post by Dan Ritter
You can change your button mapping for all of X with xmodmap.
but then everywhere I expect a right click to pull up a menu won't - correct?
Oh well... I'll give xterm a try.
I have a mouse with a wheel, but pressing it (as opposed to scrolling
it) is very unreliable. I have changed the middle-click method from
pressing the wheel to the old-fashioned way of dealing with 2-button
mice: pressing both buttons at once.
AFAIK this change is at the level of X and doesn't depend on the term.
Here are the steps I used. You might need to tweak the filename
~/.xsession for a DE as I use just startx and fvwm. For setting stuff
automatically, you need to ascertain the name of your X startup file.
I don't know enough to appreciate all this, much less comment on it,
but still, it looks amazing!
$ find / -name xinput 2>/dev/null
$
so another package I need to install..
.. which breaks the login process for me :(
$ echo xinput > ~/.xsession
logout, try to log in, get a blank screen for a few seconds & I'm back
at the login screen again.
ssh in from my windows machine, rm .xsession, and I can log in on the
debian machine again.
Dunno if this means anything, but the last few lines in .xsession-errors.old are
[…]
Post by Lee
dbus-update-activation-environment: setting PWD=/home/lee
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ ImPS/2 Generic Wheel Mouse id=9 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Power Button id=7 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=8 [slave keyboard (3)]
Why does putting 'xinput' in my .xsession keep me from being able to
log in & it works just fine for you?
Because, as I wrote, I use startx to run X and fvwm as my WM, so my X
session is configured with a substantial .xsession file (and the
host-specific files it calls) that I've built up over more that two
decades. So you're best to do your investigating first with the direct
commands I gave.

You've got the output of xinput quoted above, so now try
$ xinput list-props "ImPS/2 Generic Wheel Mouse"
and see what properties are available. You're likely to see
lines similar to the ones I previously quoted (snipped from here).
So then you might be able to test the effect of a line *like*
$ xinput --set-prop "ImPS/2 Generic Wheel Mouse" "libinput Middle Emulation Enabled" 1
If you get it right, it should take immediate effect.

The last step (for you) is to divine which file to *add* this line to,
which depends on your method of starting X. It's likely .xsessionrc
according to Greg who's played with this stuff (or read around it)
more then I have. It's one of the complications that arises from
the flexibility of X: anyone can build a set of interacting
configuration files to get it started just how they want it.

Were you to use my WM (fvwm) to achieve the same ends with the mouse,
we would be having a similar conversation about where to place the
commands for much the same reason: over two decades of evolution in
configuration files.
Post by Lee
Post by David Wright
At the end of ~/.xsession I routinely put
xinput
A preexisting file as you can see from the snippet below.
Post by Lee
Post by David Wright
Your list would look different even with the same hardware because
mine shows the effect of the mouse commands I have already added
# Pointers tend to be too sensitive.
# Leave the last number as 1: the other numbers are ratio'd with it.
xinput --set-prop "Logitech M325" "Coordinate Transformation Matrix" .3, 0, 0, 0, .3, 0, 0, 0, 1
# My mouse wheel is very unreliable for button 2, so use buttons 1&3.
xinput --set-prop "Logitech M325" "libinput Middle Emulation Enabled" 1
Cheers,
David.
Peter Wiersig
2019-04-10 20:20:02 UTC
Permalink
Post by Lee
How do I find out what other terminal programs are already installed
that I can try?
Installed? I don't know your package list
Installable? see below.
Post by Lee
What terminal programs are available that have a 'right click pastes
text' option _and_ has a scroll bar that is
1. easily visible
2. goes up/down a page at a time when left-clicking above/below the scroll bar
3. has up/down buttons on the scroll bar that scrolls a line at a time
when clicking on the button
Package: putty (0.67-3+deb9u1)
Telnet/SSH client for X

https://packages.debian.org/stretch/putty

also available in jessie or buster

Peter
Lee
2019-04-10 21:10:01 UTC
Permalink
Post by Peter Wiersig
Post by Lee
How do I find out what other terminal programs are already installed
that I can try?
Installed? I don't know your package list
Installable? see below.
Post by Lee
What terminal programs are available that have a 'right click pastes
text' option _and_ has a scroll bar that is
1. easily visible
2. goes up/down a page at a time when left-clicking above/below the scroll bar
3. has up/down buttons on the scroll bar that scrolls a line at a time
when clicking on the button
Package: putty (0.67-3+deb9u1)
Telnet/SSH client for X
https://packages.debian.org/stretch/putty
Now there's a blast from the past! I used to love putty but $WORK
decided using it was a no-no. In any case,
https://www.chiark.greenend.org.uk/~sgtatham/putty/
2019-03-16 PuTTY 0.71 released
PuTTY 0.71, released today, includes a large number of security fixes,
many of which were found by the recent EU-funded HackerOne bug bounty.

How does one tell if putty (0.67-3+deb9u1) has all the security fixes
that are in 0.71?

Thanks
Lee
Dan Ritter
2019-04-10 22:40:01 UTC
Permalink
Post by Lee
Post by Peter Wiersig
Package: putty (0.67-3+deb9u1)
Telnet/SSH client for X
https://packages.debian.org/stretch/putty
Now there's a blast from the past! I used to love putty but $WORK
decided using it was a no-no. In any case,
https://www.chiark.greenend.org.uk/~sgtatham/putty/
2019-03-16 PuTTY 0.71 released
PuTTY 0.71, released today, includes a large number of security fixes,
many of which were found by the recent EU-funded HackerOne bug bounty.
How does one tell if putty (0.67-3+deb9u1) has all the security fixes
that are in 0.71?
Excellent question.

https://packages.debian.org/search?suite=all&searchon=names&keywords=putty

can send you to

https://metadata.ftp-master.debian.org/changelogs//main/p/putty/putty_0.67-3+deb9u1_changelog

which has this as the most recent entry:

putty (0.67-3+deb9u1) stretch-security; urgency=high

* Backport security fixes from 0.71:
- In random_add_noise, put the hashed noise into the pool,
not the raw
noise.
- New facility for removing pending toplevel callbacks.
- CVE-2019-9898: Fix one-byte buffer overrun in
random_add_noise().
- uxnet: clean up callbacks when closing a NetSocket.
- sk_tcp_close: fix memory leak of output bufchain.
- Fix handling of bad RSA key with n=p=q=0.
- Sanity-check the 'Public-Lines' field in ppk files.
- Introduce an enum of the uxsel / select_result flags.
- CVE-2019-9895: Switch to using poll(2) in place of
select(2).
- CVE-2019-9894: RSA kex: enforce the minimum key length.
- CVE-2019-9897: Fix crash on ESC#6 + combining chars + GTK
+ odd-width
terminal.
- CVE-2019-9897: Limit the number of combining chars per
terminal cell.
- minibidi: fix read past end of line in rule W5.
- CVE-2019-9897: Fix crash printing a width-2 char in a
width-1
terminal.

-- Colin Watson <***@debian.org> Tue, 02 Apr 2019
19:32:53 +0100
Lee
2019-04-11 00:20:01 UTC
Permalink
Post by Dan Ritter
Post by Lee
Post by Peter Wiersig
Package: putty (0.67-3+deb9u1)
Telnet/SSH client for X
https://packages.debian.org/stretch/putty
Now there's a blast from the past! I used to love putty but $WORK
decided using it was a no-no. In any case,
https://www.chiark.greenend.org.uk/~sgtatham/putty/
2019-03-16 PuTTY 0.71 released
PuTTY 0.71, released today, includes a large number of security fixes,
many of which were found by the recent EU-funded HackerOne bug bounty.
How does one tell if putty (0.67-3+deb9u1) has all the security fixes
that are in 0.71?
Excellent question.
https://packages.debian.org/search?suite=all&searchon=names&keywords=putty
can send you to
https://metadata.ftp-master.debian.org/changelogs//main/p/putty/putty_0.67-3+deb9u1_changelog
putty (0.67-3+deb9u1) stretch-security; urgency=high
<.. snip ..>

Cool - I'll try to remember to check the changelog in the future.

But again.. wow. And not in a good way. Install putty on debian, run
putty, right click on the putty menu bar (title bar?) and the menu is
lacking _anything_ to do with how putty behaves.

Install putty on windows, run putty, right click on the putty menu bar
& there's a 'Change Settings' option that lets me change the font or
font size on the fly, colors, cursor, window size, enable/disable
logging, etc. Not being able to change things on the fly with the
debian version of putty is .. disappointing at best.

Lee
Peter Wiersig
2019-04-11 05:30:01 UTC
Permalink
Post by Lee
But again.. wow. And not in a good way. Install putty on debian, run
putty, right click on the putty menu bar (title bar?) and the menu is
lacking _anything_ to do with how putty behaves.
I never tried PuTTY on linux, but I also grew up with X so middle mouse
paste is my default operandus.

Under Windows the menu is also available with Ctrl-Rightclick in PuTTY,
maybe that behaves the same?

Under Linux a right click on the titlebar is window manager dependant
behaviour (same as with windows, but PuTTY hooks into MS API).
Post by Lee
Not being able to change things on the fly with the
debian version of putty is .. disappointing at best.
I only saw screenshots of linux PuTTY but the settings menu was featured
in the Gnome Desktop screenshot.

Peter
Lee
2019-04-11 06:40:01 UTC
Permalink
Post by Peter Wiersig
Post by Lee
But again.. wow. And not in a good way. Install putty on debian, run
putty, right click on the putty menu bar (title bar?) and the menu is
lacking _anything_ to do with how putty behaves.
I never tried PuTTY on linux, but I also grew up with X so middle mouse
paste is my default operandus.
Under Windows the menu is also available with Ctrl-Rightclick in PuTTY,
maybe that behaves the same?
Yes, as I found out a short while ago, both ctrl-leftclick and
ctrl-rightclick _inside_ the putty window opens up a putty menu.
Post by Peter Wiersig
Under Linux a right click on the titlebar is window manager dependant
behaviour (same as with windows, but PuTTY hooks into MS API).
Post by Lee
Not being able to change things on the fly with the
debian version of putty is .. disappointing at best.
I only saw screenshots of linux PuTTY but the settings menu was featured
in the Gnome Desktop screenshot.
Yes, it's there. It's a fail on my part - I use the keyboard or I use
the mouse. I haven't held a key down while clicking the mouse in such
a long time that it didn't even occur to me to try holding down
ctrl/alt/shift keys while clicking inside the putty window

Thanks,
Lee
Peter Wiersig
2019-04-11 05:40:01 UTC
Permalink
Post by Lee
How does one tell if putty (0.67-3+deb9u1) has all the security fixes
that are in 0.71?
I think that's what p.d.o is trying to communicate with the bold red
[SECURITY] badge I cut out while pasting the info.

Peter
bw
2019-04-10 21:30:01 UTC
Permalink
<snip>
Post by Lee
How do I find out what other terminal programs are already installed
that I can try?
<snip>

Most of them still seem to register with the debian alternatives system,
but no guarantee.

$ update-alternatives --list x-terminal-emulator
/usr/bin/koi8rxterm
/usr/bin/konsole
/usr/bin/lxterm
/usr/bin/uxterm
/usr/bin/xterm

I don't think I recall seeing right-click to paste, how did you get used
to that? Why can't you continue to use the term that got you used to it?
Lee
2019-04-10 22:50:01 UTC
Permalink
In-Reply-To: <CAD8GWsuW5mBiGMsKMv_diV0cwJGdMAhJ80g0
Post by Lee
Lee
<snip>
Post by Lee
How do I find out what other terminal programs are already installed
that I can try?
<snip>
Most of them still seem to register with the debian alternatives system,
but no guarantee.
$ update-alternatives --list x-terminal-emulator
/usr/bin/koi8rxterm
/usr/bin/konsole
/usr/bin/lxterm
/usr/bin/uxterm
/usr/bin/xterm
Thanks for that - yet another command to add to my notes.
$ update-alternatives --list x-terminal-emulator
/usr/bin/koi8rxterm
/usr/bin/lxterm
/usr/bin/uxterm
/usr/bin/xfce4-terminal.wrapper
/usr/bin/xterm

altho lxterm, uxterm and xterm all create a tiny window with the font
size so small they're damn near unusable. And no obvious menu I can
find to change the font size, window size or anything, so more man
page spelunking for me.
I don't think I recall seeing right-click to paste, how did you get used
to that?
Microsoft Windows. My recollection is putty could be configured to
set right-click to paste. With cygwin mintty it's trivially easy to
set the right mouse button to be 'paste'. As is setting the "double
click selects a word" word definition characters. Or at least I
remember it being trivially easy .. maybe that option was removed from
the menu?

In any case, my idea of 'how things should work' has been shaped by
using MS windows & windows programs. It wasn't until Windows 10 that
I even tried setting up a linux machine at home.
Why can't you continue to use the term that got you used to it?
I could, but I'd rather stop using Windows. Altho lately I keep
asking myself if the Windows 10 spyware/operating-system-as-a-service
is _really_ all that horrible.

Regards,
Lee
bw
2019-04-11 00:20:01 UTC
Permalink
Post by Lee
altho lxterm, uxterm and xterm all create a tiny window with the font
size so small they're damn near unusable. And no obvious menu I can
find to change the font size, window size or anything, so more man
page spelunking for me.
xterm is good, but yeah it is not very useful out of the box. There are
menus, most of the time you can get them by holding down ctrl and using
either mouse button.

I never tried to remap the middle mouse paste, I think that is part of
the x server, not necessarily the particular terminal. It probably could
be done but if you could gravitate to shift-ins and middle mouse click to
paste it might serve you well. They both seem to "usually" be a reliable
way to work, if your clipboard is set to "synchronize with selection."

Let people know what you find out. Especially if you get any good
.Xresources settings or find good documentation about this. It is fairly
rare to find good documentation on these settings IME. The xterm FAQ is
huge and worth looking thru, but hard to find out exactly who does what
sometimes.

https://invisible-island.net/xterm/xterm.faq.html

good luck,
bw
Lee
2019-04-11 03:30:02 UTC
Permalink
In-Reply-To: <CAD8GWsuHoM0DZyD1 fUYpvs-7BLK1bPTFzqSeQhKY
Post by Lee
altho lxterm, uxterm and xterm all create a tiny window with the font
size so small they're damn near unusable. And no obvious menu I can
find to change the font size, window size or anything, so more man
page spelunking for me.
xterm is good, but yeah it is not very useful out of the box. There are
menus, most of the time you can get them by holding down ctrl and using
either mouse button.
That's something I would have never guessed. Hold down the <ctrl> key
+ right click and hold _inside_ the xterm window and I get a menu that
lets me select "large" as a font size. So at least the xterm window
contents are readable now.

No option to save that setting, but still.. progress, so thank you!
I never tried to remap the middle mouse paste, I think that is part of
the x server, not necessarily the particular terminal.
I'm hoping there's something along the lines of
XTerm*rightMouseButton: paste
that I can put into an X resource file and have right click = paste
inside an xterm window & right click anywhere else still be the
default action.
It probably could
be done but if you could gravitate to shift-ins and middle mouse click to
paste it might serve you well.
Maybe someday, but for now I'm still of the opinion that the computer
should change to accommodate my work style - not the other way around.
Let people know what you find out. Especially if you get any good
.Xresources settings or find good documentation about this.
Nope - I haven't found anything yet. Hopefully because I'm still too
close to the bottom of the X windows learning curve.
It is fairly
rare to find good documentation on these settings IME. The xterm FAQ is
huge and worth looking thru, but hard to find out exactly who does what
sometimes.
https://invisible-island.net/xterm/xterm.faq.html
Thanks - I'll check it out.

Lee
t***@tuxteam.de
2019-04-11 06:50:01 UTC
Permalink
On Wed, Apr 10, 2019 at 11:20:31PM -0400, Lee wrote:

[...]
Post by Lee
That's something I would have never guessed. Hold down the <ctrl> key
+ right click and hold _inside_ the xterm window and I get a menu that
lets me select "large" as a font size. So at least the xterm window
contents are readable now.
No option to save that setting, but still.. progress, so thank you!
Xterm is configured via X resources. Their defaults live in files,
one system-wide and one per-user. The system-wide resources typically
live in the /etc/X11/Xresources directory, one file for each application,
the user-specific ones, which override the system-wide ones typically live
in your home directory, in one file, ~/.Xresources.

The idea is that the distribution and the sysadmin set the baseline and
each user can change those things which don't fit for her.

The Arch Linux wiki [1] has, as often, a pretty good overview for that,
with links for specific Xterm examples.

I set my preferred Xterm putting this in my .Xresources (NOTE: leading
space here for clarity -- remove that!

*VT100.faceName: Liberation Sans Mono
*VT100.faceSize: 8
*VT100.faceSize1: 3
*VT100.faceSize2: 5
*VT100.faceSize3: 8
*VT100.faceSize4: 10
*VT100.faceSize5: 14
*VT100.faceSize6: 20

Thus you can set the sizes of all fonts offered to you in that menu
("unreadable", "tiny" ... "huge").

Note also that the sizes given here might be a tad too small for you:
I'm a bit myopic myself :-D

Cheers

[1] https://wiki.archlinux.org/index.php/X_resources

-- t
bw
2019-04-11 12:30:01 UTC
Permalink
Post by Lee
for now I'm still of the opinion that the computer
should change to accommodate my work style - not the other way around.
Yeah I'm down with that idea, I didn't say give up. I like the idea of
only changing xterm, because the right click is so useful everywhere else
you would not want to remap it globally...

Looking manpage for xterm I didn't see a resource, (there may be one not
listed?) but there's an example that has some potential, but on a quick
test here, it pastes after a right/left combination of clicks...

*VT100*translations: #override \n\
<Btn3Up>: insert-selection(PRIMARY, CUT_BUFFER0) \n\

T test or refine the settings, you can drop similar snippets into
~.Xresources and run

$ xrdb -merge ~/.Xresources

as your regular user and they take affect on next xterm opened. The local
Xresources file is usually read on login, but I think some display
managers do bypass it.
Lee
2019-04-12 00:00:01 UTC
Permalink
Post by bw
Post by Lee
for now I'm still of the opinion that the computer
should change to accommodate my work style - not the other way around.
Yeah I'm down with that idea, I didn't say give up. I like the idea of
only changing xterm, because the right click is so useful everywhere else
you would not want to remap it globally...
Looking manpage for xterm I didn't see a resource,
man xterm
<.. snip ..>
Default Key Bindings
The default bindings in the VTxxx window use the SELECT token,
which is set by the selectToClipboard resource. These are
for the vt100 widget:
Shift <KeyPress> Prior:scroll-back(1,halfpage) \n\
Shift <KeyPress> Next:scroll-forw(1,halfpage) \n\

Which seems to require much prior knowledge to understand, but that
seems par for the course with linux.

What I have now:
$ cat .Xresources
XTerm*.Translations: #override \
<Btn1Down>: select-start() \n\
<Btn1Motion>:select-extend() \n\
<Btn1Up>: select-end(PRIMARY, CUT_BUFFER0) \n\
<Btn3Down>: ignore() \n\
<Btn3Up>: insert-selection(SELECT, CUT_BUFFER0) \n

XTerm*charClass: 45-47:48,95:48,126:48
# Clicking the left pointer button twice in rapid succession (double-clicking)
# causes all characters of the same class (e.g., letters, white space,
punctuation)
# to be selected as a “word”. Since different people have different
preferences for
# what should be selected (for example, should filenames be selected
as a whole or
# only the separate subnames), the default mapping can be overridden through the
# use of the charClass (class CharClass) resource.

# eg. mintty: WordChars=-./_~
# 45: - (dash)
# 46: . (period)
# 47: / (slash)
# 95: _ (underscore)
# 126: ~ (tilde)
# are put in the same character class as letters & digits when selecting 'words'

***@izzy ~
$

What's really confusing is starting xterm from the xfce4-terminal:
$ xterm &
[1] 819

***@izzy ~
$ Warning: Actions not found: select-start, select-extend, select-end,
ignore, insert-selection
Warning: Actions not found: select-start, select-extend, select-end,
ignore, insert-selection
Warning: Actions not found: select-start, select-extend, select-end,
ignore, insert-selection

*BUT* clicking in the xterm window & doing something like
$ ls
Desktop Downloads Pictures Templates backup commands notes.bash x_home
Documents Music Public Videos bin notes.apt syncusb

and then typing "ls -l " move the mouse over "notes.bash", double
click, right click, press enter & I've got
$ ls -l notes.bash
-rw-r--r-- 1 lee lee 1313 Mar 27 16:50 notes.bash

So something fusses about the actions not being found but they still
seem to work anyway. wtf??

Obvious problem - the default menus don't happen when <ctrl>left or
right clicking in the window. I could use a pointer to which man page
describes the Meta, ~Meta, Ctrl, ~Ctrl, !Ctrl notation in the xterm
man since I'm not seeing it in 'man xterm'
Post by bw
(there may be one not
listed?) but there's an example that has some potential, but on a quick
test here, it pastes after a right/left combination of clicks...
*VT100*translations: #override \n\
<Btn3Up>: insert-selection(PRIMARY, CUT_BUFFER0) \n\
T test or refine the settings, you can drop similar snippets into
~.Xresources and run
$ xrdb -merge ~/.Xresources
If I was more confident about how all this worked - yes. But I'm not,
so I make a change to ~/.Xresources, log out & back in to test. It's
slower, but seems like much less chance of screwing up :)

Thanks,
Lee
bw
2019-04-12 04:00:02 UTC
Permalink
See, this is one place where I get confused, and find documentation
lacking. I often get different results using one of these...

xterm*whatever
xterm.whatever
xterm*VT100.whatever
xterm.vt100.whatever
*VT100.whatever

It seems there are different ways to match these resource descripters.
The caps as well as the * and . make a difference also in how they match.

I'm not sure if it's regex, which I am real limited in, or some other
voodoo that has some better documentation than the xterm manpage, because
I have read the manpage and I just don't get it.
Lee
2019-04-12 06:00:01 UTC
Permalink
This post might be inappropriate. Click to display it.
t***@tuxteam.de
2019-04-12 08:10:02 UTC
Permalink
On Fri, Apr 12, 2019 at 01:56:36AM -0400, Lee wrote:

[...]
Post by Lee
As for upper/lower case - I dunno. I copied from the example in the
man page but I just did a quick search & it has
NOTE: some resource files use patterns such as
*font: fixed
which are overly broad, affecting both
xterm.vt100.font
and
xterm.vt100.utf8Fonts.font
which is probably not what you intended.
so I don't know if case is significant or no
Typically, an object (application, widget within an app, etc.) has
a lower-case name, where object classes have an upper case name.

The result is that it often doesn't matter whether you target an
object or its whole class in the resource specification.

A good primer (with links) is in the Wikipedia [1]

Cheers
[1] https://en.wikipedia.org/wiki/X_resources
-- t
Lee
2019-04-12 21:10:02 UTC
Permalink
Post by t***@tuxteam.de
Post by Lee
so I don't know if case is significant or no
Typically, an object (application, widget within an app, etc.) has
a lower-case name, where object classes have an upper case name.
The result is that it often doesn't matter whether you target an
object or its whole class in the resource specification.
Thanks - that got me looking in the right place.

It turns out you need to _not_ be too general. Originally I had
XTerm*Translations: #override \
and got warnings every time I started an xterm. Apparently I was also
changing the translations for menus or something..
Change it to
XTerm*VT100.Translations: #override \
and no more error messages.

Same deal with setting XTerm*geometry and seeing only a small bit of
the popup menu.

I still haven't found a doc describing the button modifiers - eg
~Meta <Btn1Down>:select-start() \n\
!Lock Ctrl @Num_Lock <Btn1Down>:popup-menu(mainMenu) \n\

If anybody knows where the modifiers (Meta, Ctrl, Lock, etc) and
qualifiers (~!@ etc) are documented, please share.

Where I am now - a usable xterm, no error messages, left
double-clicking on a filename selects the whole filename,
right-clicking pastes the text and <ctrl>left/middle/right click&hold
brings up the appropriate menu popup

$ cat .Xresources
XTerm*faceName: DejaVu Sans Mono
XTerm*faceSize: 12

XTerm*scrollBar: true
XTerm*rightScrollBar: true

XTerm*VT100.geometry: 120x24
! NOTE: XTerm*geometry: NxN also changes the popup menu size!

XTerm*VT100.Translations: #override \
~Ctrl ~Meta <Btn1Down>: select-start() \n\
~Ctrl ~Meta <Btn1Motion>:select-extend() \n\
~Ctrl ~Meta <Btn1Up>: select-end(PRIMARY, CUT_BUFFER0) \n\
~Ctrl ~Meta <Btn3Down>: ignore() \n\
~Ctrl ~Meta <Btn3Up>: insert-selection(SELECT, CUT_BUFFER0) \n
! --- maybe this is applicable?
! https://www.x.org/archive/X11R7.6/doc/man/man5/Compose.5.xhtml
! Each modifier consists of a specified modifier and a state:
! (! MODIFIER ) | None
! Modifiers may be preceded by a "~" character to indicate that the
modifier must not be present.

XTerm*VT100.charClass: 45-47:48,95:48,126:48
! I like being able to double-click on a filename & having the text selected
! So add dash (45), period (46), slash (47), underscore (95) and tilde (126)
! to the aplhanumeric character class (48)
! man xterm
! / int charClass
! the number below the character is the character class
! notice that all the letters & digits are character class 48
!
! $ echo -n "-./_~" | od -a -td1
! 0000000 - . / _ ~
! 45 46 47 95 126
! 0000005


Lee
bw
2019-04-19 01:40:02 UTC
Permalink
In-Reply-To: <CAD8GWsuBwSUoZHXEou7-dUGZdqXeVjjF_T8-4cBQkn2-***@mail.gmail.com>

Thanks for your posts, it was very helpful and nice of you to follow up.
I have some isssue on the list, so CC: your email to make sure you get my
thanks for your time!
Post by Lee
If anybody knows where the modifiers (Meta, Ctrl, Lock, etc) and
The xterm FAQ said XTerm's manpage does not document the syntax for X
resources it is:

"...in the X documentation." but I don't know myself, there's some old
guys that may know. I hope they post some more info in this thread.

I like xterm! I started using it yrs ago, stabbing at it in blind
ignorance. After a few yrs, I'm thinking this program was written by
some really intelligent people, to be really useful in many different
environments, and really stable and reliable. It's hard to configure, but
once you set it up the way you want, you won't have any problems.

Hope you enjoy it as much as I have.
Thank You,
bw
Lee
2019-04-20 18:40:01 UTC
Permalink
Post by bw
Thanks for your posts, it was very helpful and nice of you to follow up.
I have some isssue on the list, so CC: your email to make sure you get my
thanks for your time!
Post by Lee
If anybody knows where the modifiers (Meta, Ctrl, Lock, etc) and
The xterm FAQ said XTerm's manpage does not document the syntax for X
"...in the X documentation." but I don't know myself, there's some old
guys that may know. I hope they post some more info in this thread.
Yeah.. I was hoping someone would give me some links to the official
documentation but apparently this is the wrong mailing list for those
kind of questions.
Post by bw
I like xterm! I started using it yrs ago, stabbing at it in blind
ignorance. After a few yrs, I'm thinking this program was written by
some really intelligent people, to be really useful in many different
environments, and really stable and reliable. It's hard to configure, but
once you set it up the way you want, you won't have any problems.
I agree. On the one hand, it's impressive that it can be customized
so much. On the other hand, the documentation leaves much to be
desired.

In any case, the man pages and
https://invisible-island.net/xterm/xterm.html eventually got me
there. I think.

What I have now:

- left double-click selects a "word"
- the "word" definition is expanded from alphanumeric to alphanumeric
+ characters I normally use in a filename
- left triple-click selects a line
- left click <here> and shift+left-click <there> selects all the
characters from <here> to <there>
- left-click-and-hold, move the mouse, let go of the mouse button
selects all the characters you moused over
- right click pastes

NB: my testing was minimal & I don't know what the default behavior is
supposed to be, so it's quite possible I've introduced breakage
without realizing it. I quit testing when 'left double-click on a
filename, right click' pasted the filename & 'left click here,
shift+left click there, right click' pasted in everything from here to
there.

$ cat .Xresources
XTerm*faceName: DejaVu Sans Mono
XTerm*faceSize: 12

XTerm*scrollBar: true
XTerm*rightScrollBar: true

XTerm*VT100.geometry: 120x24
! NOTE: XTerm*geometry: NxN also changes the popup menu size!

XTerm*VT100.Translations: #override \n\
None <Btn1Down>: select-start() \n\
None <Btn1Motion>:select-extend() \n\
~Ctrl ~Meta Shift <Btn1Down>: start-extend() \n\
~Ctrl ~Meta <Btn1Up>: select-end(PRIMARY, CUT_BUFFER0) \n\
~Ctrl ~Meta ~Shift <Btn3Down>: ignore() \n\
~Ctrl ~Meta ~Shift <Btn3Up>: insert-selection(SELECT, CUT_BUFFER0)

! --- https://invisible-island.net/xterm/xtoolkit/intrinsics.html#Translation_Table_Syntax
! If the modifier list has no entries it means "don't care" on all modifiers.
! If "None" is specified, it means no modifiers can be asserted.
! An exclamation point (!) at the beginning of the modifier list
means that the listed
! modifiers must be in the correct state and no other modifiers can
be asserted.
! If any modifiers are specified and an exclamation point (!) is not
specified, it means that the listed
! modifiers must be in the correct state and "don't care" about any
other modifiers.
! If a modifier is preceded by a tilde (~), it means that modifier
must not be asserted.
!
! select-start()
! This action begins text selection at the current pointer location.
! select-extend()
! This action tracks the pointer and extends the selection. It
should only be bound to Motion events.

------------ <aside> I came across the Unix Haters Handbook while
trying to figure out how to modify the xterm button behavior.. I
also have the bad habit of
What documentation was actually written—the infamous Unix “man pages”—was
really nothing more than a collection of reminders for people who
already knew
what they were doing.
------------ </aside>

XTerm*VT100.charClass: 45-47:48,95:48,126:48
! I like being able to double-click on a filename & having the text selected
! So add dash (45), period (46), slash (47), underscore (95) and tilde (126)
! to the aplhanumeric character class (48)
! man xterm
! / int charClass
! the number below the character is the character class
! notice that all the letters & digits are character class 48
!
! $ echo -n "-./_~" | od -a -td1
! 0000000 - . / _ ~
! 45 46 47 95 126
! 0000005


Regards,
Lee
Nate Bargmann
2019-04-20 23:50:01 UTC
Permalink
Post by Lee
Yeah.. I was hoping someone would give me some links to the official
documentation but apparently this is the wrong mailing list for those
kind of questions.
As I recall, "official documentation" is in the form of a multi volume
set of books. Years back I think I saw a set at a Barnes and Noble book
store. Impressive and intimidating!

Getting some basic information on the X resources system can be found
via a search engine. The Arch Wiki is a good starting point:
https://wiki.archlinux.org/index.php/x_resources

And for Xterm: https://wiki.archlinux.org/index.php/Xterm

HTH

- Nate
--
"The optimist proclaims that we live in the best of all
possible worlds. The pessimist fears this is true."

Web: http://www.n0nb.us GPG key: D55A8819 GitHub: N0NB
Loading...