Puli 32/64 bit

A home for all kinds of Puppy related projects
Message
Author
User avatar
gjuhasz
Posts: 422
Joined: Mon 29 Sep 2008, 14:28

Preserving data between sessions

#31 Post by gjuhasz »

Sylvander wrote:Although I've used the sutdown dialog to successfully make a pulisave.4fs ... Puli fails to find the pulisave.4fs file during startup.
Puli does not deal with any pulisave.?fs (.2fs, 4fs, etc) file either at boot time or at shutdown. I am wondering if you wrote some code or installed incompatible software.
(Edit: I see in your previous post that you "installed pupsaveconfig, and used that to make a new pulisave".)
I found the /mnt/sdb1/profiles/Common/smartsave/Default.smartsave file. Should that help me?
Definitely, Combining smartsave and smartload is the "Puli standard" way to preserve the important files between sessions.
Normally, at the end, a session consists of three groups of info:
1. The content of the pup_ro2. No need to save it because it loads next time by default
2. The content of the packages installed. In Puli, there is no need to save them. Optimally they auto-load next time, too, providing that the smartload file remains the same.
3. The user data (config files, documents, other data files). They can be handled by an appropriate smartsave file to ensure that they auto-load next time. Some Puli packages already contain their own smartsave configuration. See my Minecraft.smartsave file above. Of course, you need to select Save: smart in the shutdown dialog to activate this feature, i.e., have those commands in the .smartsave files run.
No such file or directory ... eht0 doesn't auto-connect, and although it is easy to manually connect, I need it to auto-connect.
Puli uses Barry's Simple Network Setup for automatic network connection. If the automatic config fails and you need to invoke SNS, the folder contains at least one human readable "connections" file like this:

Code: Select all

eth0|Wired|tg3|pci|Broadcom Tigon3 ethernet driver |<some hexadecimal values here>||
Next time the same settings is used for auto-connection. Except if you are using another connection manager software... in which case you need to amend the Default.smartsave file accordingly.
The sound is muted despite "Retrovol/Main/Auto-mute being unticked,
Instead, please right-click the Retrovol tray icon, then in the Settings tab of the popup window, ensure that the slider is bound to the master volume control. Once you have sound, this will be saved for the next session.
When I 1st run "Menu->Internet->Web browser", only a single default Google Chrome window appears.
If I then close that and repeat, my 3 web page tabs open in a single window/page.
Is it possible to have those open as 3 separate windows?
For security reasons, only a single Chrome window is allowed in Puli with as many tabs as needed. To enable multiple Chrome windows, you can play with the killall commands at the beginning of the /usr/local/bin/defaultbrowser file
There is no such restriction for other browsers, e.g., Opera.

Have fun!

regards,

gjuhasz

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#32 Post by Sylvander »

1. "Puli does not deal with any pulisave.?fs (.2fs, 4fs, etc) file either at boot time or at shutdown. I am wondering if you wrote some code or installed incompatible software.
(Edit: I see in your previous post that you "installed pupsaveconfig, and used that to make a new pulisave".)
"
a. To eliminate such a possible cause of the problem, I used a 2nd Puppy to delete:
pulisave.4fs
Both of the backups I'd made that were located in the /sdb1/backups folder.
b. Then I booted into Puli.
c. Once there it was necessary to make the basic setup configurations [language etc].
d. I then rebooted, and during that chose to "smartsave", which appeared to go well.
e. Once back to the desktop, it was necessary to complete basic setup yet again. I could do this repeatedly and the settings were NEVER auto applied.
SOMETHING IS AMISS.
F. Do you think I need to go waaay back to the beginning, by re-doing "Copy Puli to the pendrive"?

User avatar
gjuhasz
Posts: 422
Joined: Mon 29 Sep 2008, 14:28

SOMETHING IS AMISS

#33 Post by gjuhasz »

Sylvander wrote:I deleted both of the backups I'd made that were located in the /sdb1/backups folder.
Please keep in mind that if you restore a backup file then any misconfiguration there becomes active again. So, don't backup a session until you are sure that everything works well.
Once there it was necessary to make the basic setup configurations [language etc]... I then rebooted, and during that chose to "smartsave", which appeared to go well ... Once back to the desktop, it was necessary to complete basic setup yet again. I could do this repeatedly and the settings were NEVER auto applied.

I have the following config items on my pendrive next to the puppy_puli_6.0.2.sfs file:

1. syslinux.cfg file with the following content:

Code: Select all

default vmlinuz initrd=initrd.gz pmedia=usbflash pfix=ram pkeys=hu plang=hu_HU.UTF-8
2. timezone file with the following content:

Code: Select all

Europe/Budapest
3. patch folder. I created it by clicking on the "mild" icon. In "milld" profile, this folder is empty by default but the smart save scripts will populate it with session data.
Warning! Re-clicking a profile icon purges the content of the patch folder, so the sooner, the better, its files should be copied to a "less temporary" place. I changed the default scripts behind my "mild", "rigorous", etc. icons that restores the last saved "mild", "rigorous", etc. content of my patch folder.

3. Profiles folder (I know that you already have a Common subfolder here with your favorite smartload file)
Do you think I need to go waaay back to the beginning, by re-doing "Copy Puli to the pendrive"?
Not yet. Please check the above settings first and change them appropriately (set your keyboard, language and timezone as you want only there - do not configure anything in the welcome window).

I expect that from this point, your Puli happily remembers his master's settings.

Have fun!

Regards,

gjuhasz

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#34 Post by Sylvander »

I'm working from Slacko-5.7.0, and looking at stuff on the Flash Drive to which Puli is installed:

1. "syslinux.cfg file with the following content:"
Here's mine...

Code: Select all

default vmlinuz initrd=initrd.gz pmedia=usbflash pfix=ram
I'm wondering if such stuff will look different once I boot into Puli, or once I make/save configuration changes.

2. "timezone file with the following content:"
I cannot find any timezone file.
Perhaps I'll find one once I've booted into Puli.

3. "patch folder. I created it by clicking on the "mild" icon. In "milld" profile, this folder is empty by default"
a. My mnt/sdb1/patch folder is not empty; it holds:
3 Folders: etc, root, usr.
1 File: 1-rigorous.

4. "the smart save scripts will populate it with session data"
Do you think mine has been populated?

5. "Re-clicking a profile icon purges the content of the patch folder, so the sooner, the better, its files should be copied to a "less temporary" place."
Aught I to do this?
Where, for example, would be a good "less temporary" place?
This is all strange and new to me.

6. "I changed the default scripts behind my "mild", "rigorous", etc. icons that restores the last saved "mild", "rigorous", etc. content of my patch folder."
This is beyond my comprehension.
I understand: "I changed the default scripts behind my "mild", "rigorous", etc. icons"...
But not: "...that restores the last saved "mild", "rigorous", etc. content of my patch folder.".

7. "Profiles folder (I know that you already have a Common subfolder here..."
My /mnt/sdb1/profiles/Common subfolder holds the following:
3 Folders = root, smartsave, usr.
1 File = smartload.

8. "...with your favorite smartload file)"
I don't understand why you say this is my "favorite".
So far as I know this [and its content] was not chosen by me.

9. "check the above settings first and change them appropriately (set your keyboard, language and timezone as you want only there - do not configure anything in the welcome window)"
So you are saying I should not use the [nice and easy] welcome window [YIKES!], but instead type settings within the appropriate files?!
I don't know enough to know what to type, and some of those files don't even exist at this time.

User avatar
gjuhasz
Posts: 422
Joined: Mon 29 Sep 2008, 14:28

here is mine

#35 Post by gjuhasz »

Dear Sylvander,

I am convinced that some Puli features require better explanation thus I decided to upload a demo video to Youtube soon. Together with announcing Puli 6.0.3 :)
Sylvander wrote:1) ...default vmlinuz initrd=initrd.gz pmedia=usbflash pfix=ram
2) ...I cannot find any timezone file.
According to Puli concept, the defaults are set in separate files but they may be temporarily superseded via Quicksetup, e.g., when booting Puli on a different machine. The goal is getting ourselves independent from the environment.

ad 1.) I assume that your syslinux.cfg file should be like

Code: Select all

default vmlinuz initrd=initrd.gz pmedia=usbflash pfix=ram pkeys=uk plang=en_GB
ad 2.) Unless you need to reference to GMT, your default timezone should be defined in a separate timezone file (please create it manually). I think your timezone file should contain a single line:

Code: Select all

Europe/London 
( I don't see Glasgow or Edinburgh listed in /usr/share/zoneinfo/Europe :( )

For example, in my case:
I circulate my Puli pendrive among four machines. My default pkeys=hu in syslinux.conf fits to a couple of them but I supersede this in Quicksetup either to "de (Germany)" or to "us (USA)" while working on the rest. But, plang=hu_HU.UTF-8 in syslinux.conf and Europe/Budapest in timezone remain active each case (those fields are filled up with this values when Quicksetup pops up).
...So you are saying I should not use the [nice and easy] welcome window [YIKES!], but instead type settings within the appropriate files?!
It depends... In Puli, the Quicksetuip dialog welcomes you each case, waiting for confirmation or for session-level changes.
Next time, you get your defaults again, even if you selected "Save: smart" previously.

ad 3.) You are right, the patch folder can contain different files and sub-folders when selecting different profiles.

ad 4.) Please check the Default.smartsave file. When activated, it saves your network, audio, etc. settings in the patch folder.

ad 5. and 6.) Consider using the profile-specific sub-folder, e.g., /profiles/1-rigorous/ on your pendrive. In this case you don't need to change your default script behind your profile icon, e.g., "1-rigorous".
Have fun!

ad 7.) It is the default content after installing Puli. But later you may add other items here.

ad 8.) I meant your decision about which packages should be smart-loaded at boot time. Note that in the upcoming Puli 6.0.3, you can define multiple smartload files then select your "favorite" one (or omit loading extra packages) by hitting a key while Puli boots. :wink:

Regards,

gjuhasz
Last edited by gjuhasz on Wed 22 Jul 2015, 00:17, edited 5 times in total.

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#36 Post by Sylvander »

1. "1) I assume that your syslinux.cfg file should be like"

Code: Select all

default vmlinuz initrd=initrd.gz pmedia=usbflash pfix=ram pkeys=uk plang=en_GB
I've done this, and it worked! :D
QuickSetup window now displays these settings once I get to the desktop, and it's easy just to OK these.

2. "2) The default timezone (GMT) should be redefined by a separate timezone file (create it manually). I think your timezone file should contain a single line:"

Code: Select all

Europe/London
a. This is the value I normally use. I made a /mnt/sdb1/timezone file with that code inside.
So this setting also appears in QuickSetup window.
b. All I need for all my preferred choices to be pre-set, is for "Keyboard numlock" and "Set time/date from the internet" to be pre-ticked also.
How should I do that?
c. With all of the above pre-set, even though it's something of a nuisance for QuickSetup to display at the beginning of EVERY session, at least all I'd need do is click OK to accept these.

3. "In Puli, the Quicksetuip dialog welcomes you each case, waiting for confirmation or for session-level changes."
a. OK, I can see the logic of doing this, but...
b. A "normal" Puppy usually only does this when it detects that it has been booted on hardware that is different to the previous session, and therefore needs some values re-configured.
This avoids the hassle of an un-necessary display of the QuickSetup dialog.

4. "Next time, you get your defaults again, even if you selected "Save: smart" previously."
See 3b above.
Shouldn't "Save: smart" reset the defaults to the newly configured values, and the QuickSetup dialog only display when the hardware has changed?
I suppose the present arrangement works well if/when the Flash drive is being moved around to different machines, in different timezones and languages, right?

User avatar
gjuhasz
Posts: 422
Joined: Mon 29 Sep 2008, 14:28

#37 Post by gjuhasz »

Sylvander wrote:All I need for all my preferred choices to be pre-set, is for "Keyboard numlock" and "Set time/date from the internet" to be pre-ticked also.
How should I do that?
Keyboard numlock is the default settings, regardless of what you tick in QuickSetup. If you don't need Numlock, please delete the numlockx file from /profiles/Common/root/Startup folder on the pendrive, or put an empty numlockx file (!) in the /root/Startup folder if you want to create a machine-specific backup.

Concerning auto-syncing time with internet - please copy the /usr/local/psync/timesync.sh file to /profiles/Common/root/Startup folder on the pendrive.

Note that the firewall is auto ON, too, even if its box remains unticked.
c. With all of the above pre-set, even though it's something of a nuisance for QuickSetup to display at the beginning of EVERY session, at least all I'd need do is click OK to accept these.
Correct. In Puli, the QuickSetup dialog welcomes you each case.

Have fun!

regards,

gjuhasz

gcmartin

#38 Post by gcmartin »

gjuhasz wrote:Keyboard numlock is the default settings, regardless of what you tick in QuickSetup.
This should be considered a bug if QuickSetup does not manage this as the user selects.

You might consider addressing this in the next release. Menu>Setup>Quicksetup-FirstRUN intends to allow the user proper desired settings, anytime it is used. If the system is not allowing it to do so, this is a bug.

Also, QuickSetup is NOT setting all Hostname fields when the user changes it to his preference. @BarryK fixed this bug in his last Quirky/April release.
Last edited by gcmartin on Wed 22 Jul 2015, 07:34, edited 4 times in total.

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#39 Post by Sylvander »

1. "Keyboard numlock is the default settings, regardless of what you tick in QuickSetup."
So "Keyboard numlock" is on, even though the tick-box is unticked in the QuickSetup window, right?
And even if I don't tick the box to OK that, it is still ON? That is counter-intuitive.

2. "If you don't need Numlock, please delete the numlockx file from /profiles/Common/root/Startup folder on the pendrive..."
a. I DO need numlock, and I DO have a /mnt/sdb1/profiles/Common/root/Startup/numlockx file that is empty, that I want to keep, so I will leave it as-is.

3. "...or put an empty numlockx file (!) in the /root/Startup folder if you want to create a machine-specific backup."
/root/Startup/numlockx already exists, and is empty...
Since I want to have Numlock ON in this specific machine, I should leave this file as-is, right?
I don't understand how this file existing in this location constitutes a BACKUP.
And is this "backup" auto-applied [restored?] at the start of each session on this particular hardware?
I fail to mentally grasp the significance of such things.

4. "Concerning auto-syncing time with internet - please copy the /usr/local/psync/timesync.sh file to /profiles/Common/root/Startup folder on the pendrive."
DONE.
What I don't understand, is why it is necessary to do this rather than this being done when I use the QuickSetup window [GUI], and the Psync window that results from ticking the "Set time/date from the internet" box.
Again...it seems counter-intuitive.
I mean...you surely cannot have every-single-user being personally instructed as you are doing for me here...or alternatively, the user instructions are going to be VERY detailed and complicated.

5. "Note that the firewall is auto ON, too, even if its box remains unticked."
Thank goodness the "Firewall enabled" box is ticked in my "QuickSetup" window.
I'd like to see ALL of my preferred choices already set to ON, so I only need click OK.

6. "In Puli, the QuickSetup dialog welcomes you each case."
OK, I understand, but would have preferred if you'd worded it as:
" In Puli, the QuickSetup dialog is ALWAYS auto-displayed when you reach the desktop at the beginning of each new session."
English is not your 1st language, right?
Your wording is more succinct than mine, but slightly "unusual".
I have the characteristic [fault?], that wishing to be both PRECISE and accurate, I tend to be rather long-winded. [As are Lawyers with their wordings]
Does everyone reading understand the difference between precision and accuracy I wonder?

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#40 Post by Sylvander »

1. I fancy using Puli for online banking.
Do you think it is as suitable as a multi-session DVD-RW?
I'd need WINE to be available.
Might it be OK to run a WINE SFS file?
Should I hold off doing this until I have all the Puli basics under control?
I seem to be good to go.
My WINE SFS has loaded and run OK.
Will take this further a little later.
-----------------------------------------------------
OK, was able to use WINE, and access my "Acerose Password Vaullt", and login to my online banking website.
And all with the Puli Flash Drive removed. :D

2. Is it possible to install a WINE?
If so, how? PET or SFS? If PET, which PET?
I have 3 SFS files.

3. Is it possible to [use a website perhaps, to] test that my choice of "1-rigorous" is functioning as it aught?
Does this warn when a possibly malicious connection has been attempted from outside to inside?
I'll go back to the 1st post of this thread to try to find some info on that.
OK, it barks, but then, my sound is MUTED->, so I wouldn't hear that.
OK, I've managed to un-mute the sound. :D
Will that config change be saved for following sessions?
Become permanent/default?

4. I've rebooted, and the sound has not remained un-muted.
So once agin I went to "volume->Full Window->Master", and ticked it.
How should I make this un-mute permanent?

User avatar
gjuhasz
Posts: 422
Joined: Mon 29 Sep 2008, 14:28

#41 Post by gjuhasz »

gcmartin wrote:You might consider addressing this in the next release.
Also, QuickSetup is NOT setting all Hostname fields when the user changes it to his preference. @BarryK fixed this bug in his last Quirky/April release.
Dear gcmartin,

Thanks for your suggestion. I try to improve the "Puli flavor" of Quicksetup in the next release.
About Barry's bugfix: are you referencing to /etc/printcap where the old name still appears after renaming the machine?


Dear Sylvander,
Is it possible to install a WINE? If so, how? PET or SFS? If PET, which PET?
I propose using http://www.smokey01.com/gjuhasz/package ... 1.7.21.pet if you need to run wine.
Is it possible to [use a website perhaps, to] test that my choice of "1-rigorous" is functioning as it aught?
I will send you an URL in a PM. Playing a video there generates an alarm: in Rigorous mode it will be auto-blocked in a few seconds.

Please check whether the Default.smartsave file contains the sound saving section (see my post sent on 17 Jul).
why it is necessary to do this rather than this being done when I use the QuickSetup window
In Puli, the QuickSetup window tries to connect the Internet while the network isn't set up yet. With the timesync.sh file the Startup folder, there is a better chance that it is activated during the the network connection is up. At least, it happens when the Restore procedure finishes. But if you rename it (within the Startup folder) to zztimesync.sh, then it will find a just activated eth0 at the beginning, too.
Or, use the Psync window to sync the time manually.
In Puli, the QuickSetup dialog is ALWAYS auto-displayed when you reach the desktop at the beginning of each new session.
You are right, English is not my first language - thanks for the correction, I will use your words in the next version. But, by then, please forgive me that the QuickSetup dialog warmly welcomes you to Puli each case you log in... :)

Have fun!

Regards,

gjuhasz
Last edited by gjuhasz on Mon 09 Nov 2015, 15:03, edited 1 time in total.

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#42 Post by Sylvander »

1. "I propose using www.smokey01.com/gjuhasz/sfs/wine_puli_wt-1.7.21.pet if you need to run wine. "
I cannot remember doing this, but I already have /mnt/sdb1/packages/wine_puli_wt-1.7.21.pet, so all is well.
I see it loading during Puli startup, and it runs using the winefile command.
Small problem as follows: when I run it, it asks to have 2 components installed, which I do, and that is successful, but it takes TIME.
Is it possible to avoid this?

2. "I will send you an URL in a PM. Playing a video there generates an alarm: in Rigorous mode it will be auto-blocked in a few seconds."
I completed your instructions, and it all worked:
i.e.
a. "play the same video. In a few seconds, Puli barks and the network tray icon becomes red. After another few seconds, the video is interrupted."
This worked, except it took about a minute to interrupt the video.
b. "Try to play the same video again: you will not be able to play because it is blocked. Check the /etc/suspicious_hosts file which is referencing this host."
The above happened.
In fact, I had to manually "Setup networking" once again to get re-connected to the web.

3. "Please check whether the Default.smartsave file contains the sound saving section (see my post sent on 17 Jul)."
YES, the sound saving section exists in both:
/etc/asound.state
And...
/mnt/sdb1/patch/etc/asound.state
And the 'Master Playback Volume' [in both] is set to the "value 12".
I am guessing that this explains why my sound is presently un-muted.

4. "With the timesync.sh file in the Startup folder"
I have this file in the following 3 locations:
/usr/local/psync
/root/startup
/mnt/sdb1/profiles/Common/root/Startup
The significance of this file existing in 3 locations is beyond my understanding.

5. "In Puli, the QuickSetup window tries to connect the Internet while the network isn't set up yet. With the timesync.sh file the Startup folder, there is a better chance that it is activated during the the network connection is up. At least, it happens when the Restore procedure finishes."
I've read this again and again, and I have only the vaguest grasp of its meaning/significance.
I guess it isn't good to attempt to connect to the internet and sync the clock, whilst "the network isn't set up" [whatever that means].
What is "the network" exactly?
What is "the Restore procedure"?

6. "if you rename it (within the Startup folder) to zztimesync.sh, then it will find a just activated eth0 at the beginning, too."
I feel the need to lie down in a darkened room. :roll:
Aught I to rename the file to "zztimesync.sh"?
In which location of the above listed three in item 4?
And would this make the clock auto-sync at startup?
It's all SO MUCH EASIER in a "normal" Puppy.
Must it be this complex in Puli?

User avatar
gjuhasz
Posts: 422
Joined: Mon 29 Sep 2008, 14:28

It's all SO MUCH EASIER in a "normal" Puppy.

#43 Post by gjuhasz »

Sylvander wrote: ... it asks to have 2 components installed, which I do, and that is successful, but it takes TIME. Is it possible to avoid this?
This is the default behavior of the original wine package. I never install those (obsolete) components. They are (mostly) unnecessary. Note that my wine package has winetricks built-in.
the 'Master Playback Volume' [in both] is set to the "value 12"
Please right-click the Retrovol tray icon > the Retrovol config window pops up. Here, select Tray tab > ensure that the Tray slider is associated with the Master Playback control > click Apply (names in this sequence are hardware-specific - please interpret them as appropriate). Please only run the /etc/asound.state script AFTER the above settings are successful.
The significance of this file existing in 3 locations is beyond my understanding.
/usr/local/psync is the folder where this timesync.sh script can be found in each puplet.
During bootup, Puli copies the content of /mnt/sdb1/profiles/Common/root/Startup to /root/Startup. This is why you see those files in /root/Startup, too.
I admit that you can save a few bytes by creating a "/root/Startup/zztimesync" script that looks like this:

Code: Select all

sh /usr/local/psync/timesync.sh
:wink:
Aught I to rename the file to "zztimesync.sh"?
Afrter you click OK in Quicksetup, the scripts in the /root/Startup folder are executed in alphabetic order. Among them, the zsupp script establishes the network connection. Consequently, a zztimesync or similar name script runs only after zsupp has finished, thus being able to access the time server.
Must it be this complex in Puli?
By default, Puli offers a fresh start for each session - "tabula rasa". However, there are different opportunities (patch folder, Common folder, smartload, smartsave features, backups, etc.) to remember some user settings and/or data from any of the past sessions. In Puli 6.0.3, you will see more flexible and easier-to-use configurations, for example, you will be able to select any of your pre-set boot configurations on-the-fly, during bootup.

Have fun!

Regards,

gjuhasz

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#44 Post by Sylvander »

Sorry for the late reply.
Something went wrong, I didn't receive a notification of your post.
Only found it when I decided to check.

1. " I never install those (obsolete) components. They are (mostly) unnecessary."
Tried canceling the installation of those 2 components, and the winefile command works just fine, so that's how I'll use it in future.
Learned something new. :D

2. "my wine package has winetricks built-in."
I've not heard of winetricks; any link to info on this?
What does it do?

3. "...select Tray tab > ensure that the Tray slider is associated with the Master Playback control > click Apply..."
In the Tray tab...the "Tray Slider" drop-down-box item chosen = "25:Master Playback Volume".
I then clicked "Apply".
The volume icon then changed to muted, then moved position in the tray to leftmost, then became un-muted, with the volume at 1000%.
A good result methinks.

4. "Please only run the /etc/asound.state script AFTER the above settings are successful."
So aught I to attempt to run /etc/asound.state?
I don't know how to do that.
Tried using ROX to left-click on that, but doing so only opened the file as a text file.

5. "you can save a few bytes by creating a "/root/Startup/zztimesync" script that looks like this:
Code:
sh /usr/local/psync/timesync.sh
"
Made the script file = /root/Startup/zztimesync.
It has the following content:

Code: Select all

#!/bin/sh
sh /usr/local/psync/timesync.sh
Was it incorrect to leave the extra part in?

6. "By default, Puli offers a fresh start for each session - "tabula rasa"."
"tabula rasa" = "blank slate", right?
But that is only by default.
It would be nice to be able to CHOOSE during startup whether to use "blank slate" [like puppy pfix=ram] or NOT.
Normally, I'd want to use my personalizations by default, and "blank slate" by choice [as is the "normal" Puppy method].

7. "there are different opportunities (patch folder, Common folder, smartload, smartsave features, backups, etc.) to remember some user settings and/or data from any of the past sessions."
Woa...if only I understood all of this, I might then be able to make use of it, and might think "what a wonderful way to do things".
It's surely going to be of no use to me until I DO understand.
Right now, I only understand how to drag a [/mnt/sdb1/Backups] backup onto the [/mnt/sdb1/Backups] "restore" icon...
And it's too troublesome to be forced to do that at [almost?] every session.

8. "In Puli 6.0.3, you will see more flexible and easier-to-use configurations, for example, you will be able to select any of your pre-set boot configurations on-the-fly, during bootup."
Sounds GOOD.
When will 6.0.3 be available?
Would it be possible to have the latest configuration arrangement put into effect by default, after a short [5 second?] timeout?
And the "blank slate" arrangement only put into effect if chosen?
So the user need do nothing to get their personalizations.

gcmartin

FirstRUN (Personalized Settings) bug/oversight

#45 Post by gcmartin »

GJuhasz wrote:About Barry's bugfix: are you referencing to /etc/printcap where the old name still appears after renaming the machine?
New bug discovery!

All these years of using FirstRUN with hostname facility setting, this field was overlooked and apparently untested. In the years as this FirstRUN field's handling was improved, the focus was on 4 system fields, thus, missing this field. FirstRUN, initially by @Shinobar became a central point to setting the fields properly. @BarryK took over and provided his improvements further handling this field in FirstRUN for the overall Puppy system. This intends to set the system, so that everywhere you look you would find a "consistent" hostname in Puppy Linux.

This needs reporting/resolution as every PUP with FirstRUN is missing this field's proper setting with obvious implications. Inconsistent system settings, is one.

No one else has picked up on this oversight. One, I know, has ignored it.

Thanks for bringing this to community attention! Maybe this fix can be added to WOOFCE for the next PUP builders to have.
Last edited by gcmartin on Thu 30 Jul 2015, 18:11, edited 4 times in total.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

Re: FirstRUN (Personalized Settings) bug/oversight

#46 Post by rcrsn51 »

gcmartin wrote:with obvious implications.
What would those implications be?

User avatar
gjuhasz
Posts: 422
Joined: Mon 29 Sep 2008, 14:28

Have the latest configuration arrangement put into effect by

#47 Post by gjuhasz »

Sylvander wrote:Would it be possible to have the latest configuration arrangement put into effect by default, after a short [5 second?] timeout?
And the "blank slate" arrangement only put into effect if chosen?
So the user need do nothing to get their personalizations.
Sorry for the late response. I am on vacation.
Puli 6.0.3 will be announced in a few weeks. It is ready except the Help file.
By then, for users who need to have their latest configuration arrangement put into effect by default, I propose to open their

<boot device>/profiles/Common/usr/bin/patch

file and change it as follows:

Code: Select all

#!/bin/bash
bootdev=`cat /etc/rc.d/PUPSTATE |grep PUPSFS |cut -f1 -d "," |cut -f2 -d "'"`
sync
killall -9 abiword
killall -9 gnumeric
killall -9 textmaker
killall -9 planmaker
killall -9 presentations
killall -9 soffice
killall -9 scalc
killall -9 simpress
killall -9 swriter
killall -9 xchat
killall -9 evince1
killall -9 google-chrome
killall -9 chromiumb
killall -9 chromiumv
killall -9 firefox
killall -9 opera
killall -9 skype
killall -9 gtkdialog3
killall -9 vlc
sync
echo -n hihi > valami
sync
while [ ! `cat valami |grep argument` ]; do 
sleep 1
umount /mnt/$bootdev 2>valami
sync 
done
killall -9 yaf-splash
sync
/usr/local/apps/Connect/AppRun --connect
rm valami
sync
cim=`/etc/rc.d/rc.firewall save`; vancim=`echo $cim |grep -c addresses`; csaklokal=`echo $vancim |grep -c 127.0.0.1` 
if [ $vancim == 0 ] || [ $csaklokal == 1 ]; then 

INTERFACES="eth0"
for INTERFACE in $INTERFACES #exs: wlan0 eth0
do
# ------------ last trial with eth0
 [ -d /sys/class/net/${INTERFACE}/wireless ] && continue #only want wired.

 ifconfig eth0 up > /tmp/sns_wired_log 2>&1
 [ $? -ne 0 ] && continue

 if ! ifplugstatus-0.18 "eth0" | grep -F -q 'link beat detected' ;then
  sleep 1
  if ! ifplugstatus "eth0" | grep -F -q 'link beat detected' ;then
   sleep 1
   if ! ifplugstatus-0.18 "eth0" | grep -F -q 'link beat detected' ;then
    sleep 1
    if ! ifplugstatus "eth0" | grep -F -q 'link beat detected' ;then
     sleep 1
     if ! ethtool "eth0" | grep -Fq 'Link detected: yes' ; then
      ifconfig eth0 down
      sync
      continue #no network.
     fi
    fi
   fi
  fi
 fi

 MACADDRESS="`ifconfig -a eth0 | grep -o 'HWaddr .*' | cut -f 2 -d ' '`"
 maPATTERN='|'"$MACADDRESS"'|'
 DHCPCDFIX="`grep "$maPATTERN" /tmp/sns_connections_wired | head -n 1 | cut -f 7 -d '|'`" #100325 ex: -I ''

 MODTIME1="`stat --format=%Y /etc/resolv.conf`"
 dhcpcd $DHCPCDFIX eth0 >> /tmp/sns_wired_log 2>&1
 MODTIME2="`stat --format=%Y /etc/resolv.conf`"
 [ "`grep -v '^#' /etc/resolv.conf`" == "" ] && MODTIME2=$MODTIME1 #fail.
done
sync
chown -Rf spot:spot /root/spot/
sync
 if [ "$MODTIME2" != "$MODTIME1" ];then
  echo "eth0" > /tmp/sns_interface_success #100325
  /etc/rc.d/rc.firewall save
  sync
 else
  ifconfig eth0 down
  sync
  dhcpcd --release eth0 2>/dev/null
  ip route flush dev eth0 #100703
  killall -9 yaf-splash 
  sync
  touch /root/spot/aktual
  yaf-splash -bg ref -close box -icon /usr/share/pixmaps/puli.png -timeout 10 -text "No network found!!!" &
 fi
fi 
sync
#restoring latestbackup begins here
mount /dev/$bootdev /mnt/$bootdev 
sync
sleep 1
ls -1 /mnt/$bootdev/backups/Puli_backup_* > /dev/null 2>&1
if [ "$?" = "0" ]; then
	latest=`ls -t /mnt/$bootdev/backups/Puli_backup_* | head -1`
	sync
	sleep 1
	/usr/bin/Resto $latest
	sync
	sleep 1
else
umount /mnt/$bootdev 
sync
sleep 1
yaf-splash -bg green -close never -fontsize large -timeout 5 -text "Now you can safely unplug the USB drive" &
fi
#restoring latestbackup ends here
Have fun!

Regards,

gjuhasz

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#48 Post by Sylvander »

@gjuhasz
You said:
"By then, for users who need to have their latest configuration arrangement put into effect by default, I propose to open their"

From what I take to be its meaning, I would word it as follows:
Until then, for users who need to have their latest configuration arrangement put into effect by default, I propose they should open their
Have I understood correctly?
Therefore, is my wording correct?

I have made this change.
i.e. I've replaced all of the content of the file with the new code you posted.
So far I see no obvious change/difference.
I assume I would see the difference if I understood its workings.

User avatar
gjuhasz
Posts: 422
Joined: Mon 29 Sep 2008, 14:28

Restore latest backup

#49 Post by gjuhasz »

Sylvander wrote:I've replaced all of the content of the file with the new code you posted.
So far I see no obvious change/difference.
I assume I would see the difference if I understood its workings.
The default name of a backup file is

Puli_backup_<YYYY>_<MM>_<DD>_<HH>_<MM>.tar.gz,

e.g., Puli_backup_2015_08_14_12_26.tar.gz

Their default place is on the boot device, in the /backups folder,

so the full path is like

/mnt/sdb1/backups/Puli_backup_2015_08_14_12_26.tar.gz

You may rename your backup files, however. Modifying the following lines allows the above script to find the latest backup file even if it has been renamed:

Change from

Code: Select all

ls -1 /mnt/$bootdev/backups/Puli_backup_* > /dev/null 2>&1 
if [ "$?" = "0" ]; then 
   latest=`ls -t /mnt/$bootdev/backups/Puli_backup_* | head -1` 
   sync 
to

Code: Select all

ls -1 /mnt/$bootdev/backups/*.tar.gz > /dev/null 2>&1 
if [ "$?" = "0" ]; then 
   latest=`ls -t /mnt/$bootdev/backups/*.tar.gz | head -1` 
   sync


Please also check if you have a

/patch/usr/bin/patch

file on your boot device. If yes, this is possibly an ancient copy, so please simply delete the file (not the /patch folder) or update it as proposed above.

Have fun!

Regards,

gjuhasz

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#50 Post by Sylvander »

1. "/mnt/sdb1/backups/Puli_backup_2015_08_14_12_26.tar.gz"
I have a backup file in this location, with a name of this form.
I'm guessing that the code within the /mnt/sdb1/profiles/Common/usr/bin/patch file auto-restores the /mnt/sdb1/backups/Puli_backup_<YYYY>_<MM>_<DD>_<HH>_<MM>.tar.gz file, right?
Hence, I should now see the effect of this backup being auto-restored as the desktop is reached during startup, right?
----------------------------------------
Well...I now see the dialog come up on screen that asks if I want to restore my backup file, which is NICE. :D
BUT...
Problem...
It only displays AFTER I manually make the few remaining configuration choices in the welcome dialog. :(
And then it is SLOW to display after this. :(
----------------------------------------

2. "Modifying the following lines allows the above script to find the latest backup file even if it has been renamed:"
Within the file /mnt/sdb1/profiles/Common/usr/bin/patch, I changed those lines of code as you specified.

3. "Please also check if you have a
/patch/usr/bin/patch
file on your boot device.
"
I don't even have a /mnt/sdb1/patch/usr/bin folder, therefore I have no /mnt/sdb1/patch/usr/bin/patch file.

Post Reply