Posted: Fri 04 Nov 2011, 20:21
Version 2.8 released. Checks and waits for wifi if using autostart.
READ-ONLY Archive
https://oldforum.puppylinux.com/
Code: Select all
[ ! "`grep 'ntp 123/tcp' /etc/services`" ] && echo -e "ntp 123/tcp\nntp 123/udp" >> /etc/services
Code: Select all
ls -l
Binary of ntpdate does not exist inside sap 5.95BarryK wrote:Psync 2.8 is in the latest Squeezed Arm Puppy (sap) for the Raspberry Pi:
http://bkhome.org/blog/?viewDetailed=02874
...anyone with a RP is invited to test Psync in that environment.
I have remedied that! version 5.96 (alpha2) has been uploaded, see my blog announcement:jamesbond wrote:Binary of ntpdate does not exist inside sap 5.95BarryK wrote:Psync 2.8 is in the latest Squeezed Arm Puppy (sap) for the Raspberry Pi:
http://bkhome.org/blog/?viewDetailed=02874
...anyone with a RP is invited to test Psync in that environment.
Code: Select all
<input file stock=\"gtk-execute\"></input>
Code: Select all
<hbox>
<button>
<input file stock=\"gtk-help\"></input>
<label>$(gettext 'Help')</label>
<action> $BROWSER /usr/share/doc/psync.html &</action>
</button>
<button>
<input file stock=\"gtk-quit\"></input>
<label>$(gettext 'Cancel')</label>
</button>
</hbox>
Yes, that fix was from the code that I merged from Argolance, so we have Argolance to thank for that.OscarTalks wrote:LATER:- Ah, I see the version 2.9x by npierce above has the icon fix plus some others.
It was related to a version upgrade, although it wasn't the gtkdialog version upgrades that had something to do with it; it was a GTK+ upgrade.OscarTalks wrote:Not sure if maybe the gtkdialog version upgrades has something to do with it, but anyway, it seems that the icons are much more likely to display universally if you use "stock=" instead of "icon=" in the code lines, eg:-
Code: Select all
<input file stock="gtk-execute"></input>
Yes, that will work, as you've already discovered. But in this case the problem is not in Psync.OscarTalks wrote:LATER STILL:- Version 2.9x ... Looks OK in Precise, but in Dpup Wheezy the Help and Cancel button icons still do not display. I tried changing the button help and button cancel lines to just button and put in the icons and labels and that seems better.
Code: Select all
gtk-button-images = 0
Code: Select all
gtk-button-images = 1
Code: Select all
gtk-button-images = 1
Code: Select all
# -- THEME AUTO-WRITTEN DO NOT EDIT
None of the existing versions worked right at boot when I made the attached. It is my take on a better way to do psync. It syncs properly at boot when asked to and forces the GUI up when there is a problem. The GUI explains problems that may happen in a manner that hopefully a user can understand.npierce wrote:Hi OscarTalks,
Thanks for testing Psync 2.9x. It is good to know that it is (mostly) working OK for someone other than myself.
I made Psync 2.9x at Rob's request to me to merge Argolance's internationalisation code with my bug fix code. At the moment I don't feel comfortable making additional changes to Rob's original design. Perhaps if Rob sees your ideas and finds some time, he might use some of them.Moose On The Loose wrote:Feel free to use or ignore ideas
Code: Select all
PS=$(ps -A -oppid,pid | grep -r "^$HIM" | cut -b 7-12)
Code: Select all
PS=$( echo "$PS" |grep $PROG_NAME| grep -v -r "^$ME")
And perhaps you really want to use gtkdialog4, not gtkdialog3. On Precise 5.7.1 your psync gives this message:The NEWS file in recent grep source tarballs wrote:* Noteworthy changes in release 2.11 (2012-03-02) [stable]
. . .
** New features
If no file operand is given, and a command-line -r or equivalent
option is given, grep now searches the working directory. Formerly
grep ignored the -r and searched standard input nonrecursively.
Code: Select all
** (gtkdialog3:17733): ERROR **: gtkdialog: Error in line 3, near token 'string': syntax error
Yes. That was in July. It is unfortunate that Rob didn't have time to try out version 2.9x when I sent it to him in June. If he had tried it and posted it in this thread, you might have found that it worked for you.Moose On The Loose wrote:None of the existing versions worked right at boot when I made the attached.
I discovered after doing it that it was waaaaaaay too easy to set pschedule to do the request at a rate I would consider to be un-nice to the NTP providers. If someone is taking my code, it would be best to fix that somehow.npierce wrote:Hi Moose,
Thanks for sharing your rewrite of Psync. You have some good ideas. I especially like the compact dialog box that will fit easily on a 640x480 screen with room to spare. And the ability to quickly link to pschedule to automatically re-sync the clock every day or so is a nice feature.
It was a "bread on the water" effort on my part. I can easily understand the desire not to make massive changes like my code is.I made Psync 2.9x at Rob's request to me to merge Argolance's internationalisation code with my bug fix code. At the moment I don't feel comfortable making additional changes to Rob's original design. Perhaps if Rob sees your ideas and finds some time, he might use some of them.Moose On The Loose wrote:Feel free to use or ignore ideas
I picked the name to be different to the version in my system. We now have so many different versions that maybe, I should not even call mine psync-anthing.In the meantime, you should consider releasing your version as an alternative to Psync. One great thing about Linux is the many choices available. Some folks may prefer the old familiar Psync; others may prefer your rewrite. (Since it is almost a complete rewrite, and to avoid confusion, you may want to consider giving it a new name. "psync 2.0" could be confused with the release of Rob's Psync 2.0 back on 2011-Apr-15.)
Noted in my code. I look into that some moreAlso, watch out for lines like:Code: Select all
PS=$(ps -A -oppid,pid | grep -r "^$HIM" | cut -b 7-12)
Before grep release 2.11 the -r option was simply ignored when no filename was passed to grep, so it was harmless. But since release 2.11 grep will search directories recursively beginning with the current working directory, instead of standard input.Code: Select all
PS=$( echo "$PS" |grep $PROG_NAME| grep -v -r "^$ME")
I'll summarize that as "YIKES" if you don't mindIf someone attempts to install your current .pet on a Puppy with grep 2.11 or newer .........
On my machine (5.2. it really is gtkdialog3. PerhapsAnd perhaps you really want to use gtkdialog4, not gtkdialog3. On Precise 5.7.1 your psync gives this message:On some Puppies gtkdialog3 is just a symlink to gtkdialog4, and those work OK. But on Precise 5.7.1 gtkdialog3 is really gtkdialog3. If I change it to link to gtkdialog4, it works.Code: Select all
** (gtkdialog3:17733): ERROR **: gtkdialog: Error in line 3, near token 'string': syntax error
Code: Select all
GTKDIALOG=$( which gtkdialog4 )
if [[ "$GTKDIALOG" == "" ]] ; then
GTKDIALOG=$( which gtkdialog3 )
fi
I think I did my version at first before that date but also I don't always real all of the forum.Yes. That was in July. It is unfortunate that Rob didn't have time to try out version 2.9x when I sent it to him in June. If he had tried it and posted it in this thread, you might have found that it worked for you.Moose On The Loose wrote:None of the existing versions worked right at boot when I made the attached.
Perhaps making it named and described as "compact" would be a solution to the confusion issue. "psync_compact-2.0" comes to mind.With some minor fixes, your code will be a nice alternative to Psync.