Re: can't connect to server from outside LAN

2024-06-13 Thread Monte Milanuk



On 6/13/2024 10:26, Darac Marjal wrote:


On 12/06/2024 23:54, Greg Marks wrote:

The problem began a couple weeks ago; previously (and for many years)
I had been able to ssh to my server without issue.  The first time it
failed, I was using free wireless at an airport; I was able to ssh to my
server from the hotel that morning, and maybe, the first time I tried,
from the airport, but then subsequent ssh attempts from the airport
failed to connect.  I mention this only because nothing had changed in
my server's configuration when this problem began.

This is a real problem for me, as a lot of my work involves sending
files via scp between work and home.  Any suggestions about how to
troubleshoot and hopefully fix the problem will be greatly appreciated.


Have you contacted your ISP? It's possible they're blocking SSH access 
on (questionable) security grounds.


As a workaround, you could look at 
https://packages.debian.org/bookworm/sslh, which allows you to 
"multiplex" HTTPS, SSH and various other protocols all on the same 
port (the idea being that you can do "ssh -p 443 gmarks.org" as well 
as browsing to https://gmarks.org:443).



It might be worth trying something like Tailscale... with a free 
personal account, you can set it up on your home server, and if your 
work allows, on there as well.  It'll establish essentially a private 
vpn between the devices, without having to mess with any kind of port 
forwarding on your router, and bypassing any shenanigans on the part of 
your ISP.  Tailscale also has some 'fancier' SSH options, if you need 
them, but just establishing a 'direct' connection between the hosts 
without any other crap in between helps simplify things a lot.





Re: Copy from xterm to text editor........

2024-06-13 Thread Vincent Lefevre
On 2024-06-12 21:16:51 -0600, Charles Curley wrote:
> Note that this is very temporary storage. It will not put the text in
> the clipboard, nor will a clipboard stack program like clipman see it.

This can be changed with selectToClipboard:

  selectToClipboard (class SelectToClipboard)
  Tells  xterm whether to use the PRIMARY or CLIPBOARD for SELECT
  tokens in the selection mechanism.  The set-select  action  can
  change this at runtime, allowing the user to work with programs
  that  handle  only  one  of  these  mechanisms.  The default is
  “false”, which tells it to use PRIMARY.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Re: Copy from xterm to text editor........ [solved]

2024-06-13 Thread fxkl47BF
On Thu, 13 Jun 2024, Greg Wooledge wrote:

> On Thu, Jun 13, 2024 at 03:42:27PM +1000, Charlie wrote:
>> For completeness. Had tried right and left at same time on touchpad of
>> laptop. As it worked years ago.
>
> Pressing left+right buttons simultaneously was indeed one of the hacks
> that people used to mimic the middle button in some X11 setups.  I haven't
> seen that in practice in quite some time.  I think people mostly stopped
> implementing it, because two-button mice (without scroll wheels) fell
> out of the market.
>
>> Didn't think the touchpad had a middle button. Don't know why?
>
> I forgot about laptops with touchpads.  Unfortunately, this is not
> an area that I've had to research, so I don't know what the current X
> and Wayland implementations do to emulate three-button mice.  Maybe
> someone else knows, or maybe you can find some modern-day documentation
> about it on the Internet.
>
>> This works on a Dell Vostro laptop.
>>
>> Highlight the text in xterm with the left of the touchpad.
>> Cursor in highlighted text, press bottom middle of touchpad.
>>
>> This alters the block highlight. By pressing the middle of the
>> bottom of the touchpad: highlights only the lines in xterm.
>>
>> Go to text editor, in my instance: Kate. Place cursor where to paste.
>> Dialogue box comes up. Select paste and it does that.
>>
>> Doesn't work in LyX but if placed in text editor Kate first, can be
>> copied Ctrl+C, then in LyX, Ctrl+V.
>
> Since you mention xterm, you might want to read the xterm(1) man page
> and what it has to say about SELECT/PASTE and specifically what it
> says about the selectToClipboard option.  Apparently you can configure
> xterm so that what you highlight with the mouse goes into the clipboard
> instead of the selection.  Then, you could paste it with Shift-Insert
> in another application, probably.
>
> I haven't tried that myself.
>
> Another thing you could try (this one, I actually tested):
>
> 1) Install the xclip package.
> 2) Highlight (select) the text with the left button.
> 3) Run this command, anywhere in your X session:
>   xclip -o -selection primary | xclip -i -selection clipboard
> 4) Focus to the target application by clicking/mouse-moving.
> 5) Press Shift-Insert to paste the clipboard.
>
> Step 3 copies the highlighted text from the selection to the clipboard,
> and step 5 pastes from the clipboard.  This works in a large number of
> programs, including xterm, rxvt-unicode, and Google Chrome.
>
> If you find this useful, you will probably want to shorten step 3.
> You could set up a shell alias that runs this, or a shell key binding
> that runs it, or a Window Manager key binding that runs it, or any
> other clever thing you can come up with.
>


with screen you can highlight, copy, and paste with just the keyboard
i have not found a way to have screen push selections to the clipboard



Re: Why isn't the "whois" package (Priority: standard) installed by default?

2024-06-13 Thread Vincent Lefevre
On 2024-06-13 22:15:05 +0200, Javier Barroso wrote:
> Hello,
> 
> El jue., 13 jun. 2024 20:48, Vincent Lefevre  escribió:
> 
> > On 2024-06-13 14:43:25 -0400, Greg Wooledge wrote:
> > > On Thu, Jun 13, 2024 at 07:57:59PM +0200, Vincent Lefevre wrote:
> > > > The "whois" package has "Priority: standard".
> > >
> > > hobbit:~$ apt-cache show whois | grep Priority
> > > Priority: optional
> >
> > qaa:~> apt-cache show whois | grep Priority
> > Priority: optional
> > Priority: optional
> >
> > but
> >
> > qaa:~> dpkg -s whois | grep Priority
> > Priority: standard
> >
> I think it is ftpmaster override
> 
> See https://wiki.debian.org/FtpMaster/Override

Yes, but why isn't the priority of the package changed instead?

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Why isn't the "whois" package (Priority: standard) installed by default?

2024-06-13 Thread Vincent Lefevre
The "whois" package has "Priority: standard".

According to the Debian policy[*]:

  standard

These packages provide a reasonably small but not too limited
character-mode system. This is what will be installed by default
if the user doesn’t select anything else. It doesn’t include many
large applications.

Two packages that both have a priority of standard or higher must
not conflict with each other.

[*] https://www.debian.org/doc/debian-policy/ch-archive.html

So, why isn't this package installed by default?

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Re: Why isn't the "whois" package (Priority: standard) installed by default?

2024-06-13 Thread Vincent Lefevre
On 2024-06-13 14:43:25 -0400, Greg Wooledge wrote:
> On Thu, Jun 13, 2024 at 07:57:59PM +0200, Vincent Lefevre wrote:
> > The "whois" package has "Priority: standard".
> 
> hobbit:~$ apt-cache show whois | grep Priority
> Priority: optional

qaa:~> apt-cache show whois | grep Priority
Priority: optional
Priority: optional

but

qaa:~> dpkg -s whois | grep Priority
Priority: standard

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Re: systemrescuecd -- a bit off Debian topics

2024-06-13 Thread Van Snyder
Thanks to Jeff. This provides exactly what I had hoped it would.
On Thu, 2024-06-13 at 15:14 +0800, Jeff Peng wrote:
> You can use gitlab issues to submit the question.
> https://gitlab.com/systemrescue/systemrescue-sources/-/issues
> 
> regards.
> > Does anybody know how to contact systemrescuece developers? Their
> > webpage https://www.system-rescue.org/ doesn't have a "contact"
> > or"forum" button.


Re: Why isn't the "whois" package (Priority: standard) installed by default?

2024-06-13 Thread Javier Barroso
Hello,

El jue., 13 jun. 2024 20:48, Vincent Lefevre  escribió:

> On 2024-06-13 14:43:25 -0400, Greg Wooledge wrote:
> > On Thu, Jun 13, 2024 at 07:57:59PM +0200, Vincent Lefevre wrote:
> > > The "whois" package has "Priority: standard".
> >
> > hobbit:~$ apt-cache show whois | grep Priority
> > Priority: optional
>
> qaa:~> apt-cache show whois | grep Priority
> Priority: optional
> Priority: optional
>
> but
>
> qaa:~> dpkg -s whois | grep Priority
> Priority: standard
>
I think it is ftpmaster override

See https://wiki.debian.org/FtpMaster/Override

Regards


Re: system won't suspend automatically

2024-06-13 Thread eben

On 6/13/24 13:30, David Wright wrote:

Swap:0 0 0


You have no swap.


Well, that's another good reason it won't work.

1. Fix /etc/fstab so it has
PARTLABEL=swapnone   swapsw 0   0

2. Run "sudo swapon PARTLABEL=swap"

3.eben@cerberus:~$ free
 total  usedfree  shared  buff/cache   available
Mem:  32294664  27093456 2039172 5259032 8887968 52012
Swap: 50331644 050331644

Thanks.

--
 They that can give up essential liberty to
  obtain a little temporary safety deserve
 neither liberty nor safety. -- Ben Franklin



Re: system won't suspend automatically

2024-06-13 Thread David Wright
> Swap:0 0 0

You have no swap.

Cheers,
David.



Re: systemrescuecd -- a bit off Debian topics

2024-06-13 Thread Hans
Am Donnerstag, 13. Juni 2024, 00:14:09 CEST schrieb Van Snyder:


I found these at gitlab:

https://gitlab.com/systemrescue/systemrescue-sources/-/project_members[1]


[2] [3]
_Francois Dupoux _
_@fdupoux _
Direktes Mitglied von _Francois Dupoux_
Owner 

Juni 04, 2018 
Feb 02, 2019 
Juni 13, 2024 
[4] [5]
_Gerd v. Egidy _
_@gvegidy _
Direktes Mitglied von Francois Dupoux[3]
Maintainer 

März 26, 2019 
Jan 03, 2022 
Jan 14, 2024 
[6] [7]
_Marcos Mello _
_@marcosfrm _
SystemRescue[8] von Francois Dupoux[3]
Developer 

Feb 01, 2020 
März 17, 2022 
Mai 30, 2024 


Does this help?

Best

Hans

> Does anybody know how to contact systemrescuece developers? Their web
> page https://www.system-rescue.org/ doesn't have a "contact" or "forum"
> button.
> 
> My brother has impaired vision. He uses KDE Plasma because he can make
> the tool bar large. But I haven't found a way to make the toolbar large
> when I boot systemrescuecd. I think the window manager is xfce. Can the
> tool bar be made larger? If not, and you have contact with the
> systemrescuecd developers, please aske them to provide a way to make
> the toolbar and icons larger, for vision-impaired users.
> 
> Van Snyder




[1] https://gitlab.com/systemrescue/systemrescue-sources/-/project_members
[2] https://secure.gravatar.com/avatar/
8a14d565c8db63b6c83d3ca49f666b37ade67cf6f6c4bc281169197a0ce75cd9?
s=80&d=identicon&width=96
[3] https://gitlab.com/fdupoux
[4] https://secure.gravatar.com/avatar/
ee1e7e8edf35c67b068c52eb504889bb249ccae34e4d1ae96849ad00d9a99dcb?
s=80&d=identicon&width=96
[5] https://gitlab.com/gvegidy
[6] https://secure.gravatar.com/avatar/
54acaebb5339b2656c056cf3387339124e793d3f7095386756d0f1fed1cc2a18?
s=80&d=identicon&width=96
[7] https://gitlab.com/marcosfrm
[8] https://gitlab.com/groups/systemrescue


Re: Why isn't the "whois" package (Priority: standard) installed by default?

2024-06-13 Thread Greg Wooledge
On Thu, Jun 13, 2024 at 07:57:59PM +0200, Vincent Lefevre wrote:
> The "whois" package has "Priority: standard".

hobbit:~$ apt-cache show whois | grep Priority
Priority: optional



Re: system won't suspend automatically

2024-06-13 Thread eben

On 6/13/24 11:52, Max Nikulin wrote:

On 13/06/2024 21:44, e...@gmx.us wrote:


Well that's a no-go, because when you de-power the monitors,
ddccontrol gives you no info about what sleep state they're in.
Reasonable, I guess.


Perhaps there is a command to put the monitor in standby state instead of
power off. Maybe it is possible detect switched off state by reading some
file in /sys.

You still mix monitor and system issues. E.g. a media player may inhibit
 power saving for monitors. I have seen that sometimes suspend to disk
(hibernate) is blocked, but I do not know details.


It's blocked by something, to be sure.  I don't think it's a failing monitor
config script, since it doesn't get errors any more.


An obvious reason is full swap, so RAM can not be saved there. Perhaps
suspend to RAM may be blocked as well.


Swap is nearly empty, all the time.  Right now, for example:

eben@cerberus:~$ free
 total  used  freeshared  buff/cache  available
Mem:  32294664  26585308   3050572   5360560 8486244 5709356
Swap:0 0 0

eben@cerberus:~$ uptime
 12:14:13 up 4 days, 22:00,  2 users,  load average: 1.14, 1.19, 1.34

So it's not a "just booted" situation.


Do I have to tell something the UUID of the new swap partition, or does
it figure it out?


Update grub and initramfs configuration.


Right, I found this page

https://wiki.debian.org/Hibernation#Changing_or_moving_the_swap_partition

edited /etc/initramfs-tools/conf.d/resume to say

RESUME=PARTLABEL=swap

and ran "sudo update-initramfs -u".  It exited successfully, with no errors
or warnings.  That won't take effect until I boot on Saturday, and I won't
know if it worked until Sunday morning.  If I change my swap partition
again, I'll also name the new one "swap" so this might keep working.


--
 Actually, we have scientifically determined
that Heisenberg did indeed sleep exactly here.
However, we have no idea whatsoever just how fast asleep he was.
-- Dave Aronson on ASR



Re: can't connect to server from outside LAN

2024-06-13 Thread Darac Marjal


On 12/06/2024 23:54, Greg Marks wrote:

I'm running a Debian server from my home with a static IP address,
with ssh configured to use key-based authentication rather than
password-based.  As of a couple weeks ago, I have been unable to ssh to
my server from external locations.  When I ssh from a laptop connected
to the wireless network on the same router as my home server, I do
successfully connect to the server.  But when I ssh from an external
location, I get this error:

OpenSSH_8.4p1 Debian-5+deb11u3, OpenSSL 1.1.1w  11 Sep 2023
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf 
matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug2: resolve_canonicalize: hostname xxx.xxx.xxx.xxx is address
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> 
'/home/user/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> 
'/home/user/.ssh/known_hosts2'
debug2: ssh_connect_direct
debug1: Connecting to xxx.xxx.xxx.xxx [xxx.xxx.xxx.xxx] port 22.
debug1: Connection established.
debug1: identity file /home/user/.ssh/id_rsa type -1
debug1: identity file /home/user/.ssh/id_rsa-cert type -1
debug1: identity file /home/user/.ssh/id_dsa type -1
debug1: identity file /home/user/.ssh/id_dsa-cert type -1
debug1: identity file /home/user/.ssh/id_ecdsa type -1
debug1: identity file /home/user/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/user/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/user/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/user/.ssh/id_ed25519 type -1
debug1: identity file /home/user/.ssh/id_ed25519-cert type -1
debug1: identity file /home/user/.ssh/id_ed25519_sk type -1
debug1: identity file /home/user/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/user/.ssh/id_xmss type -1
debug1: identity file /home/user/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.4p1 Debian-5+deb11u3
kex_exchange_identification: read: Connection timed out
banner exchange: Connection to xxx.xxx.xxx.xxx port 22: Connection timed out

When I ping the server from external locations, I get 100% packet loss;
whereas when I ping the server from my local wireless network, there
is 0% packet loss.  (I do have nftables set to drop connections from
numerous IP addresses that have attempted hacks in the past; however,
the problem persists after flushing nftables, and at any rate, using
check-host.net and www.site24x7.com to ping my server from various
worldwide locations also results in 100% packet loss.)  Port 22 is open.
The package ufw is not installed on my server.

The apache2 Web server running on my home server is correctly hosting
my Web pages: from external locations, my Web page gmarks.org will
open in a Web browser (even though "ping -c 10 gmarks.org" shows 100%
packet loss).  Running "traceroute xxx.xxx.xxx.xxx" from external
locations reported four successful steps, not reaching my server IP,
followed by a series of "* * *" lines.

Running "sudo service sshd status" on my server shows ssh.service
is active and running.  Running "ip address show" on my server shows
nothing unusual.  I've restarted my router, and I've restarted my server;
neither helped.

The problem began a couple weeks ago; previously (and for many years)
I had been able to ssh to my server without issue.  The first time it
failed, I was using free wireless at an airport; I was able to ssh to my
server from the hotel that morning, and maybe, the first time I tried,
from the airport, but then subsequent ssh attempts from the airport
failed to connect.  I mention this only because nothing had changed in
my server's configuration when this problem began.

This is a real problem for me, as a lot of my work involves sending
files via scp between work and home.  Any suggestions about how to
troubleshoot and hopefully fix the problem will be greatly appreciated.


Have you contacted your ISP? It's possible they're blocking SSH access 
on (questionable) security grounds.


As a workaround, you could look at 
https://packages.debian.org/bookworm/sslh, which allows you to 
"multiplex" HTTPS, SSH and various other protocols all on the same port 
(the idea being that you can do "ssh -p 443 gmarks.org" as well as 
browsing to https://gmarks.org:443).





Best regards,
Greg Marks


OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: system won't suspend automatically

2024-06-13 Thread Max Nikulin

On 13/06/2024 21:44, e...@gmx.us wrote:


Well that's a no-go, because when you de-power the monitors, ddccontrol
gives you no info about what sleep state they're in.  Reasonable, I guess.


Perhaps there is a command to put the monitor in standby state instead 
of power off. Maybe it is possible detect switched off state by reading 
some file in /sys.


You still mix monitor and system issues. E.g. a media player may inhibit 
power saving for monitors. I have seen that sometimes suspend to disk 
(hibernate) is blocked, but I do not know details. An obvious reason is 
full swap, so RAM can not be saved there. Perhaps suspend to RAM may be 
blocked as well.



There wasn't room on the hard drive to just enlarge the old one without
spending a lot of time moving partitions around.  Some time then or after,
automatic suspension stopped working.  Do I have to tell something the UUID
of the new swap partition, or does it figure it out?


Update grub and initramfs configuration.




Re: Copy from xterm to text editor........ [solved]

2024-06-13 Thread Max Nikulin

On 13/06/2024 12:42, Charlie wrote:

Didn't think the touchpad had a middle button. Don't know why?


Middle click can be configured for touchpads as 2 or 3 fingers tap or as 
simultaneous press on both hardware buttons (if they exist), see the 
libinput(4) man page and

https://wayland.freedesktop.org/libinput/doc/latest/
Desktop environment may provide GUI for configuration.

Perhaps older synaptics driver allowed to treat tap in some corner as 
mouse button click.


In its early days wayland did not have primary selection, just 
clipboard. Some users and developers hate paste on middle click 
considering it insecure. Perhaps there are still wayland implementations 
supporting only clipboard.


In xterm you may configure shortcuts for both primary selection and 
clipboard copy and paste. Search for copy-selection and insert-selection 
in xterm(1). It was discussed in the following thread:


Re: Copy from Firefox and paste into Terminal with Vim. Tue, 6 Feb 2024 
18:38:46 +0100.

https://lists.debian.org/msgid-search/zcjupojxfztxh...@phare.normalesup.org



Re: system won't suspend automatically

2024-06-13 Thread eben

On 6/11/24 12:54, e...@gmx.us wrote:

On 6/11/24 12:27, Max Nikulin wrote:

On 11/06/2024 21:44, e...@gmx.us wrote:

Does anyone know how to get the monitor
state programmatically?


ddccontrol


Thanks.


However I am lost if you need to put your monitor to standby state (or to
turn it off) or you expect suspend to RAM after some period of inactivity or
when lid is closed. In the latter case check power and display settings in
your DE configuration.


I'll probably watch ddcontrol, and if the monitors go into  and
stay there for 30m or an hour, suspend.


Well that's a no-go, because when you de-power the monitors, ddccontrol
gives you no info about what sleep state they're in.  Reasonable, I guess.

So I'm back to doing it manually, until I figure out what's wrong.

Something came to mind: A while back when automatic suspension worked, I got
an error that it failed because the swap partition ran out of room.  I guess
it was doing hybrid sleep and there was too much stuff in swap already?  The
old partition was the same size as RAM, and the new one is 1.5x.  I did
these steps to upgrade:

Make a new swap partition
swapon the new one
swapoff the old one
remove the old swap partition

There wasn't room on the hard drive to just enlarge the old one without
spending a lot of time moving partitions around.  Some time then or after,
automatic suspension stopped working.  Do I have to tell something the UUID
of the new swap partition, or does it figure it out?

--
Information is more dangerous than cannon to a society ruled by lies.
--James M Dakin (from RT, S)



Re: systemctl vs service

2024-06-13 Thread mindaugas



13.06.2024 02:50, Jeff Peng пишет:

Hello

I was a bit confused, systemctl and service both are used for service 
control (start|stop|reload etc). what's the suggested way for using them?


thanks & regards.



Hello.


Just check this:

https://serverfault.com/questions/867322/what-is-the-difference-between-service-and-systemctl




Re: Copy from xterm to text editor........ [solved]

2024-06-13 Thread Aleix Piulachs
Excúseme i don’t know the xterm behavior..

El El jue, 13 jun 2024 a las 13:28, Greg Wooledge 
escribió:

> On Thu, Jun 13, 2024 at 03:42:27PM +1000, Charlie wrote:
> > For completeness. Had tried right and left at same time on touchpad of
> > laptop. As it worked years ago.
>
> Pressing left+right buttons simultaneously was indeed one of the hacks
> that people used to mimic the middle button in some X11 setups.  I haven't
> seen that in practice in quite some time.  I think people mostly stopped
> implementing it, because two-button mice (without scroll wheels) fell
> out of the market.
>
> > Didn't think the touchpad had a middle button. Don't know why?
>
> I forgot about laptops with touchpads.  Unfortunately, this is not
> an area that I've had to research, so I don't know what the current X
> and Wayland implementations do to emulate three-button mice.  Maybe
> someone else knows, or maybe you can find some modern-day documentation
> about it on the Internet.
>
> > This works on a Dell Vostro laptop.
> >
> > Highlight the text in xterm with the left of the touchpad.
> > Cursor in highlighted text, press bottom middle of touchpad.
> >
> > This alters the block highlight. By pressing the middle of the
> > bottom of the touchpad: highlights only the lines in xterm.
> >
> > Go to text editor, in my instance: Kate. Place cursor where to paste.
> > Dialogue box comes up. Select paste and it does that.
> >
> > Doesn't work in LyX but if placed in text editor Kate first, can be
> > copied Ctrl+C, then in LyX, Ctrl+V.
>
> Since you mention xterm, you might want to read the xterm(1) man page
> and what it has to say about SELECT/PASTE and specifically what it
> says about the selectToClipboard option.  Apparently you can configure
> xterm so that what you highlight with the mouse goes into the clipboard
> instead of the selection.  Then, you could paste it with Shift-Insert
> in another application, probably.
>
> I haven't tried that myself.
>
> Another thing you could try (this one, I actually tested):
>
> 1) Install the xclip package.
> 2) Highlight (select) the text with the left button.
> 3) Run this command, anywhere in your X session:
>xclip -o -selection primary | xclip -i -selection clipboard
> 4) Focus to the target application by clicking/mouse-moving.
> 5) Press Shift-Insert to paste the clipboard.
>
> Step 3 copies the highlighted text from the selection to the clipboard,
> and step 5 pastes from the clipboard.  This works in a large number of
> programs, including xterm, rxvt-unicode, and Google Chrome.
>
> If you find this useful, you will probably want to shorten step 3.
> You could set up a shell alias that runs this, or a shell key binding
> that runs it, or a Window Manager key binding that runs it, or any
> other clever thing you can come up with.
>
>


Re: Copy from xterm to text editor........ [solved]

2024-06-13 Thread Eike Lantzsch ZP5CGE / KY4PZ
On Thursday, 13 June 2024 07:27:47 -04 Greg Wooledge wrote:
> On Thu, Jun 13, 2024 at 03:42:27PM +1000, Charlie wrote:
> > For completeness. Had tried right and left at same time on touchpad
> > of laptop. As it worked years ago.
>
> Pressing left+right buttons simultaneously was indeed one of the hacks
> that people used to mimic the middle button in some X11 setups.  I
> haven't seen that in practice in quite some time.  I think people
> mostly stopped implementing it, because two-button mice (without
> scroll wheels) fell out of the market.
>
> > Didn't think the touchpad had a middle button. Don't know why?
>
> I forgot about laptops with touchpads.  Unfortunately, this is not
> an area that I've had to research, so I don't know what the current X
> and Wayland implementations do to emulate three-button mice.  Maybe
> someone else knows, or maybe you can find some modern-day
> documentation about it on the Internet.

Dear Greg,

on my TUXEDO Laptop the touchpad is configurable.
e.g. middle mouse button == tap with two fingers
or like I opted for 'tap harder onto the lower right corner' of the
touchpad.

just my 2 cents
and thanks because I learned a lot from your posts!
Kind regards
Eike

[rest skipped]





Re: systemd-tmpfiles: file globbing?

2024-06-13 Thread Greg Wooledge
On Thu, Jun 13, 2024 at 12:00:25PM +0200, Frank Van Damme wrote:
> Is there a way to apply max lifetimes to files matching a pattern? I can't
> find any way to tell it to, say, remove *.txt files older than a month from
> /tmp/foo.

If you're willing to turn away from systemd, find(1) can do this.

find /tmp/foo -type f -iname '*.txt' -mtime +31 -delete



Re: Copy from xterm to text editor........ [solved]

2024-06-13 Thread Greg Wooledge
On Thu, Jun 13, 2024 at 03:42:27PM +1000, Charlie wrote:
> For completeness. Had tried right and left at same time on touchpad of
> laptop. As it worked years ago.

Pressing left+right buttons simultaneously was indeed one of the hacks
that people used to mimic the middle button in some X11 setups.  I haven't
seen that in practice in quite some time.  I think people mostly stopped
implementing it, because two-button mice (without scroll wheels) fell
out of the market.

> Didn't think the touchpad had a middle button. Don't know why?

I forgot about laptops with touchpads.  Unfortunately, this is not
an area that I've had to research, so I don't know what the current X
and Wayland implementations do to emulate three-button mice.  Maybe
someone else knows, or maybe you can find some modern-day documentation
about it on the Internet.

> This works on a Dell Vostro laptop.
> 
> Highlight the text in xterm with the left of the touchpad.
> Cursor in highlighted text, press bottom middle of touchpad.
> 
> This alters the block highlight. By pressing the middle of the
> bottom of the touchpad: highlights only the lines in xterm.
> 
> Go to text editor, in my instance: Kate. Place cursor where to paste.
> Dialogue box comes up. Select paste and it does that.
> 
> Doesn't work in LyX but if placed in text editor Kate first, can be
> copied Ctrl+C, then in LyX, Ctrl+V.

Since you mention xterm, you might want to read the xterm(1) man page
and what it has to say about SELECT/PASTE and specifically what it
says about the selectToClipboard option.  Apparently you can configure
xterm so that what you highlight with the mouse goes into the clipboard
instead of the selection.  Then, you could paste it with Shift-Insert
in another application, probably.

I haven't tried that myself.

Another thing you could try (this one, I actually tested):

1) Install the xclip package.
2) Highlight (select) the text with the left button.
3) Run this command, anywhere in your X session:
   xclip -o -selection primary | xclip -i -selection clipboard
4) Focus to the target application by clicking/mouse-moving.
5) Press Shift-Insert to paste the clipboard.

Step 3 copies the highlighted text from the selection to the clipboard,
and step 5 pastes from the clipboard.  This works in a large number of
programs, including xterm, rxvt-unicode, and Google Chrome.

If you find this useful, you will probably want to shorten step 3.
You could set up a shell alias that runs this, or a shell key binding
that runs it, or a Window Manager key binding that runs it, or any
other clever thing you can come up with.



systemd-tmpfiles: file globbing?

2024-06-13 Thread Frank Van Damme
systemd-tmpfiles-clean will watch directories and periodically purge old
contents.

eg
d /var/cache/man 0755 man man 1w

will delete files older than a week from /var/cache/man

Is there a way to apply max lifetimes to files matching a pattern? I can't
find any way to tell it to, say, remove *.txt files older than a month from
/tmp/foo.


-- 
Frank Van Damme
Make everything as simple as possible, but not simpler. - Albert Einstein


Re: can't connect to server from outside LAN

2024-06-13 Thread Jeffrey Walton
On Wed, Jun 12, 2024 at 10:33 PM Greg Marks  wrote:
>
> I'm running a Debian server from my home with a static IP address,
> with ssh configured to use key-based authentication rather than
> password-based.  As of a couple weeks ago, I have been unable to ssh to
> my server from external locations.  When I ssh from a laptop connected
> to the wireless network on the same router as my home server, I do
> successfully connect to the server.  But when I ssh from an external
> location, I get this error:
>
>[...]
> The problem began a couple weeks ago; previously (and for many years)
> I had been able to ssh to my server without issue.  The first time it
> failed, I was using free wireless at an airport; I was able to ssh to my
> server from the hotel that morning, and maybe, the first time I tried,
> from the airport, but then subsequent ssh attempts from the airport
> failed to connect.  I mention this only because nothing had changed in
> my server's configuration when this problem began.
>
> This is a real problem for me, as a lot of my work involves sending
> files via scp between work and home.  Any suggestions about how to
> troubleshoot and hopefully fix the problem will be greatly appreciated.

In the past, I experienced similar breakages. In my case, my ISP
(Verizon) provided router updates that blew away my router config. So
I lost port forwarding to my internal servers.

I personally don't make port 22 available at the router. Instead, I
use port 1522 (first server), port 1523 (second server), etc. Then
port 1522 is forwarded to the first server on port 22, port 1523 is
forwarded to the second server on port 22, etc.

Jeff



Re: systemrescuecd -- a bit off Debian topics

2024-06-13 Thread Jeff Peng

Hi

You can use gitlab issues to submit the question.

https://gitlab.com/systemrescue/systemrescue-sources/-/issues

regards.


Does anybody know how to contact systemrescuece developers? Their web
page https://www.system-rescue.org/ doesn't have a "contact" or
"forum" button.

My brother has impaired vision. He uses KDE Plasma because he can make
the tool bar large. But I haven't found a way to make the toolbar
large when I boot systemrescuecd. I think the window manager is xfce.
Can the tool bar be made larger? If not, and you have contact with the
systemrescuecd developers, please aske them to provide a way to make
the toolbar and icons larger, for vision-impaired users.

Van Snyder




Re: Copy from xterm to text editor........ [solved]

2024-06-13 Thread Keith Bainbridge
Just a note

Some terminal emulators don't automatically copy highlighted text.  You need to 
copy it manually before moving to the target file

It's so long since I've tolerated such terminals I'm not sure but try 
ctrl-alt-c 

Else, right click with the mouse pointer outside of highlighted text and choose 
copy
-- 
All the best

Keith Bainbridge

keithr...@gmail.com
+61 (0)447 667 468

UTC+ 10:00

From my Aphone 

On 13 June 2024 3:42:27 pm AEST, Charlie  wrote:
>On Wed, 12 Jun 2024 22:56:34 -0400
>Greg Wooledge  wrote:
>
>> On Thu, Jun 13, 2024 at 12:16:00PM +1000, Charlie wrote:
>> > Cannot recall what version of Debian stopped copying text in xterm
>> > by Ctrl + C or Shift + Ctrl + C  So don't know how to copy from
>> > xterm
>> 
>> xterm is a terminal emulator.  Pressing Ctrl-C in a terminal emulator
>> simply passes a byte (0x03) to the application running inside the
>> terminal, which is usually a shell.  But they're interpreted by the
>> terminal driver layer first.  The stty command allows you to see or
>> change the bindings of control characters by the terminal driver.
>> 
>> Ctrl-C is usually bound to the 'intr' facility in the terminal driver.
>> Pressing it in a terminal sends the interrupt signal (SIGINT) to all
>> running foreground processes.  It does not copy text.  That's a
>> Windows thing, and you are not in Windows.
>> 
>> > Unable to paste  from xterm into a text editor using Ctrl + V or
>> > Shift
>> > + Ctrl + V
>> 
>> Pressing Ctrl-V in a terminal emulator sends a byte (0x16) to the
>> application.  At the terminal driver layer, Ctrl-V is usually bound
>> to the 'lnext' facility (literal next).  It's like an escape sequence
>> for keys.  The next key you press *after* Ctrl-V will lose its special
>> meaning, and will just be passed along verbatim.
>> 
>> For example, if you press Ctrl-V Ctrl-C, it won't interrupt foreground
>> processes.  Instead, it will simply pass the literal 0x03 byte to the
>> application.  It becomes data.
>> 
>> hobbit:~$ printf ^C | hd
>>   03|.|
>> 0001
>> 
>> The ^C there is where I pressed Ctrl-V Ctrl-C.
>> 
>> Now, all of that is just background information.
>> 
>> What you wanted to know, I guess, is "how to copy text between
>> terminals".
>> 
>> The first step is to highlight the text with the left mouse button.
>> Drag the mouse over the text while holding the left button.  This
>> creates a "selection" containing the text you've selected.
>> 
>> Next, click on the window that you want to paste the text *into*.  You
>> need this window to have "focus".  Depending on your window manager,
>> clicking may not actually be needed.  Some WMs use "focus follows
>> mouse", which means the mouse pointer simply has to be inside the
>> window.  Others use "click to focus" which means you have to click.
>> 
>> Once you've focused on the receiving window, press the middle mouse
>> button to paste the selection into the second window.
>> 
>> (X11 uses three-button mice.  Everything is designed around this.)
>> 
>> If your mouse is too new or too Microsoft-tainted to have three
>> buttons, then things get tricky.
>> 
>> If your mouse is literally an old PS/2 style two-button mouse from the
>> 1980s, you might be in real trouble.  There are hacks to try to mimic
>> the middle button in other ways, but you'll have to read documentation
>> to learn how to invoke them.
>> 
>> Let's assume that's not the case.
>> 
>> If your mouse has two buttons plus a scroll wheel, you might be able
>> to press the scroll wheel to act as the middle button.  Doing this
>> without also *turning* the scroll wheel takes practice.  It can be
>> done, at least sometimes.
>> 
>> So, that's how you copy and paste text between windows in X11.  You
>> select with the left button, and paste with the middle button.
>> 
>> Obviously the world can't be that simple.  While X11 was developing
>> this interface around three-button mice, Microsoft was building a
>> different interface around two-button mice.
>> 
>> In the Microsoft paradigm, you copy by highlighting the text you want
>> to copy, and then performing a second step.  That step might be
>> right-clicking a menu and selecting "Copy".  Or it might be pressing
>> Ctrl-C (but not in a terminal emulator).  Once you've performed this
>> copy operation, the text is in a "clipboard", which is separate from
>> the "selection".
>> 
>> Pasting text from the clipboard into a new window under the Microsoft
>> paradigm is done by pressing Shift-Insert.  (Or by right-clicking a
>> menu and selecting Paste, or by pressing Ctrl-V in some programs, but
>> not in terminal emulators.)
>> 
>> Some programs that you run on Debian may use the Windows paradigm and
>> put data into the clipboard instead of the selection.  For those
>> things, you can try Shift-Insert instead of the middle button.  It's
>> just another thing you might need to know/use.
>> 
>> Good luck.
>
>   Thank you to everyone 

Re: systemctl vs service

2024-06-13 Thread Jeff Peng

On 2024-06-13 08:38, Greg Wooledge wrote:



If all you want to do is stop and restart a service, they're both fine.
If you want more features, it's worth learning systemctl.


that's all right. I will check the doc of systemctl for more details. 
thanks.