Page 1 of 1

[PuppyLinux Bionic 64bit frugal] Saving session troubles

Posted: Tue Jan 19, 2021 1:26 pm
by newton1372

Good morning. I've got a 64 bit frugal distribution of Puppy Linux, the bionic one.
I've installed nodejs, but it seems that when i reboot, all my modifies are being lost.
If I go to Puppy Event Manager, in Save Session tab, i can see that PupMode =12. The Save Interval control is disabled, so I just can't change it Furthermore, no icon Save is being shown in Desktop.

How can i change PupMode, or simply, how can I save session manually before turning my pc off?


Re: [PuppyLinux Bionic 64bit frugal] Saving session troubles

Posted: Tue Jan 19, 2021 2:11 pm
by taersh

In PUPMODE=12 everything is saved immediately, as this is the PUPMODE for hard drive installation.
What kind of save do you use?
Save file or save folder?
Where is the save file / save folder?

Can yo post a screenshot of the installation partition and installation directory (where the puppy_XXX_YYY.sfs resides)?


Re: [PuppyLinux Bionic 64bit frugal] Saving session troubles

Posted: Tue Jan 19, 2021 2:37 pm
by newton1372

Hi. The first is the partition main folder (sda1)
The middle is bionicpup648.0frugal folder
The third and lowest one is bionicpup64save


Re: [PuppyLinux Bionic 64bit frugal] Saving session troubles

Posted: Tue Jan 19, 2021 2:42 pm
by taersh

Thanks.

Everything looks fine so far. Seems to be a save folder iirc.

Could you make a test, please?

Just create a file in /root like testfile.txt and then reboot.
After rebooting the file /root/testfile.txt shold still exist.

Let me know.

Please, also let me see the content of file menu.lst.


Re: [PuppyLinux Bionic 64bit frugal] Saving session troubles

Posted: Tue Jan 19, 2021 3:05 pm
by newton1372

Menu.list

# menu.lst produced by grub4dosconfig-v1.9.3
color white/blue black/cyan white/black cyan/black
#splashimage=/splash.xpm
timeout 10
default 0

# Frugal installed Puppy

title Puppy bionicpup64 8.0 (sda1/bionicpup648.0frugal)
find --set-root uuid () e130a567-cfa2-4c02-9b0e-0c08014f95c5
kernel /bionicpup648.0frugal/vmlinuz pdrv=e130a567-cfa2-4c02-9b0e-0c08014f95c5 psubdir=/bionicpup648.0frugal pmedia=atahd pfix=fsck
initrd /bionicpup648.0frugal/initrd.gz

# Windows
# this entry searches Windows on the HDD and boot it up
title Windows\nBoot up Windows if installed
errorcheck off
find --set-root --ignore-floppies --ignore-cd /bootmgr
chainloader /bootmgr
find --set-root --ignore-floppies --ignore-cd /ntldr
chainloader /ntldr
find --set-root --ignore-floppies --ignore-cd /io.sys
chainloader /io.sys
errorcheck on

# Advanced Menu
title Advanced menu
configfile /menu-advanced.lst
commandline


Re: [PuppyLinux Bionic 64bit frugal] Saving session troubles

Posted: Tue Jan 19, 2021 3:12 pm
by newton1372

I made your test and after rebooting i have found the test file in root.
But it seems that nodeJs folder has been canceled after rebooting


Re: [PuppyLinux Bionic 64bit frugal] Saving session troubles

Posted: Tue Jan 19, 2021 3:19 pm
by taersh

Ok.

The existence of the created file in /root indicates that saving is working properly as intended.
Content of menu.lst also looks fine.

The issue must be exclusively related to nodejs.

The last time you mentioned installing nodejs via wget.

Do you have a link to it, so that I could download and test?


Re: [PuppyLinux Bionic 64bit frugal] Saving session troubles

Posted: Tue Jan 19, 2021 3:27 pm
by newton1372

I followed this tutorial

https://github.com/nodejs/help/wiki/Installation

I was able to execute everything, except to

./etc/profile

NodeJs results now working, but if i reboot I obtain noting. I used the binary

node-v14.15.4-linux-x64.tar.xz


Re: [PuppyLinux Bionic 64bit frugal] Saving session troubles

Posted: Tue Jan 19, 2021 4:10 pm
by taersh

Ok,

I downloaded node-v14.15.4-linux-x64.tar.gz and extracted it.
Got a extracted directory node-v14.15.4-linux-x64
Then I created a directory /opt/nodejs.
I copied the content of directory node-v14.15.4-linux-x64 into directory /opt/nodejs.
Then in terminal I typed

Code: Select all

export PATH=/opt/nodejs/bin:$PATH; npm config

and hit enter. After this I got a config file /root/.npmrc.
Then I typed in terminal

Code: Select all

export PATH=/opt/nodejs/bin:$PATH; npm config edit

and hit enter. The MP text editor loaded the config file /root/.npmrc.

By now I don't know how to use and what to do with nodejs.
After reboot the file /root/.npmrc still exists.

I think you should post further questions to nodejs in the Bionic64 Puppy topic.
There you might get useful help and/or instructions by 666philb.
He's the developer of Bionic64 and a very helpful and expert member.


Re: [PuppyLinux Bionic 64bit frugal] Saving session troubles

Posted: Wed Jan 20, 2021 8:02 am
by newton1372

Why did you launch the "export" command twice?


Re: [PuppyLinux Bionic 64bit frugal] Saving session troubles

Posted: Wed Jan 20, 2021 8:27 am
by newton1372

I realized that the problem was not the saving, rather after rebooting the PATH parameter setted previously with Export was not being saved.
If I execute again the Export instruction, the npm command works again.

How to save PATH variables after rebooting?


Re: [PuppyLinux Bionic 64bit frugal] Saving session troubles

Posted: Wed Jan 20, 2021 11:04 am
by taersh

Create a script in /usr/sbin or /usr/bin.
Name it e.g. npm_run.
Within that script use the command with the export stuff and npm will work from that script.
You perhaps would need to do exactly with npx (npx_run) and the binary node (node_run).

Why did you launch the "export" command twice?

The export command secures that the path to node, npm and npx will be found in $PATH.
$PATH is a global system environment variable. If you call e.g. gimp and gimp would be in /usr/bin the system would search for gimp in all that system paths stored in $PATH. Usually these paths in $PATH are /bin, /usr/bin, /sbin, /usr/sbin, /usr/local/bin and /usr/local/sbin etc.pp..

You can check this by typing into a terminal

Code: Select all

echo $PATH

The command export PATH=/opt/nodejs/bin:$PATH; adds /opt/nodejs/bin to all those paths stored in $PATH.
BUT only for the current runtime of the script.

You could add this also to /etc/profile, but that's not really needed, if you would create those scripts I suggested.


Re: [PuppyLinux Bionic 64bit frugal] Saving session troubles

Posted: Wed Jan 20, 2021 12:25 pm
by taersh

Attached is a .tar.gz archive.
It contains a example script for npm_run assuming npm is stored in /opt/nodejs/bin.
After downloading, click it to extract.

NPM-Script-Example.tar.gz
(284 Bytes) Downloaded 15 times

Re: [PuppyLinux Bionic 64bit frugal] Saving session troubles

Posted: Wed Jan 20, 2021 2:36 pm
by rockedge

I download node.js then extract it to /root/my-applications and symlink to /root/my-applications/bin. Works well.


Re: [PuppyLinux Bionic 64bit frugal] Saving session troubles

Posted: Wed Jan 20, 2021 3:28 pm
by newton1372

Thanks! I solved


Re: [PuppyLinux Bionic 64bit frugal] Saving session troubles

Posted: Wed Jan 20, 2021 7:48 pm
by rockedge

@newton1372
Hey! Good news. :thumbup: