Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: Shadow_8472 on December 28, 2020, 09:41:36 PM

Title: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on December 28, 2020, 09:41:36 PM
Hi, I'm digitizing my family's photo collection, and I'm working on a Pi 3B+ (production will be on a 4 or 400).

So far, I have:
'

I worked with MicroCore a couple years ago for a project, where I learned the basics of tce and boot codes.

What I'm still working on:
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Rich on December 28, 2020, 11:00:10 PM
Hi Shadow_8472
... NFS: I want to save my pictures to an NFS share, but tce isn't being forthcoming here. I believe I saw reference to a package for the x86 architecture though.
There's a version in the TC9 repo you could try:
http://repo.tinycorelinux.net/9.x/armv7/tcz/nfs-utils.tcz.info

Fetch the following and place them in your  tce/optional  directory:
Code: [Select]
http://repo.tinycorelinux.net/9.x/armv7/tcz/nfs-utils.tcz
http://repo.tinycorelinux.net/9.x/armv7/tcz/nfs-utils.tcz.dep
http://repo.tinycorelinux.net/9.x/armv7/tcz/rpcbind.tcz
http://repo.tinycorelinux.net/9.x/armv7/tcz/rpcbind.tcz.dep
http://repo.tinycorelinux.net/9.x/armv7/tcz/libtirpc.tcz

To load it run:
Code: [Select]
tce-load -i nfs-utils
If you want the extension to load when you boot, add the following to your  tce/onboot.lst  file:
Code: [Select]
nfs-utils.tcz
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on December 29, 2020, 02:32:16 AM
Thanks! The NFS packages seem to be working, but I'm running into a less novel error a more generic Linux forum/Discord can help me with, though I'll recall it here for completeness' sake.

I copied two /etc/fstab lines by hand for two shares, one with a space in the name (I've had issues with that particular one in the past) and another without. I've checked multiple times for typos:

Quote
<NFS path> <NFS Mountpoint> nfs defaults 0 0

Transcript of error log:
Quote
$ sudo mount -a
mount.nfs: an incorrect mount option was specified
mount: mounting <NFS path> on <NFS Mountpoint> failed: Connection refused

Of note: PiCore is on a subnet: 10.0.1.x run from a custom Wi-Fi to Ethernet router. My laptop was able to access these shares over this subnet, though. I checked because the shares are IP range whitelisted.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Juanito on December 29, 2020, 04:17:29 AM
Do you need something like:
Code: [Select]
$ sudo mount.nfs -o nfsvers=3 ...
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on December 29, 2020, 05:20:35 AM
I won't go claiming I know NFS inside and out, but I want the shares mounted on boot. I've used the exact fstab lines on at least two or three other computers on the local network and wrangled successful results. But I suppose you're right: I should look into if mounting them manually turns up the same issue. I'll work on it tomorrow. Thanks for the idea.

In addition, I forgot to mention in my original post that I'd like to correct an underscan issue. I always get it when running Raspian or Raspberry OS, but I at least know it's possible to fix.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on December 29, 2020, 05:58:58 PM
No good. Manually mounting a share didn't work. I still haven't ruled out version incompatibilities.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Rich on December 29, 2020, 08:10:46 PM
Hi Shadow_8472
OK, so you loaded nfs-utils.tcz. Assuming your network is up, you also need to start the nfs client:
Code: [Select]
sudo /usr/local/etc/init.d/nfs-client start
This is the command I use to connect:
Code: [Select]
sudo mount -o v3 192.168.1.30:/home/tc /home/tc/TC4Where:
192.168.1.30  is the machine acting as a NFS server.
/home/tc  is the directory the NFS server is exporting.
/home/tc/TC4  is the local mount point on the NFS client.

If the mount command still fails, post the exact error message.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on December 29, 2020, 08:50:58 PM
I'm in! Turns out I had a trailing / in the fstab mount points, a possibility brought up on a Discord server, though I did get a time out error (the shares are hosted on spinning platter disks).

Code: [Select]
mount: RPC: Timed out
mount: mounting ... failed: Bad file descriptor

This is what happens when I don't use copy/paste.

Should I start other threads for the other issues in my original post, or should I keep it to one thread per project? I don't know what would be polite here.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Rich on December 29, 2020, 08:57:34 PM
Hi Shadow_8472
Since the subject is titled  Photo Scanning Project  you might as well continue here.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on December 29, 2020, 09:30:10 PM
I would have liked to edit the original post for a running tally of things I'm still after, but it looks like this forum doesn't support edits, so I'll just rundown my to-do list whenever something major happens.

Complete:

To Do:

Optional:
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Rich on December 29, 2020, 10:28:11 PM
Hi Shadow_8472
I would have liked to edit the original post ...
After 30 minutes you can no longer edit your posts.

Quote
Boot codes for user and hostname. I'm keeping an eye out for portability complications beteen different Pi versions, namely the Pi 4 and 400.
Take a look in  /opt/bootsync.sh.  There's probably a command in there that sets the hostname if that's acceptable.
And here's a list of Tinycore boot codes:
http://tinycorelinux.net/faq.html#bootcodes

Quote
I'd like to know if I'm working with 32 bits or 64 bits ...
It's 32 bits.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on December 29, 2020, 11:02:56 PM
...After 30 minutes you can no longer edit your posts...
It's 32 bits.

Thanks for the info. Sad to hear I won't be super-charging with >4GB of RAM. Any idea if 64 bits are in the works?

Hostname has been changed. I'm still not sure how to get bootcodes in so they're respected on all platforms. Using the function keys didn't seem to do anything during boot. I'll keep working on it. I remember saving them to a file somewhere once booted.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Rich on December 29, 2020, 11:30:56 PM
Hi Shadow_8472
... Any idea if 64 bits are in the works? ...
Yes, there's  aarch64:
http://tinycorelinux.net/12.x/aarch64/releases/RPi/
This is a list of current extensions:
http://tinycorelinux.net/12.x/aarch64/tcz/
I think it's for ARMv8 and I think it requires a Pi 4. Juanito or Paul_123 should be able to tell you for sure.

Quote
... I'll keep working on it. I remember saving them to a file somewhere once booted.
Mount the first partition (mmcblk0p1). That's where the boot loader and its config files are. According to the  README  file boot
codes are in  /mnt/mmcblk0p1/cmdline.txt (or maybe  /mnt/mmcblk0p1/cmdline3.txt).
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on December 30, 2020, 01:36:46 AM
If I remember correctly, cmdline3.txt was supposed to be for Pi 3 units.

I've found the overscan settings, working with them now... Done. Took a bunch of guesswork and reboots.

The Pi 3 I'm working on for now has an ARM7 architecture, so there's that.

It's accepted my boot code for user name, but now it wants a password I never gave it. Holding CTRL+C while it was Loading extensions... dropped me into root login, though. I'd be curious about what would have happened had I had a root password, though.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Juanito on December 30, 2020, 04:17:37 AM
I think it's for ARMv8 and I think it requires a Pi 4. Juanito or Paul_123 should be able to tell you for sure.

aarch64 will work with both RPi3 and RPi4, though I'm not sure there's much point with an RPi3.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on December 30, 2020, 05:00:43 AM
The point for me would be because I have three Pi units: 3B+, 4, and 400. The 4 is mainly serving as my family's entertainment system running LibreELEC, and my 400 is tied up running a minimal Raspian installation I've configured as a wireless to wired router.

Right now, my main concern is figuring out why adding a boot code to change my username to "shadow8472" also prompted me to enter a password I know nothing about.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Juanito on December 30, 2020, 05:49:20 AM
At least gimp is present in the aarch64 repo  ;)
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Rich on December 30, 2020, 10:16:44 AM
Hi Shadow_8472
The /etc/init.d/tc-config script has an  addUser  function that looks like this:
Code: [Select]
addUser(){
echo "${GREEN}Adding user ${YELLOW}$USER ${NORMAL}"
/usr/sbin/adduser -s /bin/sh -G staff -D "$USER"
echo "$USER":tcuser | /usr/sbin/chpasswd -m
echo -e "$USER\tALL=NOPASSWD: ALL" >> /etc/sudoers
}
If you use the  user=  boot code it will create that user with the password  tcuser.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on December 30, 2020, 04:56:23 PM
Thanks, though the ease at which I was able to drop into root concerned me. I'm going to test it. Hopefully I haven't found a glaring security flaw.

At least gimp is present in the aarch64 repo  ;)
Does Aarch64 have supported NFS? The three deal breakers for me are GIMP, NFS support, and the ability to scan.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Rich on December 30, 2020, 05:06:54 PM
Hi Shadow_8472
I don't see NFS currently listed.

You can see which extensions are currently available here:
http://tinycorelinux.net/12.x/aarch64/tcz/
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on December 30, 2020, 05:39:55 PM
...I don't see NFS currently listed.
Oof. Maybe an old version has something like what I'm working with now. The real kicker is that I have in-fact locked myself out of root by changing it to the Kali default for testing, and "tcuser" won't let me in either. I'm going to try removing the boot code from another system.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on December 30, 2020, 06:13:20 PM
Maybe an old version has something like what I'm working with now.
I looked this one up myself. Sounds like I may want to stop by for a package request.


Quote
The real kicker is that I have in-fact locked myself out of root by changing it to the Kali default for testing, and "tcuser" won't let me in either. I'm going to try removing the boot code from another system.
Operation successful. I'm back to my tc user desktop and sudo whoami returned root. Good to know


Edit: Reality check: I need to work on what I have now, or I'll be tweaking it til Kingdom come. I've recovered it to a workable state. I need to refocus on mission critical stuff unless it would really be that much better in the long run during production.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 03, 2021, 12:16:46 AM
OK, I'm coming back to this project to get a workspace I can tolerate. FLWM's sideways windows just aren't doing it for me. Where can I find a list of all available window managers in the repository? If I'm only running GIMP and a terminal, do I even need a window manager?

Requirements as I understand them:


Edit: I've looked in the keyword function in tce. Looks like it's flwm (Fast Light Window Manager), jwm (Joe's Window Manager), and one called screen (I don't know anything more about this one). Are there any more, or am I talking compiling my own?

Edit2: Looks like "screen" is aimed primarily at terminal usage. Doesn't sound like what I need.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Rich on January 03, 2021, 12:42:11 AM
Hi Shadow_8472
... FLWM's sideways windows just aren't doing it for me. ...
Yeah, I never understood why someone would want that. I use  flwm_topside.  It's the same window manager, except the
title bar is at the top where it belongs, not on the left side of the window. Download the following to your  tce/optional
directory:
Code: [Select]
flwm_topside.tcz
flwm_topside.tcz.dep
flwm_topside.tcz.md5.txt

Open your  tce/onboot.lst  file and change this:
Code: [Select]
flwm.tczto this:
Code: [Select]
flwm_topside.tcz
Reboot.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 03, 2021, 12:57:45 AM
I'm playing with Joe's Window Manager right now. I'm also not a fan of wbar, and JWM fills that niche all the same. So far, I think I can work with what I see. I read that it's configured by some kind of text file.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 03, 2021, 03:43:26 AM
Well, now. I've started poking about in GIMP, but I don't like the colorless icons. Switching to colored icons, though is proving difficult without crashing JWM. I can't get to filetool.sh to save changes before restarting. I used
Code: [Select]
sleep 15s && jwm to kick it back alive. Saving!

...

Now GIMP won't start at all. It never did find its way into the path.

Edit: I've noticed that the version of GIMP in tce is a development build. Is there a way to get tce to install a stable build?
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Juanito on January 03, 2021, 03:59:49 AM
The stable version of gimp is still gtk2 - the "development" gtk3 version has been years in the making and it seems to work fine..

What did you mean by "It never did find its way into the path"?
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 03, 2021, 04:07:52 AM
File Path. "which gimp" returns nothing and yet the program ran.

Edit: Oh, the things a reboot fixes. GIMP restartability among them.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Juanito on January 03, 2021, 05:05:16 AM
Code: [Select]
$ ls /usr/local/bin/gimp*
gimp-2.99
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 03, 2021, 05:45:00 AM
Code: [Select]
$ ls /usr/local/bin/gimp*
gimp-2.99
OK, so I'll want to make an alias.

At this point, I think I just need to figure out plugins to run SANE in GIMP or something and to make my nfs drive load on boot. Turns out /etc/fstab is one of those things that gets flushed.

Complete:

To Do:

Wishlist:
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Juanito on January 03, 2021, 06:17:53 AM
Rebuild everything in 64-bit

Only nfs-utils is missing, no?
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 03, 2021, 07:00:41 AM
I haven't looked that far into it, though what good is a tech project without something going wrong and iterative learning taking place? If/when I rebuild everything for 64 bit, I'll want a separate SD card so I can fall back to this one.

And here's my list again because new page.
Complete:
  • PiCore Installation
  • Xorg/JWM/aterm Installed
  • GIMP Installed
  • nfs-utils Installed
  • Underscan Adjusted
  • Hostname

To Do:
  • GIMP alias
  • GIMP scanning plugin(s)
  • Persistent NFS drive mounting
  • Test workflow: Scan into GIMP, save directly to NFS
  • Benchmark on Pi 4 and 400 (Units in use elsewhere)

Wishlist [Lower = less priority]:
  • Username (without locking myself out)
  • Make Ctrl+Alt+T bring up a Terminal
  • Compare JWM to FLWM_Topside, each configured to my liking
  • Rebuild everything in 64-bit
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Rich on January 03, 2021, 09:52:48 AM
Hi Shadow_8472
Well, now. I've started poking about in GIMP, but I don't like the colorless icons. Switching to colored icons, ...
Do the icons all look like little terminals?

Open a terminal and start gimp like this:
Code: [Select]
gimp-2.99Is it spitting out any warnings or errors?
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Juanito on January 03, 2021, 10:00:36 AM
nfs-utils posted to the aarch64 repo
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 03, 2021, 03:37:13 PM
Hi Shadow_8472
Well, now. I've started poking about in GIMP, but I don't like the colorless icons. Switching to colored icons, ...
Do the icons all look like little terminals?

Open a terminal and start gimp like this:
Code: [Select]
gimp-2.99Is it spitting out any warnings or errors?
Yes, a few. None that hinder apparent normal operation.
Code: [Select]
** (gimp-2.99:2195): WARNING **: <timestamp>: AT-SPI: Could not obtain desktop path or name

** (gimp-2.99:2195): WARNING **: <timestamp>: atk-bridge: GetRegisteredEvents returned message with unknown signature

** (gimp-2.99:2195): WARNING **: <timestamp>: atk-bridge: get_device_events_reply: unknown signature

** (gimp-2.99:2195): WARNING **: <timestamp>: atk-bridge: get_device_events_reply: unknown signature
GIMP-Message: Some fonts failed to load:
- /usr/local/share/gimp/2.99/fonts/

GIMP-Warning: Module '/usr/local/lib/gimp/2.99/modules/libcontroller-midi.so' load error: libasound.so.2: cannot open shared object file: No such file or directory
And it goes on about USB Optical Mouse Consumer Control, Virtual core XTEST pointer, and USB Optical Mouse Mouse being set to disabled mode. There's an error with libmng.so.2 and loading shared libraries. There's a gimp_wire_read() error. And it finishes with a bit about trying to unset GdkDevice of GimpDeviceInfo with regard to the mouse and rehashing the mouse and mouse control disable mode. Other than that, I'm copying this by hand.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Rich on January 03, 2021, 04:19:45 PM
Hi Shadow_8472
... I'm copying this by hand.
This should redirect all messages into gimp.txt
Code: [Select]
gimp-2.99 > gimp.txt 2>&1
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 03, 2021, 04:30:48 PM
Hi Shadow_8472
... I'm copying this by hand.
This should redirect all messages into gimp.txt
Code: [Select]
gimp-2.99 > gimp.txt 2>&1

I don't even have a browser on PiCore. Should I put a mount command into bootlocal.sh or bootsync.sh?
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Rich on January 03, 2021, 04:52:25 PM
Hi Shadow_8472
By redirecting the error messages into a file, you will have an accurate record of what occurred. I suppose there are several
possible ways of getting the file off of your Rpi. You could mount an NFS share and copy it there. You could copy it to the
SD card you boot from, and use another machine to read the file back. If you have a USB port available, you could plug
in a thumb drive and copy it there.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 03, 2021, 06:19:23 PM
I'm working on that. First, I want to get NFS working on boot. I've already gotten it to make a mountpoint, and I'm sputtering along in /opt/bootlocal.sh and /opt/bootsync.sh. I'll do a manual boot and get the GIMP error shortly.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 03, 2021, 06:34:41 PM
Finally got Gimp to start. I just needed a little self lesson in when to use chmod and not chown.

Code: [Select]
GEGL-Message: 23:30:26.517: Module '/usr/local/lib/gegl-0.4/sdl2-display.so' load error: libSDL2-2.0.so.0: cannot open shared object file: No such file or directory
This is a development version of GIMP.  Debug messages may appear here.


** (gimp-2.99:2201): WARNING **: 23:30:29.545: AT-SPI: Could not obtain desktop path or name


** (gimp-2.99:2201): WARNING **: 23:30:29.618: atk-bridge: GetRegisteredEvents returned message with unknown signature

** (gimp-2.99:2201): WARNING **: 23:30:30.159: atk-bridge: get_device_events_reply: unknown signature

** (gimp-2.99:2201): WARNING **: 23:30:32.108: atk-bridge: get_device_events_reply: unknown signature
GIMP-Message: Some fonts failed to load:
- /usr/local/share/gimp/2.99/fonts/

GIMP-Warning: Module '/usr/local/lib/gimp/2.99/modules/libcontroller-midi.so' load error: libasound.so.2: cannot open shared object file: No such file or directory

set device 'USB Optical Mouse  Consumer Control' to mode: disabled
set device 'Virtual core XTEST pointer' to mode: disabled
set device 'USB Optical Mouse  Mouse' to mode: disabled
/usr/local/lib/gimp/2.99/plug-ins/file-mng/file-mng: error while loading shared libraries: libmng.so.2: cannot open shared object file: No such file or directory
GIMP-WARNING: gimp-2.99: gimp_wire_read(): error

The program is running normally to the best of my knowledge, allbeit a bit slow because of the Pi 3.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Rich on January 03, 2021, 08:22:39 PM
Hi Shadow_8472
Code: [Select]
GEGL-Message: 23:30:26.517: Module '/usr/local/lib/gegl-0.4/sdl2-display.so' load error: libSDL2-2.0.so.0: cannot open shared object file: No such file or directory
Installing  SDL2.tcz  should make that stop.

Code: [Select]
GIMP-Warning: Module '/usr/local/lib/gimp/2.99/modules/libcontroller-midi.so' load error: libasound.so.2: cannot open shared object file: No such file or directory
Installing  libasound.tcz  should make that stop.

Code: [Select]
/usr/local/lib/gimp/2.99/plug-ins/file-mng/file-mng: error while loading shared libraries: libmng.so.2: cannot open shared object file: No such file or directory
Installing  libmng.tcz  should make that stop.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 03, 2021, 08:49:47 PM
I don't plan on using sound at all, so I'm fine leaving those off. I'll post the error later where JWM crashed, if I can reproduce it. I'm working on a weekly write up for my blog at the moment.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Rich on January 03, 2021, 09:19:05 PM
Hi Shadow_8472
... First, I want to get NFS working on boot. ...
Try this. Create a file called  /opt/NFSmount.sh
Code: [Select]
#!/bin/sh
# Wait for network to come up
SEC="60"
while [ $SEC -gt 0 ]
do
        SEC=$(($SEC - 1))
        ifconfig | grep -q "Bcast:" && break
        sleep 1
done
# Create your mount point
[ -d /mnt/NFS ] || mkdir /mnt/NFS
# Start NFS service
sudo /usr/local/etc/init.d/nfs-client restart
# Mount NFS share.
sudo mount -o v3 192.168.1.30:/home/tc /mnt/NFS

Make it executable:
Code: [Select]
sudo chmod 775 /opt/NFSmount.sh
Then add this to your  /opt/bootlocal.sh  file:
Code: [Select]
/opt/NFSmount.sh &
If you happen to power up your NFS server after you Rpi, you should still be able to connect by running:
Code: [Select]
/opt/NFSmount.sh
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 03, 2021, 09:42:47 PM
I don't plan on using sound at all, so I'm fine leaving those off. I'll post the error later where JWM crashed, if I can reproduce it. I'm working on a weekly write up for my blog at the moment.

Hmm, I crashed JWM again by switching the icons. No change in GIMP's log with respect to the one I already posted. Perhaps if I were to capture JWM's log.

...

Looks like starting jwm in a terminal separately after a crash has some errors: It's looking in the present directory for jwmrc-[tray|theme|keys]. I did capture a Segmentation fault, though
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Rich on January 03, 2021, 10:00:08 PM
Hi Shadow_8472
If you look in your  ~/.xsession  file you should see a line that looks like this:
Code: [Select]
"$DESKTOP" 2>/tmp/wm_errors &That's where your window manager gets started.

If it crashes, the place to look for errors is:
Code: [Select]
/tmp/wm_errors
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 03, 2021, 10:06:06 PM
Try this. Create a file called  /opt/NFSmount.sh ...

I read through your script, copied it over NFS, and adjusted ownership and permissions. I'm trying to modify it to fit my needs. I'm not entirely sure what's happening when it is making the mountpoint. By context, it looks like it's checking for the mountpoint and creating one if it returns false. I'm also a little confused about specifying NFS 3 specifically. I know the server itself can go up to 4 and even 4.1.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 03, 2021, 10:14:06 PM
...
If it crashes, the place to look for errors is:
Code: [Select]
/tmp/wm_errors

Here's the error:
Code: [Select]
shadow8472@Shadow8472-Laptop:/mnt/PhotoTrunk/Personal$ cat wm_errors
JWM: warning: /home/tc/.jwmrc[9]: invalid include: ./.jwmrc-ondemand
GEGL-Message: 03:10:51.551: Module '/usr/local/lib/gegl-0.4/sdl2-display.so' load error: libSDL2-2.0.so.0: cannot open shared object file: No such file or directory
This is a development version of GIMP.  Debug messages may appear here.


** (gimp-2.99:2109): WARNING **: 03:10:54.567: AT-SPI: Could not obtain desktop path or name


** (gimp-2.99:2109): WARNING **: 03:10:54.640: atk-bridge: GetRegisteredEvents returned message with unknown signature

** (gimp-2.99:2109): WARNING **: 03:10:55.182: atk-bridge: get_device_events_reply: unknown signature

** (gimp-2.99:2109): WARNING **: 03:10:57.153: atk-bridge: get_device_events_reply: unknown signature
GIMP-Message: Some fonts failed to load:
- /usr/local/share/gimp/2.99/fonts/

GIMP-Warning: Module '/usr/local/lib/gimp/2.99/modules/libcontroller-midi.so' load error: libasound.so.2: cannot open shared object file: No such file or directory

set device 'USB Optical Mouse  Consumer Control' to mode: disabled
set device 'Virtual core XTEST pointer' to mode: disabled
set device 'USB Optical Mouse  Mouse' to mode: disabled
/usr/local/lib/gimp/2.99/plug-ins/file-mng/file-mng: error while loading shared libraries: libmng.so.2: cannot open shared object file: No such file or directory
GIMP-WARNING: gimp-2.99: gimp_wire_read(): error
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Rich on January 03, 2021, 10:16:31 PM
Hi Shadow_8472
Code: [Select]
[ -d /mnt/NFS ] || mkdir /mnt/NFSYou mentioned creating a mount point so I included that. You are correct, the mount point is created only if it does not exist.
I think I used NFS 3 because my older machine doesn't support NFS 4. At any rate, 3 is a safe choice. Feel free to try 4 if
you feel you need to.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Rich on January 03, 2021, 10:21:29 PM
Hi Shadow_8472
Code: [Select]
JWM: warning: /home/tc/.jwmrc[9]: invalid include: ./.jwmrc-ondemand
Did you install  jwm.tcz  ondemand?  If you did, move it to  onboot.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 03, 2021, 11:42:51 PM
Hi Shadow_8472
Code: [Select]
[ -d /mnt/NFS ] || mkdir /mnt/NFSYou mentioned creating a mount point so I included that. You are correct, the mount point is created only if it does not exist.
I think I used NFS 3 because my older machine doesn't support NFS 4. At any rate, 3 is a safe choice. Feel free to try 4 if
you feel you need to.

I've just been leaving it be and letting it float however, and it's worked. Modified script is working as intended.

...
Did you install  jwm.tcz  ondemand?  If you did, move it to  onboot.

I have not yet. I'm not sure where to find it. What does it do?
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Rich on January 03, 2021, 11:44:06 PM
Hi Shadow_8472
Disregard the previous post.

Does the file  ~/.jwmrc-ondemand  exist?
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 03, 2021, 11:45:55 PM
Hi Shadow_8472
Disregard the previous post.

Does the file  ~/.jwmrc-ondemand  exist?

Yes.

And for some reason, GIMP is giving new errors. I'll go ahead and install the other packages to clean up those other errors to focus on the new ones.

Edit: Reboot fixed the inability to open, but warnings remain.
Edit2: ... And gimp-2.99 > gimp.txt no longer directs the output to the text file. echo will still divert though.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Rich on January 04, 2021, 12:03:44 AM
Hi Shadow_8472
If the file exists, I don't think you should be getting this error:
Quote
JWM: warning: /home/tc/.jwmrc[9]: invalid include: ./.jwmrc-ondemand

Does the file  ~/.jwmrc  also exist?

Do you run a backup before shutting down?
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 04, 2021, 12:05:28 AM
Hi Shadow_8472
If the file exists, I don't think you should be getting this error:
Quote
JWM: warning: /home/tc/.jwmrc[9]: invalid include: ./.jwmrc-ondemand

Does the file  ~/.jwmrc  also exist?

Do you run a backup before shutting down?

Yes, ~/.jwmrc exists, but it's empty.

I think I've been forgetting backups lately.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Rich on January 04, 2021, 12:59:40 AM
Hi Shadow_8472
Please post the results of the following commands:
Code: [Select]
showbootcodes
cat /opt/.filetool.lst
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 04, 2021, 01:19:54 AM
showbootcodes
Code: [Select]
cat /mnt/PhotoTrunk/Personal/showbootcodes
coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_headphones=1 bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1080 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  zswap.compressor=lz4 zswap.zpool=z3fold console=tty1 root=/dev/ram0 elevator=deadline rootwait quiet nortc loglevel=3 noembed

/opt/.filetool.lst
Code: [Select]
opt
home
ect/asound.conf
ect/group
ect/gshadow
ect/passwd
ect/shadow
usr/local/etc/ssh_host_dsa_key
usr/local/etc/ssh_host_dsa_key.pub
usr/local/etc/ssh_host_ecdsa_key
usr/local/etc/ssh_host_ecdsa_key.pub
usr/local/etc/ssh_host_ed25519_key
usr/local/etc/ssh_host_ed25519_key.pub
usr/local/etc/ssh_host_rsa_key
usr/local/etc/ssh_host_rsa_key.pub
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Rich on January 04, 2021, 02:23:48 AM
Hi Shadow_8472
/opt/.filetool.lst
Code: [Select]
ect/asound.conf
ect/group
ect/gshadow
ect/passwd
ect/shadow

Did you misspell  etc  or are you still copying by hand?

If your  ~/.jwm*   files have any customizations, save you changes somewhere safe.
Delete (or move) the  ~/.jwm*   files.
Run a backup:
Code: [Select]
filetool.sh -bReboot so that  jwm  recreates the  ~/.jwm*   files.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 04, 2021, 03:08:08 AM
I copied that one by hand, but the other one, I did properly.

I did customize a .jwm file to move the tray to the bottom and to show only one virtual desktop.

...

I moved the files to a directory and wow! Yeah, I'll say there was some custom theming going on there. My generic TinyCore background is gone and I have a menu button. No file regeneration took place though. Perhaps a backup and reboot.

...

Reboot appears to have regenerated things. .jwmrc-ondemand is still empty, though.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 04, 2021, 03:39:20 AM
Thanks for your help this past week. I'll be sure to mention you in my blog post. Unfortunately, I tend to burn out hard if I focus for too long on a single task, and I feel myself approaching that again. I'll try to be back in a couple days to a week. I feel tantalizingly close to getting this project actually underway, and I've been on it for a week most months for a year.

Until then, the other end is shaping up like so:
I did my first test of regular SANE and got the usual errors that get in the way of plug and play scanning. I need to adjust permissions in places I forget where.

XSANE does not appear to be in the repository. If someone's willing to compile it, might as well aim for aarch64, as I'm itching to learn that when I get a spare SD card -- I used my last one for this project as it is.

Note: I was warned that XSANE may only support 24 bit color depth, and I'm looking to work in the scanners' native 48.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Rich on January 04, 2021, 01:23:28 PM
Hi Shadow_8472
... Reboot appears to have regenerated things. .jwmrc-ondemand is still empty, though.
If you don't install extensions  ondemand , that file will be empty.

What do you mean  "is still empty" ? Earlier you stated:
... Yes, ~/.jwmrc exists, but it's empty. ...
I'm beginning to think you were being less than honest with me when you made that statement. ::)
Did you mean  ~/.jwmrc-ondemand ?
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Rich on January 04, 2021, 01:49:20 PM
Hi Shadow_8472
I just noticed this:
... Edit2: ... And gimp-2.99 > gimp.txt no longer directs the output to the text file. echo will still divert though.

That's because you didn't follow the command I originally gave you:
This should redirect all messages into gimp.txt
Code: [Select]
gimp-2.99 > gimp.txt 2>&1

That is one of the reasons this policy is in place:
Hi Shadow_8472
I would have liked to edit the original post ...
After 30 minutes you can no longer edit your posts.
When you create a new post, members will be notified of that when they click the  "Show unread posts since last visit."
link at the top of the page. When you edit a post, there is no such mechanism. Only going back and rereading previous
posts will reveal that it was edited.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 05, 2021, 08:59:13 PM
Hi Shadow_8472
... Reboot appears to have regenerated things. .jwmrc-ondemand is still empty, though.
If you don't install extensions  ondemand , that file will be empty.

What do you mean  "is still empty" ? Earlier you stated:
... Yes, ~/.jwmrc exists, but it's empty. ...
I'm beginning to think you were being less than honest with me when you made that statement. ::)
Did you mean  ~/.jwmrc-ondemand ?
Hi Shadow_8472
I just noticed this:
... Edit2: ... And gimp-2.99 > gimp.txt no longer directs the output to the text file. echo will still divert though.

That's because you didn't follow the command I originally gave you:
This should redirect all messages into gimp.txt
Code: [Select]
gimp-2.99 > gimp.txt 2>&1

That is one of the reasons this policy is in place:
Hi Shadow_8472
I would have liked to edit the original post ...
After 30 minutes you can no longer edit your posts.
When you create a new post, members will be notified of that when they click the  "Show unread posts since last visit."
link at the top of the page. When you edit a post, there is no such mechanism. Only going back and rereading previous
posts will reveal that it was edited.


My apologies on both accounts. I don't have my TinyCore install open at the moment, but I do remember several ~/.jwmrc files and one of them being empty. I do plan on coming back to this project, but another, more pressing project came up when my Manjaro box turned up with a bad kernel. Now I'm teaching myself about the chroot command to fix it. It just means I won't be returning for a work on a post next Monday.

As for the logging issue, I'm sure I ran it as you said at least one time, and I'm left with the distinct impression that it used to work without the trailing 2>&1, leading to my confusion.

Finally, forum protocol. I think I understand. I've been using Discord for so long, I'm hardly familiar with forums except for refreshing every few minutes to an hour until something comes up. If I'm the most recent post, I tend to edit as opposed to making a new reply. If it will work better, I can make incremental posts instead.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Rich on January 05, 2021, 09:44:18 PM
Hi Shadow_8472
... it used to work without the trailing 2>&1, leading to my confusion. ...
The normal output of a command (such as  ls  for example) generally goes to  stdout.
Errors generated by a command generally go to  stderr.
When running a command, both  stdout  and  stderr  will get printed in the terminal.
A terminal has 3 file descriptors, stdin, stdout, and stderr. They are also known by the numbers 0, 1, and 2.
When you run:
Code: [Select]
gimp-2.99 > gimp.txtYou are saying redirect  stdout (the 1 is implied)  to the file gimp.txt.
When you run:
Code: [Select]
gimp-2.99 > gimp.txt 2>&1You are saying redirect  2 (stderr)  into  1 (stdout)  and send the combined output into gimp.txt.
Order is important. The  2>&1  has to come after the redirection to the file.

Quote
... If it will work better, I can make incremental posts instead.
If you add relevant information you want others to see, that would be a good idea.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 11, 2021, 05:59:54 PM
I'm back this week, and I want to ditch the window manager all together. I'll be working towards booting to the command line despite xorg being present, and I want to setup a command that runs something along the lines of
Code: [Select]
startx gimp $* -- :0 vt$XDG_VTNR modified from https://linuxconfig.org/how-to-run-x-applications-without-a-desktop-or-a-wm (https://linuxconfig.org/how-to-run-x-applications-without-a-desktop-or-a-wm).

After I have X starting and closing with GIMP, I want to work on the scanner and finally scanning directly into GIMP with XSANE so long as XSANE isn't limited to 24 bit color depth as I heard it might be.

Thanks for explaining about stderr though. As it is, I have no clue if ash will handle the command as I have it. I will be reporting back as I work.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 11, 2021, 10:21:27 PM
Not much luck so far, but I can now use Ctrl+Alt+F1 for my command line. I learned it's possible to drop a window manager all together, so I've removed JWM and I'm trying to boot directly into GIMP using ~/.X.d as per instructions on the TinyCore FAQ (gimp-2.99 &). The background shows up but goes black 1/4 to 1/2 seconds later.

Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 11, 2021, 10:36:37 PM
Well, here's a development: I left X alone on boot for a while to do its own thing while I dig into the FAQ some more, and GIMP produced a debug window. It gives some instructions on how to report the bug (I don't have a clipboard installed) followed by a bunch of text I don't know how to move over here sans hand copying.

Here are three lines from the tail that pop out at me. I'm hoping they can be fixed without a window manager:
Code: [Select]
...
> GIMP-CRITICAL: gimp_create_display: assertion 'monitor == NULL || G_IS_OBJECT (monitor)' failed

> GIMP-CRITICAL: gimp_display_get_shell: assertion 'GIMP_IS_DISPLAY (display)' failed

> GIMP-CRITICAL: session_restore: assertion 'GDK_IS_MONITOR (monitor)' failed

I also have that default X cursor I've seen before. I also can't move the window around, not that I'm entirely surprised there.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: curaga on January 12, 2021, 02:57:02 AM
You do need a window manager to manage windows, ie move them around, or switch focus, or ...
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 12, 2021, 03:32:59 AM
You do need a window manager to manage windows, ie move them around, or switch focus, or ...
I figured as much, but if I'm only using the one GUI program, the only reason I'd want a window manager is if it literally could not start without one. As stated earlier in the thread, I managed to crash JWM and GIMP proper continued to run without decorations. It was even still able to bring up a preferences window, as I recall.
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 12, 2021, 03:35:39 PM
I've been doing additional research, and while I'm hardly certain, I believe my black screen problems are directly related to missing function calls a window manager normally calls. Does this sound right?
Title: Re: TinyCore/RaspberryPi Photo Scanning Project
Post by: Shadow_8472 on January 12, 2021, 05:22:05 PM
I caved after some research about Xorg. I'm switching to FLWM-Topside because it seems more stable than JWM. I'm refocusing on getting the scanner detected.
Title: digitizing old film photo negatives
Post by: gadget42 on July 24, 2022, 02:42:42 AM
digitizing old film photo negatives

didn't want to start a new thread and this one showed up in a search for "old photo" so here we are...

neat negative holder:
https://www.pixl-latr.com/

found that while i was reading these:
https://www.35mmc.com/04/03/2021/110-film-in-2021-a-guide-to-shooting-developing-and-scanning-by-bob-janes/
https://www.35mmc.com/07/09/2020/how-to-get-started-developing-black-white-film-for-25-or-less-by-sroyon-mukherjee/

also, poking around on amazon i found this review:
https://www.amazon.com/gp/customer-reviews/R1FIM7S5QHOZ2D/
for this clever portable device(you never know when you might want to digitize other family/friends/etc negatives):
https://www.amazon.com/dp/B088D2GD31/
(disclaimer: not affiliated with any amazon product and/or service)

sharing is caring

20220724-0210am-modified-added additional information/links/disclaimer