Re: I uninstalled OpenMediaVault (because totally overkill for me) and replaced it with borgbackup and rsync

2023-08-31 Thread jeremy ardley



On 1/9/23 12:44, Jason wrote:


Or how does your backup look like?



I had a QNAP NAS but it became so incredibly slow I replaced it with 
Debian using Samba and SSH.


The backups are managed by the clients, but periodically I save part of 
the NAS to Amazon S3.


I also have a remote Nextcloud server which my clients use to share a 
small working set of documents and files. It's on Akami (nee Linode) and 
is very fast in my region and pretty cheap. I used to do this on AWS but 
Linode is cheaper and simpler for my applications


I'm also in the process of converting some of my storage from Dropbox to 
Nextcloud





I uninstalled OpenMediaVault (because totally overkill for me) and replaced it with borgbackup and rsync

2023-08-31 Thread Jason

Hi

I was a user of OpenMediaVault for several years. I even donated money 
to the developer.


But very provocatively OpenMediaVault is bloatware, way too big. The 
only thing I need is a reliable backup.


I had pure Debian (minimal installation, very few packages) installed 
with borgbackup and rsync.


I am now very satisfied, much more streamlined than OpenMediaVault.

Am I wrong, are my statements completely off?

Or how does your backup look like?

cheers
Jason


OpenPGP_0x0D0C34B5DF58FE9D.asc
Description: OpenPGP public key


OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: Emacsclient bug in sid

2023-08-31 Thread John Hasler
> I would use the emacsclient command in the terminal. `emacsclient -c
> -a ""` somehow does the work, but it occupies the terminal until the
> new emacsclient frame is killed,

Try
emacsclient -c -a "" &
-- 
John Hasler 
j...@sugarbit.com
Elmwood, WI USA



Re: Emacsclient bug in sid

2023-08-31 Thread Wang Yizhen

> > After upgraded to emacs 29.1+1-5, I found that the emacsclient
> > command is not working. More specifically, the following command
> > hangs emacs in daemon forever and no emacs frame pops up:
> >
> >
> > ```
> >
> > emacsclient -c -a "" -n
> >
> > ```
>
> What exactly are you trying to do?
>
> The customary way to run emacs is to have it open on your desktop. Edit
> away. Leave it open so you can come back to it. You generally shouldn't
> have more than one emacs process per user.
>
> Having set up to use emacsclient, you (or more likely, programs
> you use such as a mail reader) can then call emacsclient so you can then
> edit files from that program in emacs. If you do it that way, you don't
> get (or need) an instance of emacs in daemon mode.
>
> 
https://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.html


Thanks for reply. Well, actually what I try to do is to keep an emacs 
daemon in the background. Whenever I finished editing, I would delete 
the frame while keeping the emacs running as daemon in the background. 
And next time when I wish to edit anything, I would use the emacsclient 
command in the terminal. `emacsclient -c -a ""` somehow does the work, 
but it occupies the terminal until the new emacsclient frame is killed, 
and that is the reason why I added the `-n` flag.



Best regards,

Yizhen



Re: Emacsclient bug in sid

2023-08-31 Thread Wang Yizhen

> After upgraded to emacs 29.1+1-5, I found that the emacsclient
> command is not working. More specifically, the following command
> hangs emacs in daemon forever and no emacs frame pops up:
> 
> 
> ```
> 
> emacsclient -c -a "" -n
> 
> ```


What exactly are you trying to do?

The customary way to run emacs is to have it open on your desktop. Edit
away. Leave it open so you can come back to it. You generally shouldn't
have more than one emacs process per user.

Having set up to use emacsclient, you (or more likely, programs
you use such as a mail reader) can then call emacsclient so you can then
edit files from that program in emacs. If you do it that way, you don't
get (or need) an instance of emacs in daemon mode.

https://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.html


Thanks for reply. Well, actually what I try to do is to keep an emacs 
daemon in the background. Whenever I finished editing, I would delete 
the frame while keeping the emacs running as daemon in the background. 
And next time when I wish to edit anything, I would use the emacsclient 
command in the terminal. `emacsclient -c -a ""` somehow does the work, 
but it occupies the terminal until the new emacsclient frame is killed, 
and that is the reason why I added the `-n` flag.



Best regards,

Yizhen


Re: Emacsclient bug in sid

2023-08-31 Thread Max Nikulin

On 01/09/2023 00:10, Wang Yizhen wrote:

emacsclient -c -a "" -n


Instead of --alternate-editor= I would consider socket activation by 
systemd user session. It ensures that emacs server process is started in 
controlled environment that does not depend on caller process.


You may try to add explicit option --display="$DISPLAY" (I am unsure 
concerning WAYLANDDISPLAY and pgtk emacs builds). Its effect is a bit 
different from standard X11 -display option and it is a reason why it is 
used in emacs .desktop files


grep Exec /usr/share/applications/emacsclient*.desktop

However I have not tried emacs-29 and it may have new bugs.



Re: Sleep: out of control

2023-08-31 Thread The Wanderer
On 2023-08-31 at 13:03, zithro wrote:

> On 31 Aug 2023 14:17, Tom Browder wrote:
>
>> Note:  The systemd "/etc/systemd/sleep.conf" file has all entries commented
>> out.
> 
> Take care, commenting may NOT be the same as disabling/setting to NO !
> 
> Each software has its own rules, but _usually_ when you comment out the
> lines, the app built-in defaults will be used (like openssh).
> Systemd behaves like that, at least that's what I observed after
> commenting out the NTP server lines of systemd-timesync.

In this case, on my system, the file in question begins with a comment
that includes the following lines:

# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.

In other words: the commented-out entries are present to document both
what the available configuration settings are, and what values will be
used for those settings if you do not set them to something else.

Leaving them commented does not set them, so unless they are somehow set
elsewhere, that means that the value shown in the comment will be used.

(Assuming that the component which handles those settings is going to
run at all, that is. As has been suggested, masking / etc. the
appropriate service would probably prevent that.)

Tom, does your version of that file not include a comment with that same
information?

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man. -- George Bernard Shaw



signature.asc
Description: OpenPGP digital signature


Re: Sleep: out of control

2023-08-31 Thread Tom Browder
On Thu, Aug 31, 2023 at 16:20 zithro  wrote:

> On 31 Aug 2023 14:17, Tom Browder wrote:
> > Note:  The systemd "/etc/systemd/sleep.conf" file has all entries
> commented
> > out.
>
> Take care, commenting may NOT be the same as disabling/setting to NO !
>
> Each software has its own rules, but _usually_ when you comment out the
> lines, the app built-in defaults will be used (like openssh).
> Systemd behaves like that, at least that's what I observed after
> commenting out the NTP server lines of systemd-timesync.
>
> You should uncomment and specify NO like what Michel Verdier posted.
> Ofc, if the units are masked/disabled, I guess those values are not
> used/read.
> But you never know, so belts and suspenders !


Yes, I agree, and I have already done that. Thanks!

-Tom

P.S. I rely on you experts because I know how much I don't know, and I
can't even guess how much else there is to know. Thanks for covering for me!

>
>


Re: Emacsclient bug in sid

2023-08-31 Thread Charles Curley
On Thu, 31 Aug 2023 23:59:11 +0200
Michel Verdier  wrote:

> According to your link and what I do myself I think you need to have a
> daemon running. And emacsclient -a="" launches it if it's missing.

You need an emacs process running in order to use emacsclient. It need
not be a daemon. -a="" will launch a daemon process if there isn't a
process already running, daemon or otherwise.

I think the main distinction between daemon and non-daemon is that in
daemon mode emacs may be running as a background task waiting for
connections over a socket, and with nothing on the display. Non-daemon
mode always has something on the display, even if minimized.

So, basically, yes. The technical writer's demand for precise language
came out.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: Emacsclient bug in sid

2023-08-31 Thread Michel Verdier
On 2023-08-31, Charles Curley wrote:

> Having set up to use emacsclient, you (or more likely, programs
> you use such as a mail reader) can then call emacsclient so you can then
> edit files from that program in emacs. If you do it that way, you don't
> get (or need) an instance of emacs in daemon mode.
>
> https://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.html

According to your link and what I do myself I think you need to have a
daemon running. And emacsclient -a="" launches it if it's missing.



Re: Emacsclient bug in sid

2023-08-31 Thread Cindy Sue Causey
On 8/31/23, Wang Yizhen  wrote:
>
> I recently noticed a bug for the emacs package in sid. I have not
> reported a bug before, so I wrote this email to seek for help.
>
> After upgraded to emacs 29.1+1-5, I found that the emacsclient command
> is not working. More specifically, the following command hangs emacs in
> daemon forever and no emacs frame pops up:
>
> ```
>
> emacsclient -c -a "" -n
>
> ```
>
> However, `emacsclient -c -a ""` summons the emacs frame properly
> although it occupies the terminal.


Hi, Yizhen. I don't have experience with emacs, am just chiming in to
rule out a long shot causative. Do you type that command by hand or
maybe arrow up and down through existing terminal history to find that
same line to reuse it all the time?

Or do you copy that line off of something that might not be using plain text?

The reason I ask is that on rare occasions, copy-and-pasting from
something like an Internet webpage or an advanced features text editor
can unintentionally introduce funky (fancy "curly") quotation marks
and parentheses [0]. Those curly things can break scripts because a
terminal can and will interpret curlies as a separate character from
the "straight" ones.

How a terminal can interpret those differently, I don't know. I just
know firsthand that it can and does. I once spent MANY HOURS fighting
a compiling failure or similar over this very thing. I finally
stumbled upon the difference in those marks' appearances when two
lines were visually different lengths in my terminal window.

The difference in my case was that I had copied a command off the
Internet and then manually retyped it later while trying to
personalize the affected command to fit my setup.

Note: The additional reason I stepped out here to ask is because those
quotation marks are in front of that "-n" [flag]. It comes to mind to
think that curly quotes could possibly mangle a flag following them,
but a terminal command could simply ignore curlies when nothing comes
after them. Hope that rationale makes at least a little sense. It does
"BKAC" (between keyboard and chair).

Afterthought: The reason something like curly quotes might suddenly
become an issue after years of no problems is that our operating
systems' code is getting "tighter" every year, i.e. less forgiving of
things that really shouldn't have ever worked in the first place.
That's a good thing that reflects on how Developers are perennially
honing their combined skills while presenting the most dependable
software packages possible... at any given nanosecond in Time.

Cindy :)

[0] https://chrisbracco.com/curly-quotes/
-- 
Talking Rock, Pickens County, Georgia, USA
* runs with birdseed *



Re: Emacsclient bug in sid

2023-08-31 Thread Charles Curley
On Fri, 1 Sep 2023 01:10:46 +0800
Wang Yizhen  wrote:

> After upgraded to emacs 29.1+1-5, I found that the emacsclient
> command is not working. More specifically, the following command
> hangs emacs in daemon forever and no emacs frame pops up:
> 
> 
> ```
> 
> emacsclient -c -a "" -n
> 
> ```

What exactly are you trying to do?

The customary way to run emacs is to have it open on your desktop. Edit
away. Leave it open so you can come back to it. You generally shouldn't
have more than one emacs process per user.

Having set up to use emacsclient, you (or more likely, programs
you use such as a mail reader) can then call emacsclient so you can then
edit files from that program in emacs. If you do it that way, you don't
get (or need) an instance of emacs in daemon mode.

https://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.html

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: Sleep: out of control

2023-08-31 Thread Tom Browder
On Thu, Aug 31, 2023 at 11:50 AM Michel Verdier  wrote:
> On 2023-08-31, Tom Browder wrote:
> > Is there a way to definitely deactivate all OS-related power changes so the
> > power button has only two functions (on/off)?
>
> To disable all sleep/suspend/hibernation I put in /etc/systemd/sleep.conf
>
> [Sleep]
> AllowSuspend=no
> AllowHibernation=no
> AllowSuspendThenHibernate=no
> AllowHybridSleep=no

Adding that, too, thanks.

-Tom



Re: Emacsclient bug in sid

2023-08-31 Thread Michael Kjörling
On 1 Sep 2023 01:10 +0800, from wang1zhe...@gmail.com (Wang Yizhen):
> I recently noticed a bug for the emacs package in sid. I have not reported a
> bug before, so I wrote this email to seek for help.

See https://www.debian.org/Bugs/ for information on the Debian bug
tracking process, including the proper process for reporting a
suspected bug. Thanks for helping to make Debian better!

-- 
Michael Kjörling 🔗 https://michael.kjorling.se
“Remember when, on the Internet, nobody cared that you were a dog?”



Emacsclient bug in sid

2023-08-31 Thread Wang Yizhen

Dear Debian-user group:


I recently noticed a bug for the emacs package in sid. I have not 
reported a bug before, so I wrote this email to seek for help.



After upgraded to emacs 29.1+1-5, I found that the emacsclient command 
is not working. More specifically, the following command hangs emacs in 
daemon forever and no emacs frame pops up:



```

emacsclient -c -a "" -n

```


However, `emacsclient -c -a ""` summons the emacs frame properly 
although it occupies the terminal.



Thanks for your help.


Best regards,

Yizhen



Re: Sleep: out of control

2023-08-31 Thread zithro

On 31 Aug 2023 14:17, Tom Browder wrote:

Note:  The systemd "/etc/systemd/sleep.conf" file has all entries commented
out.


Take care, commenting may NOT be the same as disabling/setting to NO !

Each software has its own rules, but _usually_ when you comment out the 
lines, the app built-in defaults will be used (like openssh).
Systemd behaves like that, at least that's what I observed after 
commenting out the NTP server lines of systemd-timesync.


You should uncomment and specify NO like what Michel Verdier posted.
Ofc, if the units are masked/disabled, I guess those values are not 
used/read.

But you never know, so belts and suspenders !


--
++
zithro / Cyril



Re: Sleep: out of control

2023-08-31 Thread Tom Browder
On Thu, Aug 31, 2023 at 08:12 Marco  wrote:

> Am 31.08.2023 schrieb Tom Browder :
>
> > Is there a way to definitely deactivate all OS-related power changes
> > so the power button has only two functions (on/off)?
>
> You can disable sleep/hibernate at all.
>
> sudo systemctl mask sleep.target suspend.target hibernate.target
> hybrid-sleep.target


Thanksso much, Marco, I'll give that a try and report back in a couple of
days.

-Tom


Re: Sleep: out of control

2023-08-31 Thread Michel Verdier
On 2023-08-31, Tom Browder wrote:

> Is there a way to definitely deactivate all OS-related power changes so the
> power button has only two functions (on/off)?

To disable all sleep/suspend/hibernation I put in /etc/systemd/sleep.conf

[Sleep]
AllowSuspend=no
AllowHibernation=no
AllowSuspendThenHibernate=no
AllowHybridSleep=no



Re: Sleep: out of control

2023-08-31 Thread Marco
Am 31.08.2023 schrieb Tom Browder :

> Is there a way to definitely deactivate all OS-related power changes
> so the power button has only two functions (on/off)?

You can disable sleep/hibernate at all.

sudo systemctl mask sleep.target suspend.target hibernate.target 
hybrid-sleep.target



Re: door bell like sound effect

2023-08-31 Thread songbird
Karl Vogel wrote:
> On Wed, Aug 30, 2023 at 07:55:14AM -0400, songbird wrote:
>> Karl Vogel wrote:
>> ...
>> > If nothing else, it's faster to run "locate" and look for file extensions;
>> > running "file" on that much crap took nearly 9 hours.
>> 
>> do you have SSDs or spinning rust?
>
>   I have a 256-Gb SSD and two mirrored Western Digital Blue 1.8-Tb drives.
>   About 2 million files are on SSD and the rest are on rust.
>
>   I used "file" v5.45 built from source, which does a nice job but is IO-
>   and CPU-intensive.

  mirroring is going to be quite a difference, especially 
if you are updating each file's access time (see below).


>> when i just did this:
>> # find / -type f | wc -l
>> it took all of 24 seconds for the 2.4 million files found.
>
>   Generating hashes for SSD files is faster than getting the filetype;
>   it takes about 17 minutes for 3.6 million files (153 Gbytes).  I like
>   the Blake-2 hash cuz it's fast as hell, among other things:
>
> #!/bin/ksh
> #
> export PATH=/usr/local/bin:/bin:/usr/bin
> tag=${0##*/}
> set -o nounset
> umask 022
>
> logmsg () { logger -t "$tag" "$@"; }
> die (){ logmsg "FATAL: $@"; exit 1; }
>
> work=$(mktemp -q "/tmp/$tag.work.XX")
> case "$?" in
> 0)  test -f "$work" || die "$work: tmp list file not found" ;;
> *)  die "can't create work file" ;;
> esac
>
> # Get a list of all regular files on SSD.
>
> mount | grep '^zroot' | awk '{print $3}' |
>   while read dataset
>   do
>   logmsg "listing $dataset"
>   find "$dataset" -xdev -type f -print0 >> $work
>   done
>
> # Store hashes for SSD datasets.
> # The hash file is sorted by filename to make comparisons easier.
>
> logmsg "running b2sum"
> fdbdir=$(date '+/var/fdb/%Y/%m%d')
> sort -z $work | xargs -0r b2sum -l 128 > "$fdbdir/zroot.sum"
> rm $work
> exit 0
>
>   Useful for finding changed files -- security, backups, etc.
>
>> what script did you use?
>
> #!/bin/ksh
> #
> export PATH=/usr/local/bin:/bin:/usr/bin
> set -o nounset
> tag=${0##*/}
> umask 022
>
> logmsg () { logger -t "$tag" "$@"; }
>
> work="/tmp/$tag.$$"
> fsys="/ /doc /home /usr/local /search /usr/src /dist /src"
>
> logmsg start
> find $fsys -xdev -print0 | xargs -0 file -N --mime-type > $work
> logmsg finish
>
> mv $work filetypes
> exit 0

  interesting and thanks for that.  :)

  my comments that follow are geared towards finding the
files that have been referenced and changed only in recent
times so that you are not having to process the entire 
file system.

  so the find statement would be adjusted to use -cmin or 
-amin (depending upon if i want to find changes or accessed 
files) and the file command would include the parameter 
flag -p to avoid updating the access time.


  as for the other topic of finding changed files and using
hashes is a whole different topic and one that i don't need.
this is the sort of thing that git can do so i would not
want to reinvent that if i don't really need to (which at
present i don't).  i keep track of certain directories and
that's all i need.  for directories or file systems that i
need read only i use the read only mount feature or set
permissions.


  songbird



Sleep: out of control

2023-08-31 Thread Tom Browder
My main Debian host is going to sleep and I can't awaken it without
holdiing the power button down for some period.

We have had some neighborhood power issues recently, and I have been
manually powering down while away for a few short trips (no UPS yet,
either, but my Windows box next to the Debian host [same power source] is
solidly running).

A search of the logs shows entries for power from various system sources on
a daily basis (syslog)::, but I haven't seen anything about overheating or
such. I know the internal motherboard thermal sensors work (don't ask), so
I'm not worried about real overheating.

Is there a way to definitely deactivate all OS-related power changes so the
power button has only two functions (on/off)?

Note:  The systemd "/etc/systemd/sleep.conf" file has all entries commented
out.

Thanks for any ideas.

-Tom


Re: door bell like sound effect

2023-08-31 Thread Michel Verdier
On 2023-08-30, Karl Vogel wrote:

> logmsg "running b2sum"
> fdbdir=$(date '+/var/fdb/%Y/%m%d')
> sort -z $work | xargs -0r b2sum -l 128 > "$fdbdir/zroot.sum"
> rm $work
> exit 0
>
>   Useful for finding changed files -- security, backups, etc.

tripwire from local host and stealth from remote host do this more
securely. Both are packaged.