Psync Time Synchroniser Version 2.9 & 2.7-64bit
-
- Posts: 136
- Joined: Wed 21 Apr 2010, 23:03
- Location: Texas
Time Sync Issue on Live-CDs
I was having issues with syncing the time on my Re-Mastered Live-CDs.
It game me a few errors. One of them was that it was unable to connect to the server blah.pool.ntp.org.
I fixed it by including this line at the top of the /root/Startup/timesync.sh file.
When Re-Mastering the CD I had to make sure that I copied the symlink file /etc/localtime to /tmp/etc/.
Make sure the symlink is pointing to the correct time zone by running this command in the /etc/ folder.
It game me a few errors. One of them was that it was unable to connect to the server blah.pool.ntp.org.
I fixed it by including this line at the top of the /root/Startup/timesync.sh file.
Code: Select all
[ ! "`grep 'ntp 123/tcp' /etc/services`" ] && echo -e "ntp 123/tcp\nntp 123/udp" >> /etc/services
Make sure the symlink is pointing to the correct time zone by running this command in the /etc/ folder.
Code: Select all
ls -l
Local LAN's NTP
Questions
- Is this package enabled to use a NTP server that is already on the local LAN?
- What must be done to use the local service versus going to the internet via this package?
gcmartin,
The ntp call is to a 'pool' addresses of servers hard coded in the function psync, at the top.
Look at top of that, as a test comment out the pool local to you and add your ntp server address. Try synching and see what happens, that's all I can suggest.
If you use 'Europe' then comment out the Europe pool add your address. Use the 'Europe' button on the gui to test.
Let me know how you get on.
===========
Atle,
Your welcome.
The ntp call is to a 'pool' addresses of servers hard coded in the function psync, at the top.
Look at top of that, as a test comment out the pool local to you and add your ntp server address. Try synching and see what happens, that's all I can suggest.
If you use 'Europe' then comment out the Europe pool add your address. Use the 'Europe' button on the gui to test.
Let me know how you get on.
===========
Atle,
Your welcome.
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)
-
The moment after you press "Post" is the moment you actually see the typso 8)
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
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.
http://bkhome.org/blog/?viewDetailed=02874
...anyone with a RP is invited to test Psync in that environment.
[url]https://bkhome.org/news/[/url]
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.
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
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.
http://bkhome.org/blog/?viewDetailed=02879
[url]https://bkhome.org/news/[/url]
- Argolance
- Posts: 3767
- Joined: Sun 06 Jan 2008, 22:57
- Location: PORT-BRILLET (Mayenne - France)
- Contact:
EDIT: Please jump to this thread.
Cordialement.
Cordialement.
Psync Version 2.9
hwclock utility has changed slightly causing a change in the way it worked. This caused a small problem for Psync in new versions of Puppy.
Forum member Norm Pierce wrote a patch to the code to accomodate this.
Thanks Norm, I'm a bit busy at the moment to take care of it.
hwclock utility has changed slightly causing a change in the way it worked. This caused a small problem for Psync in new versions of Puppy.
Forum member Norm Pierce wrote a patch to the code to accomodate this.
Thanks Norm, I'm a bit busy at the moment to take care of it.
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)
-
The moment after you press "Post" is the moment you actually see the typso 8)
Psync 2.9x (2.10 beta)
As Rob explained in the above post, last June we ran into an incompatibility between recent versions of hwclock and Psync 2.8. I came up with a fix, and discussed it with Rob. Since he was very busy at the time, he kindly let me poke around in his code and release Psync 2.9, which he then attached to the first post in this thread.
A few hours later, Rob alerted me to the existence of a version of Psync which had been internationalised by Argolance, and asked if I could merge Argolance's localisation code and translation with Pysnc 2.9, which I did, and sent it to Rob for his approval. He had hoped to look it through soon, but apparently was unable to find the time to do so.
Subsequent PMs to Rob in September and December have gone unanswered, so I assume he is still very busy. Yet I would like to get this out where it can be used, so have decided to post it here.
I consider this a beta version which, for now, I am calling "Psync 2.9x". After it gets tested by a few other people I will bump it to "Psync 2.10", if no problems are found, and Rob doesn't want any changes to it.
A few hours later, Rob alerted me to the existence of a version of Psync which had been internationalised by Argolance, and asked if I could merge Argolance's localisation code and translation with Pysnc 2.9, which I did, and sent it to Rob for his approval. He had hoped to look it through soon, but apparently was unable to find the time to do so.
Subsequent PMs to Rob in September and December have gone unanswered, so I assume he is still very busy. Yet I would like to get this out where it can be used, so have decided to post it here.
I consider this a beta version which, for now, I am calling "Psync 2.9x". After it gets tested by a few other people I will bump it to "Psync 2.10", if no problems are found, and Rob doesn't want any changes to it.
- Attachments
-
- psync-2.9x.pet
- Beta version with localisation and bug fixes
- (7.01 KiB) Downloaded 768 times
-
- psync_NLS-2.9x.pet
- NLS for Psync with Argolance's French translation
- (2.17 KiB) Downloaded 751 times
- OscarTalks
- Posts: 2196
- Joined: Mon 06 Feb 2012, 00:58
- Location: London, England
I have found that the icons in the buttons don't display properly in some Puppies. I don't know very much about these things, but was having a poke around.
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:-
That of course is if you want to use the gtk stock icons. If you want to use some other icon such as mini-clock.xpm you use "icon=".
LATER:- Ah, I see the version 2.9x by npierce above has the icon fix plus some others. Testing that now and will report any findings.
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. I put gtk-quit as the icon in the other GUI too.
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>
LATER:- Ah, I see the version 2.9x by npierce above has the icon fix plus some others. Testing that now and will report any findings.
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. I put gtk-quit as the icon in the other GUI too.
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>
- Attachments
-
- before.jpg
- Button icons NOT displaying in Dpup Wheezy
- (112.85 KiB) Downloaded 975 times
-
- after.jpg
- Button icons displaying in Dpup Wheezy
- (117.78 KiB) Downloaded 1115 times
Oscar in England
Hi OscarTalks,
Thanks for testing Psync 2.9x. It is good to know that it is (mostly) working OK for someone other than myself.
You discussed a couple of issues which I will respond to in separate sections below:
Issue 1 -- Named icons missing from some buttons in earlier versions
Issue 2 -- Icons missing from stock buttons in version 2.9x
Issue 1 -- Named icons missing from some buttons in earlier versions:
Technically, the problem with the older Psync versions (e.g., 2.8 and 2.9) was not with the script, but with the lack of necessary image files. If a gtkdialog script uses a named icon (with file icon=), rather than a stock icon (with file stock=), there really should be a corresponding image file with the same basename. For example, an image file with the name "gtk-close.png", "gtk-close.svg" (if .svg files are supported), or "gtk-close.xpm" should be available in an icon directory if an icon named "gtk-close" is used. If no such file is found, GTK+ looks for an image of that name in its internal stock.
What changed is that older versions of GTK+ before 2010 had image files in the GTK+ source code whose filenames all matched the icon names (e.g., "gtk-close.png" for the gtk-close icon), but since mid-2010 only some of the filenames match (for instance, the filename of the image file used for the gtk-close icon is now named "window-close.png"). So, some images that could be found in the internal stock can no longer be found there.
So the problem was missing image files, a problem which was once hidden by the fact that older versions of GTK+ happened to find images in stock if the icon name happened to match a stock icon. And the problem is no longer hidden because some of the filenames used for stock icons have changed.
To fix that problem, I could have added the necessary image files to the Psync package, to guarantee that image files were available. But since stock icons were the appropriate icons for these buttons, it makes more sense to just use stock icons, which is what Argolance did, so I used Argolance's code. I see that you reached the same conclusion.
Issue 2 -- Icons missing from stock buttons in version 2.9x:
You don't mention which version of Dpup Wheezy you are using, but in the latest version, 3.5.2.11, /root/.gtkrc-2.0 sets the Aurora2 theme. (In fact, it sets it twice: once with include and once with gtk-theme-name -- more on this weirdness later.)
The Aurora2 theme has this line in /usr/share/themes/Aurora2/gtk-2.0/gtkrc:
So you can chose another theme, or modify that theme to change that line to
Or, better yet, just eliminate that line since gtk-button-images = 1 is the default.
After making this change you should now see the formerly missing icons in Psync or any number of other scripts (e.g., pupx) that use any of the five stock buttons that are supported by gtkdialog (ok, cancel, yes, no, and help).
(If changing the theme or editing the current theme seems reasonable to you, you may stop reading here and skip to the last line in this post. The following paragraphs just discuss an alternative that should allow you to customize your settings without changing or editing the current theme, and the complications that may now arise when attempting to do so.)
In an ideal world you could alternatively be able to override the theme by adding
to your personal configuration file, /root/.gtkrc-2.0, on a line after the include line that sets the theme (such that the line you added overrides the theme, not vice versa).
But this is not an ideal world. And Puppy has, over the years, had various theme-switching utilities that have the arrogant notion that /root/.gtkrc-2.0 is their personal property, not yours, and so overwrite that file (and any of your changes to it) whenever they are run. Some of these utilities are polite enough to warn you by posting keep-out, private property signs like this:
And some of them even provide a new place for your personal choices to live after you have been evicted from root/.gtkrc-2.0, such as the /root/.gtkrc.mine file.
But I see that a new theme-switching utility, gtk_chtheme_wrapper, has caused the theme to stomp on your choices in the /root/.gtkrc.mine file as well. That is, it doesn't actually hurt that file, but it reloads the theme after loading /root/.gtkrc.mine, and so any conflicts between your personally customized choices and the theme are decided in favor of the theme, not your wishes. (Any of your personal choices that are not in conflict will still be honored.)
I have not found any way to fix that other than commenting-out or simply removing the line with gtk-theme-name. I had hoped that moving that line so that it precedes the include "/root/.gtkrc.mine" line would fix it. But it seems that, when the gtk-theme-name line is used, the theme is loaded after .gtkrc-2.0 is processed, not when that line is encountered, as was the case when using include to load the theme.
The gtk-theme-name line is added by the gtk_chtheme_wrapper utility, which Barry created on 2013-Mar-29 to help "qt4 apps now automatically adopt same theme as gtk2 apps". So if you remove the line, you would loose that benefit.
And, of course, if that utility is run again, your edit will be wiped out.
If your Puppy is an older version that predates the arrival of the gtk_chtheme_wrapper utility, you won't have this problem because your /root/.gtkrc-2.0 file won't have a gtk-theme-name line, and you will still be able to override the gtk-button-images setting by editing the /root/.gtkrc.mine file. But if you have a newer version, all I can suggest is that you change to another theme or edit the current theme, as suggested earlier in this post.
Again, thanks for trying Psync 2.9.x and reporting.
Thanks for testing Psync 2.9x. It is good to know that it is (mostly) working OK for someone other than myself.
You discussed a couple of issues which I will respond to in separate sections below:
Issue 1 -- Named icons missing from some buttons in earlier versions
Issue 2 -- Icons missing from stock buttons in version 2.9x
Issue 1 -- Named icons missing from some buttons in earlier versions:
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>
Technically, the problem with the older Psync versions (e.g., 2.8 and 2.9) was not with the script, but with the lack of necessary image files. If a gtkdialog script uses a named icon (with file icon=), rather than a stock icon (with file stock=), there really should be a corresponding image file with the same basename. For example, an image file with the name "gtk-close.png", "gtk-close.svg" (if .svg files are supported), or "gtk-close.xpm" should be available in an icon directory if an icon named "gtk-close" is used. If no such file is found, GTK+ looks for an image of that name in its internal stock.
What changed is that older versions of GTK+ before 2010 had image files in the GTK+ source code whose filenames all matched the icon names (e.g., "gtk-close.png" for the gtk-close icon), but since mid-2010 only some of the filenames match (for instance, the filename of the image file used for the gtk-close icon is now named "window-close.png"). So, some images that could be found in the internal stock can no longer be found there.
So the problem was missing image files, a problem which was once hidden by the fact that older versions of GTK+ happened to find images in stock if the icon name happened to match a stock icon. And the problem is no longer hidden because some of the filenames used for stock icons have changed.
To fix that problem, I could have added the necessary image files to the Psync package, to guarantee that image files were available. But since stock icons were the appropriate icons for these buttons, it makes more sense to just use stock icons, which is what Argolance did, so I used Argolance's code. I see that you reached the same conclusion.
Issue 2 -- Icons missing from stock buttons in version 2.9x:
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.
You don't mention which version of Dpup Wheezy you are using, but in the latest version, 3.5.2.11, /root/.gtkrc-2.0 sets the Aurora2 theme. (In fact, it sets it twice: once with include and once with gtk-theme-name -- more on this weirdness later.)
The Aurora2 theme has this line in /usr/share/themes/Aurora2/gtk-2.0/gtkrc:
Code: Select all
gtk-button-images = 0
Code: Select all
gtk-button-images = 1
After making this change you should now see the formerly missing icons in Psync or any number of other scripts (e.g., pupx) that use any of the five stock buttons that are supported by gtkdialog (ok, cancel, yes, no, and help).
(If changing the theme or editing the current theme seems reasonable to you, you may stop reading here and skip to the last line in this post. The following paragraphs just discuss an alternative that should allow you to customize your settings without changing or editing the current theme, and the complications that may now arise when attempting to do so.)
In an ideal world you could alternatively be able to override the theme by adding
Code: Select all
gtk-button-images = 1
But this is not an ideal world. And Puppy has, over the years, had various theme-switching utilities that have the arrogant notion that /root/.gtkrc-2.0 is their personal property, not yours, and so overwrite that file (and any of your changes to it) whenever they are run. Some of these utilities are polite enough to warn you by posting keep-out, private property signs like this:
Code: Select all
# -- THEME AUTO-WRITTEN DO NOT EDIT
But I see that a new theme-switching utility, gtk_chtheme_wrapper, has caused the theme to stomp on your choices in the /root/.gtkrc.mine file as well. That is, it doesn't actually hurt that file, but it reloads the theme after loading /root/.gtkrc.mine, and so any conflicts between your personally customized choices and the theme are decided in favor of the theme, not your wishes. (Any of your personal choices that are not in conflict will still be honored.)
I have not found any way to fix that other than commenting-out or simply removing the line with gtk-theme-name. I had hoped that moving that line so that it precedes the include "/root/.gtkrc.mine" line would fix it. But it seems that, when the gtk-theme-name line is used, the theme is loaded after .gtkrc-2.0 is processed, not when that line is encountered, as was the case when using include to load the theme.
The gtk-theme-name line is added by the gtk_chtheme_wrapper utility, which Barry created on 2013-Mar-29 to help "qt4 apps now automatically adopt same theme as gtk2 apps". So if you remove the line, you would loose that benefit.
And, of course, if that utility is run again, your edit will be wiped out.
If your Puppy is an older version that predates the arrival of the gtk_chtheme_wrapper utility, you won't have this problem because your /root/.gtkrc-2.0 file won't have a gtk-theme-name line, and you will still be able to override the gtk-button-images setting by editing the /root/.gtkrc.mine file. But if you have a newer version, all I can suggest is that you change to another theme or edit the current theme, as suggested earlier in this post.
Again, thanks for trying Psync 2.9.x and reporting.
- Moose On The Loose
- Posts: 965
- Joined: Thu 24 Feb 2011, 14:54
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 the server list into a list instead of a collection of buttons because that seem more in keeping with the way things like that should be done.
I made the dialog box much shorter from top to bottom because I use this on a netbook where the existing dialog ends up taller than the screen.
I also allowed pschedule to be used to call psync once every day or so so that my slightly drifty clock would not go too far between my rather rate reboots.
Feel free to use or ignore ideas
- Attachments
-
- psync-2.0.pet
- (5.65 KiB) Downloaded 752 times
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.
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.)
Also, watch out for lines like:
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.
If someone attempts to install your current .pet on a Puppy with grep 2.11 or newer (such as Dpup Wheezy 3.5.2.11, which has 2.12), when the install script launches psync the current working directory is the top directory (/), and grep will happily spend an eternity searching through all of the files in the filesystem (including any additional filesystems mounted on it), and psync will consume oodles of memory in the process.
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.
Others also had problems with Psync's Autosync feature failing to work at boot time because it ran before the network connection had been established. In Psync 2.9x I modified the code to wait for the network connection and the gateway to be established before trying to sync the clock. (It waits up to three minutes before timing out.)
Also, Argolance was able to make the dialog box much more compact in his code, which I merged into Psync 2.9x. On my PC his dialog box has a height of 493 pixels, cut down from the 637 pixel height of older versions, so it would easily fit on an SVGA (800x600) screen. But if your screen height is significantly smaller, perhaps VGA (640x480), then it still won't quite fit, while your version (with a height of 414 pixels on my PC) will fit with room to spare.
With some minor fixes, your code will be a nice alternative to Psync.
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.
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
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.)
Also, watch out for lines like:
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")
If someone attempts to install your current .pet on a Puppy with grep 2.11 or newer (such as Dpup Wheezy 3.5.2.11, which has 2.12), when the install script launches psync the current working directory is the top directory (/), and grep will happily spend an eternity searching through all of the files in the filesystem (including any additional filesystems mounted on it), and psync will consume oodles of memory in the process.
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.
Others also had problems with Psync's Autosync feature failing to work at boot time because it ran before the network connection had been established. In Psync 2.9x I modified the code to wait for the network connection and the gateway to be established before trying to sync the clock. (It waits up to three minutes before timing out.)
Also, Argolance was able to make the dialog box much more compact in his code, which I merged into Psync 2.9x. On my PC his dialog box has a height of 493 pixels, cut down from the 637 pixel height of older versions, so it would easily fit on an SVGA (800x600) screen. But if your screen height is significantly smaller, perhaps VGA (640x480), then it still won't quite fit, while your version (with a height of 414 pixels on my PC) will fit with room to spare.
With some minor fixes, your code will be a nice alternative to Psync.
- Moose On The Loose
- Posts: 965
- Joined: Thu 24 Feb 2011, 14:54
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 am coding at work so not doing it in my weekends right now.
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.
Psync Time Synchroniser Version 2.10
As mentioned in the post to which I attached version 2.9x, that version was a beta for Psync 2.10. Now that it has been tested for a few weeks without any problems, I am releasing it as Psync 2.10.
Version 2.10 identifies itself as "Psync 2.10" in the title bar, not as the experimental beta "Psync 2.9x". I've also removed execute permission bits from the non-executable files. Those are the only differences between 2.9x and 2.10.
So if you have already installed the beta version, there is no need to install version 2.10, unless you want to see "2.10" in the title bar.
Thank you all who tested the beta version.
Here is a list of the changes (after version 2.9) for version 2.9x and 2.10:
Version 2.10 identifies itself as "Psync 2.10" in the title bar, not as the experimental beta "Psync 2.9x". I've also removed execute permission bits from the non-executable files. Those are the only differences between 2.9x and 2.10.
So if you have already installed the beta version, there is no need to install version 2.10, unless you want to see "2.10" in the title bar.
Thank you all who tested the beta version.
Here is a list of the changes (after version 2.9) for version 2.9x and 2.10:
- Waits for network connection to be up and ensures that gateway device is running before attempting to contact time server. Previously, when in "Autostart" mode, it would sometimes try to contact the time server before the network connection was made.
- Bug fix: Africa button action had typo in pathname. Before I corrected this, clicking this button would cause Psync to exit without setting time.
- Bug fix: test for existence of defaulthtmlviewer was wrong. The highest priority HTML viewer for the help file was defaulthtmlviewer, but no test was made to ensure that it existed before being called. Instead there was a test for the existence of defaultbrowser, which was never called. I corrected that to test for defaulthtmlviewer.
- Now supports defaultbrowser (as a fallback).
- Merged Argolance's 2013-Apr-24 code, which adds the following:
- localisation with gettext()
- layout improvements
- all button icons now work with recent GTK+
- supports defaultbarehtmlviewer
- "Please wait!" box remains up until done, using yaf-splash
- Corrected new yaf-splash lines by removing invalid options.
- Supports older Puppies that had no /etc/clock file, like Puppy 4.3.1. (By the way, because of the localisation code, Psync also needs to have gettext-0.17-1-w5c.pet installed on Puppy 4.3.1 (but not newer Puppies) in order to run properly, but it does work fairly well even without that package -- it just doesn't show the Spring and Fall change dates, or the amount of time the clock was off when it was synced. Those are fine once the gettext .pet is installed (from http://distro.ibiblio.org/puppylinux/pe ... ges-wary5/).)
- Removed execute permission bits from non-executable files.
- Attachments
-
- psync-2.10.pet
- Released version 2.10
- (7.02 KiB) Downloaded 817 times
-
- psync_NLS-2.10.pet
- NLS for Psync with Argolance's French translation
- (2.16 KiB) Downloaded 727 times
- ASRI éducation
- Posts: 3197
- Joined: Sat 09 May 2009, 12:10
- Location: France
- Contact:
A small message to remind that psync-2.10 is a very good release!
Regards
Regards
Projet ASRI éducation => [url=http://asri-education.org/]Association[/url] | [url=http://forum.asri-education.org/]Forum[/url] | [url=http://dl01.asri-education.org/]Dépôt[/url] | [url=http://kids.asri-education.org/]Espace kids[/url]
For a long time now...
Been having a problem...
Display of time is nearly always 1 hour behind despite psync-2.10 being set to auto-sync.
I can use psync to correct the time, but at next boot, the time is again 1 hour behind.
Once in a while [1 in 50?], at the beginning of a new session, psync will auto-sync correctly, and the time is correct.
This is within Slacko-5.7.0-pae.
Been having a problem...
Display of time is nearly always 1 hour behind despite psync-2.10 being set to auto-sync.
I can use psync to correct the time, but at next boot, the time is again 1 hour behind.
Once in a while [1 in 50?], at the beginning of a new session, psync will auto-sync correctly, and the time is correct.
This is within Slacko-5.7.0-pae.