Search found 160 matches

by miltonx
Tue Nov 05, 2024 9:31 am
Forum: Sounds
Topic: Alsa Config: multi / route - can duplicate sound and send to card, but cannot send to plug?
Replies: 8
Views: 911

Re: Alsa Config: multi / route - can duplicate sound and send to card, but cannot send to plug?


The "equal" alsa plugin has very peculiar requirements, and its implementation of "get hardware parameters" is incomplete, making it difficult to work with anything other than what it was originally designed to do: a plugin in-between alsa applications, and the hardware. In fact it is a miracle ...
by miltonx
Mon Nov 04, 2024 8:07 am
Forum: Sounds
Topic: Alsa Config: multi / route - can duplicate sound and send to card, but cannot send to plug?
Replies: 8
Views: 911

Alsa Config: multi / route - can duplicate sound and send to card, but cannot send to plug?

The aim is to set asound.conf so that audio file being played can be heard from the speaker while being recorded via 'arecord -D plughw:2,1 -f cd recording.wav'.

The idea is to duplicate the sound being played and send it to the loopback card (plughw:2,0), so that the audio can be recorded from ...
by miltonx
Sun Sep 08, 2024 1:54 pm
Forum: Scripts
Topic: Cannot change permissions by remount of NTFS?
Replies: 4
Views: 581

Re: Cannot change permissions by remount of NTFS?


You are using ntfs-3g. Try swap the kernel with newer kernel with NTFS3 kernel module support. and mount it using "-t ntfs3" parameter


I tried the latest puppyBookworm64 10.0.7 and the ntfs is still on ntfs-3g after booting, although its kernel DOES support ntfs3. I unpacked the iso's initrd.gz ...
by miltonx
Fri Sep 06, 2024 4:37 am
Forum: Scripts
Topic: Cannot change permissions by remount of NTFS?
Replies: 4
Views: 581

Cannot change permissions by remount of NTFS?

This question arises after I tried the pfix=nocopy boot option.

My frugal install is on an NTFS partition (sda2), and after booting puppy, sda2 is still mounted at /initrd/mnt/dev_save and cannot be unmounted because of the "pfix=nocopy" option. Since all my working documents are also located in ...
by miltonx
Wed Mar 06, 2024 6:51 am
Forum: KLV-Airedale
Topic: KLV-Airedale-sr8, Kernel messes with sda sdb order
Replies: 4
Views: 1432

Re: KLV-Airedale-sr8, Kernel messes with sda sdb order

I checked the drivers for the SSD and HDD, by this command:
udevadm info -a -n /dev/sda | grep -i driver
udevadm info -a -n /dev/sdb | grep -i driver
Unfortunately they use identical modules, ie sd_mod and ahci. So there is no way to load one's module earlier than the other.
But then I started to ...
by miltonx
Tue Mar 05, 2024 1:32 pm
Forum: KLV-Airedale
Topic: KLV-Airedale-sr8, Kernel messes with sda sdb order
Replies: 4
Views: 1432

Re: KLV-Airedale-sr8, Kernel messes with sda sdb order


Regarding the above two lines... almost correct, but should be this:

w_bootfrom=LABEL=a2=/klv8
w_bootfrom=UUID=xxxxxxx=/klv8
You don't refer to the partition with /mnt/sda2 (as you say the underlying system can randomly change that, which is why using either UUID or LABEL is more reliable), the ...
by miltonx
Sat Feb 03, 2024 8:57 am
Forum: KLV-Airedale
Topic: KLV-Airedale-sr8, Kernel messes with sda sdb order
Replies: 4
Views: 1432

KLV-Airedale-sr8, Kernel messes with sda sdb order

This is my grub boot menu:
search --no-floppy --set=root --label a2
linux /klv8/vmlinuz w_bootfrom=/mnt/sda2/klv8 w_changes=RAM2
initrd /klv8/initrd.gz
}

Sometimes it boots, sometimems kernel panics, failing to find /mnt/sda2/klv8.
After testing, I found that /dev/sda and /dev/sdb are randomly ...
by miltonx
Sat Feb 03, 2024 4:17 am
Forum: How-To
Topic: Debian Kernel intramfs cannot mount ntfs (in the FristRib style)? (Solved)
Replies: 3
Views: 1290

Re: Debian Kernel intramfs cannot mount ntfs (in the FristRib style)?

Sorry that I found it was my mistake. My init script did not mkdir /proc, /sys before mounting proc and sys. (The debian initrd does not have those folders).
Manually tested initramfs's 'busybox sh'. Mounting ntfs is fine, by any of these commands:
mount -t ntfs /dev/sda1 /mnt/sda1
mount -t ntfs-3g ...
by miltonx
Fri Feb 02, 2024 4:00 am
Forum: Programming
Topic: Are Kernel Sources Specific to each Kernel?
Replies: 3
Views: 991

Re: Are Kernel Sources Specific to each Kernel?


@miltonx - sources are kernel specific. Folk compiling kernels sometimes make sources & headers available (I usually do). The Kernels section of the forum has a selection.

Otherwise, you can look here (for kernels): https://archive.org/download/Puppy_Linux_Huge-Kernels

and here (for sources ...
by miltonx
Fri Feb 02, 2024 3:52 am
Forum: How-To
Topic: Debian Kernel intramfs cannot mount ntfs (in the FristRib style)? (Solved)
Replies: 3
Views: 1290

Re: Debian Kernel intramfs cannot mount ntfs (in the FristRib style)?


... Why don't you just boot your debian 11 based sfs using FirstRib initrd (rather than Debian's initramfs)? ...


Yes, I have tried the FirstRib initrd extracted from KLV sr8. It works. Since I was doing all this for experiment, I was wondering whether Debian's own kernel would work. Debian is ...
by miltonx
Thu Feb 01, 2024 9:16 am
Forum: How-To
Topic: Debian Kernel intramfs cannot mount ntfs (in the FristRib style)? (Solved)
Replies: 3
Views: 1290

Debian Kernel intramfs cannot mount ntfs (in the FristRib style)? (Solved)

I was trying to put FirstRib init file (extracted from KLV-Airedale-sr8's initrd) in Debian 11 kernel (5.10.0-8-amd64) initrd, to boot my debian 11 based sfs, only to find that the Debian11 kernel/initrd cannot mount ntfs (since my sfs frugal system is located in an ntfs drive). I modified the ...
by miltonx
Thu Feb 01, 2024 8:51 am
Forum: Programming
Topic: Are Kernel Sources Specific to each Kernel?
Replies: 3
Views: 991

Are Kernel Sources Specific to each Kernel?

When I was using fossapup64_9.5, I downloaded kernel_sources-5.4.53-fossapup64.sfs, and I remember I have complied some wifi module with that.
Now I'm running a debian11 based system, using the same vmlinuz+initrd.gz+zdrv+fdrv taken from fossapup64_9.5 (5.4.53), I wonder whether the above kernel ...
by miltonx
Thu Oct 19, 2023 8:38 am
Forum: Scripts
Topic: while read used with ffmpeg produces erroneous reading of each line (Solved)
Replies: 1
Views: 986

Re: while read used with ffmpeg produces erroneous reading of each line

Well, right after posting, I remembered that sometime in the past I hit this:
Should use -nostdin option in ffmpeg
Please refer to this:
https://superuser.com/questions/1088032 ... h-script-i

by miltonx
Thu Oct 19, 2023 8:24 am
Forum: Scripts
Topic: while read used with ffmpeg produces erroneous reading of each line (Solved)
Replies: 1
Views: 986

while read used with ffmpeg produces erroneous reading of each line (Solved)

There are several files whose paths are included in a file list (/tmp/convertimagelist, content as below)
/home/spot/Downloads/z's z's a.png
/home/spot/Downloads/z"s z"s x.jpg
/home/spot/Downloads/z's z"s y.png
/home/spot/Downloads/z's z"s z.jpg
Run this:
while read x;
do
echo "$x"
done </tmp ...
by miltonx
Wed Sep 20, 2023 2:18 am
Forum: Scripts
Topic: sed cannot wild match garbled characters when using -z option (solved)
Replies: 7
Views: 1616

Re: sed cannot wild match when using -z option


Is it my turn to say something?

Well, this code puts zz into the system root directory next to z already there. For some reason I don't like it.

Other than that, it works OK. I think it'll work for you too if you copy the ffmpeg output back. It's now a valid unicode sequence but it probably wasn ...
by miltonx
Tue Sep 19, 2023 8:36 am
Forum: Scripts
Topic: sed cannot wild match garbled characters when using -z option (solved)
Replies: 7
Views: 1616

Re: sed cannot wild match when using -z option

But I still have problem with the following sample.

There is a text file /z with content (including some garbed characters) like this:

ffmpeg version 2.8.11 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.3.0 (GCC)
configuration: --prefix=/usr --libdir=/usr/lib64 --enable ...
by miltonx
Tue Sep 19, 2023 8:22 am
Forum: Scripts
Topic: sed cannot wild match garbled characters when using -z option (solved)
Replies: 7
Views: 1616

Re: sed cannot wild match when using -z option

Burunduk wrote: Tue Sep 19, 2023 5:49 am

Works on Fossapup, same sed 4.7 as in Debian 11.

With -z sed removes line feeds too. Maybe you've just overlooked that x before the prompt string.

Code: Select all

root# echo -e 'firstline\n2ndline' | sed -z -E "s|.*|x|"
xroot#

Yes, I overlooked that x lurking there. :o :o :o

by miltonx
Tue Sep 19, 2023 3:45 am
Forum: Scripts
Topic: sed cannot wild match garbled characters when using -z option (solved)
Replies: 7
Views: 1616

sed cannot wild match garbled characters when using -z option (solved)

I tried to treat entire text as one line by using -z option, but then the .* widcard failed:
echo -e 'firstline\n2ndline' | sed -z -E "s|.*|x|"
(outputs nothing)
When -z is removed, it correctly matches:
echo -e 'firstline\n2ndline' | sed -E "s|.*|x|"
output:x
x
I'm running this on Debian 11 ...
by miltonx
Tue Oct 11, 2022 1:35 am
Forum: Scripts
Topic: Chrome run as spot script bug when html file name contains "$..." (Solved)
Replies: 5
Views: 1128

Re: Chrome run as spot script bug when html file name contains "$..."


The other problem can be single quotes in file names.
Oh, my... I just came to know that quotation marks can be used in linux file names.


However, it's easier to just change the shebang to #!/bin/bash and then:
CMD=${@@Q}

This is super neat. Exactly what I was trying to find.

For other ...
by miltonx
Wed Sep 28, 2022 3:33 am
Forum: Scripts
Topic: Chrome run as spot script bug when html file name contains "$..." (Solved)
Replies: 5
Views: 1128

Re: Chrome run as spot script bug when html file name contains "$..."

I found the chrome-as-spot to contain this line:
[ "$1" ] && while [ "$1" ]; do ARGS="$ARGS \"$1\""; shift; done
I modifed it to:
[ "$1" ] && while [ "$1" ]; do ARGS="$ARGS '$1'"; shift; done
Now it can open files whose names contain '$". But I wonder whether this modification could incur other ...
by miltonx
Wed Sep 28, 2022 3:08 am
Forum: Scripts
Topic: Chrome run as spot script bug when html file name contains "$..." (Solved)
Replies: 5
Views: 1128

Re: Chrome run as spot script bug when html file name contains "$..."


Has nothing to do with Chrome or spot and is not a bug. You need to escape any dollar sign(s) in ARGS before running /bin/sh.
Try
ARGS=${ARGS//$/\\$}
exec su spot -s /bin/sh -c "google-chrome $ARGS"


Strictly speaking, it is a bug since the run-chrome-as-spot script forgot to take into account ...
by miltonx
Tue Sep 27, 2022 7:20 am
Forum: Scripts
Topic: Chrome run as spot script bug when html file name contains "$..." (Solved)
Replies: 5
Views: 1128

Chrome run as spot script bug when html file name contains "$..." (Solved)

Most puppy distros, in order to run chrome browser as spot user, modifies chrome launch script to contain something like this:
exec su spot -s /bin/sh -c "google-chrome $ARGS"
When I try to open a local html file whose name contains "$...", for example "xxx$2yyy.html", somehow chrome removes ...
by miltonx
Fri Sep 16, 2022 8:33 am
Forum: Programming
Topic: How does Linux decide which NTFS text files are executable, and can it be customised?
Replies: 2
Views: 1786

Re: How does Linux decide which NTFS text files are executable, and can it be customised?


You can change the permissions for all of the files and dirs by remounting the file system, specifying the permissions using umask.You can search for information using Google or Duckuckgo, etc.


I would still like the .sh files and other general text files with shebang to be naturally executable ...
by miltonx
Fri Sep 16, 2022 3:18 am
Forum: Programming
Topic: How does Linux decide which NTFS text files are executable, and can it be customised?
Replies: 2
Views: 1786

How does Linux decide which NTFS text files are executable, and can it be customised?

Text files on ntfs partitions have no permission attributes, so linux by defaults sees some of them as executable, such as .sh files. But sometimes this can be annoying, eg. I often edit .yaml config files, but Linux sees them as executable too. When I double click a .yaml, it gets executed insdead ...
by miltonx
Thu Sep 15, 2022 2:53 am
Forum: Scripts
Topic: Running script from xterm in Debian then closing xterm causes weird behavior (Solved)
Replies: 3
Views: 986

Re: Running command from terminal and closing terminal causes weird behavior



Why does the script fail to observe the if condition when the command is run from xterm and then disowned and xterm closed?


It doesn't. Your script will start geany if pgrep hasn't found the PID or has encountered an error. In this case pgrep can't print the PID to the closed stdout.
If you ...
by miltonx
Wed Sep 14, 2022 9:40 am
Forum: Scripts
Topic: Running script from xterm in Debian then closing xterm causes weird behavior (Solved)
Replies: 3
Views: 986

Running script from xterm in Debian then closing xterm causes weird behavior (Solved)

This is not puppy related. Just a weird thing I noticed on my DIY-ed debian.

System: Debian Bullseye (installed via debootstrap).
Terminal: xterm
File Manager: pcmanfm
/usr/bin/sh: linked to bash

Experiment:
1. Open a leafpad window and leave it there;
2. Write a script: /root/xxxxxx.sh with these ...
by miltonx
Fri Aug 26, 2022 8:50 am
Forum: DebianDogs
Topic: How did the DD developer cut down Debian to such a small size?
Replies: 11
Views: 1688

Re: How did the DD developer cut down Debian to such a small size?

xxx.png
xxx.png (48.26 KiB) Viewed 992 times

That's an apology for a doc.
Anyway, probably not needed in most cases.

by miltonx
Thu Aug 25, 2022 9:58 am
Forum: DebianDogs
Topic: How did the DD developer cut down Debian to such a small size?
Replies: 11
Views: 1688

Re: How did the DD developer cut down Debian to such a small size?


I referred to my past experience of full debian installation, and again chrooted and installed these:

xorg xserver-xorg-core xinit xserver-xorg-video-radeon firmware-amd-graphics libgl1-mesa-dri libglx-mesa0 mesa-vulkan-drivers xserver-xorg-video-all xserver-xorg-video-ati xserver-xorg-legacy ...
by miltonx
Wed Aug 24, 2022 10:08 am
Forum: DebianDogs
Topic: How did the DD developer cut down Debian to such a small size?
Replies: 11
Views: 1688

Re: How did the DD developer cut down Debian to such a small size?


Yes, build script, but very different from woof-CE, can be found in this forum section, build system for e.g. Buster, Bullseye, Bookworm mklive-.... script)


I read the bullseye mklive script and took some lines from it, to test installing a minimal debian. Since I'm trying to make a cut-down ...
by miltonx
Thu Aug 18, 2022 4:13 am
Forum: Scripts
Topic: Puppy initrd init Script: Why umounting /dev does not break the aufs stack?
Replies: 18
Views: 2572

Re: Puppy initrd init Script: Why umounting /dev does not break the aufs stack?

Thank you for all the input.

The /dev/loop thing is a complicated thing. After reading Fred's post, I think it is too much beyond my depth.

But the SFS loading / deleting case provided by Fred is quite interesting. I was not sure whether it was because the sfs was already saved somewhere in RAM or ...

Go to advanced search