Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 20 Nov 2014, 22:25
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » System
Psync Time Synchroniser Version 2.9 & 2.7-64bit
Post new topic   Reply to topic View previous topic :: View next topic
Page 8 of 8 [118 Posts]   Goto page: Previous 1, 2, 3, ..., 6, 7, 8
Author Message
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7081
Location: Perth, Western Australia

PostPosted: Fri 29 Jun 2012, 04:26    Post subject:  

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/news/
Back to top
View user's profile Send private message Visit poster's website 
jamesbond

Joined: 26 Feb 2007
Posts: 2230
Location: The Blue Marble

PostPosted: Fri 29 Jun 2012, 06:03    Post subject:  

BarryK 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.

Binary of ntpdate does not exist inside sap 5.95

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7081
Location: Perth, Western Australia

PostPosted: Sun 01 Jul 2012, 21:17    Post subject:  

jamesbond wrote:
BarryK 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.

Binary of ntpdate does not exist inside sap 5.95


I have remedied that! version 5.96 (alpha2) has been uploaded, see my blog announcement:

http://bkhome.org/blog/?viewDetailed=02879

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
tasmod


Joined: 04 Dec 2008
Posts: 1462
Location: North Lincolnshire. UK

PostPosted: Mon 02 Jul 2012, 16:09    Post subject:  

Sorry jamesbond,

I kept trying to upload it but failed. Still, Barry has rectified it anyway.

_________________
Rob
-
The moment after you press "Post" is the moment you actually see the typso Cool
Back to top
View user's profile Send private message Visit poster's website 
Argolance


Joined: 06 Jan 2008
Posts: 1844
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Tue 16 Apr 2013, 17:33    Post subject:  

EDIT: Arrow Please jump to this thread.
Cordialement.
Back to top
View user's profile Send private message Visit poster's website 
tasmod


Joined: 04 Dec 2008
Posts: 1462
Location: North Lincolnshire. UK

PostPosted: Wed 12 Jun 2013, 05:21    Post subject:  

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.

_________________
Rob
-
The moment after you press "Post" is the moment you actually see the typso Cool
Back to top
View user's profile Send private message Visit poster's website 
npierce

Joined: 28 Dec 2009
Posts: 858

PostPosted: Mon 06 Jan 2014, 16:35    Post subject: 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.
psync-2.9x.pet
Description  Beta version with localisation and bug fixes
pet

 Download 
Filename  psync-2.9x.pet 
Filesize  7.01 KB 
Downloaded  184 Time(s) 
psync_NLS-2.9x.pet
Description  NLS for Psync with Argolance's French translation
pet

 Download 
Filename  psync_NLS-2.9x.pet 
Filesize  2.17 KB 
Downloaded  169 Time(s) 
Back to top
View user's profile Send private message 
OscarTalks

Joined: 05 Feb 2012
Posts: 922
Location: London, England

PostPosted: Fri 24 Jan 2014, 16:03    Post subject:  

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:-

Code:
<input file stock=\"gtk-execute\"></input>

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.
Code:
<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>
before.jpg
 Description   Button icons NOT displaying in Dpup Wheezy
 Filesize   112.85 KB
 Viewed   330 Time(s)

before.jpg

after.jpg
 Description   Button icons displaying in Dpup Wheezy
 Filesize   117.78 KB
 Viewed   370 Time(s)

after.jpg


_________________
Oscar in England

Back to top
View user's profile Send private message 
npierce

Joined: 28 Dec 2009
Posts: 858

PostPosted: Fri 31 Jan 2014, 22:34    Post subject:  

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:

OscarTalks wrote:
LATER:- Ah, I see the version 2.9x by npierce above has the icon fix plus some others.

Yes, that fix was from the code that I merged from Argolance, so we have Argolance to thank for that.

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:
<input file stock=\"gtk-execute\"></input>   

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.

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:

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.

Yes, that will work, as you've already discovered. But in this case the problem is not in Psync.

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:
gtk-button-images = 0

So you can chose another theme, or modify that theme to change that line to
Code:
gtk-button-images = 1

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
Code:
gtk-button-images = 1

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:
Code:
# -- THEME AUTO-WRITTEN DO NOT EDIT

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. Smile

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. Smile

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.
Back to top
View user's profile Send private message 
Moose On The Loose


Joined: 24 Feb 2011
Posts: 532

PostPosted: Sat 01 Feb 2014, 13:13    Post subject:  

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.


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.

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
psync-2.0.pet
Description 
pet

 Download 
Filename  psync-2.0.pet 
Filesize  5.65 KB 
Downloaded  163 Time(s) 
Back to top
View user's profile Send private message 
npierce

Joined: 28 Dec 2009
Posts: 858

PostPosted: Mon 10 Feb 2014, 08:52    Post subject:  

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.

Moose On The Loose wrote:
Feel free to use or ignore ideas

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.

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:
    PS=$(ps -A -oppid,pid | grep -r "^$HIM" | cut -b 7-12)

Code:
      PS=$( echo "$PS" |grep $PROG_NAME| grep -v -r "^$ME")

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. Smile

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.

And perhaps you really want to use gtkdialog4, not gtkdialog3. On Precise 5.7.1 your psync gives this message:
Code:
** (gtkdialog3:17733): ERROR **: gtkdialog: Error in line 3, near token 'string': syntax error

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.


Moose On The Loose wrote:
None of the existing versions worked right at boot when I made the attached.

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.

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.
Back to top
View user's profile Send private message 
Moose On The Loose


Joined: 24 Feb 2011
Posts: 532

PostPosted: Mon 10 Feb 2014, 12:01    Post subject:  

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.


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.

Quote:

Moose On The Loose wrote:
Feel free to use or ignore ideas

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.

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.

Quote:

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.)

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.

Quote:

Also, watch out for lines like:
Code:
    PS=$(ps -A -oppid,pid | grep -r "^$HIM" | cut -b 7-12)

Code:
      PS=$( echo "$PS" |grep $PROG_NAME| grep -v -r "^$ME")

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.

Noted in my code. I look into that some more
I am coding at work so not doing it in my weekends right now.

Quote:

If someone attempts to install your current .pet on a Puppy with grep 2.11 or newer .........

I'll summarize that as "YIKES" if you don't mind

Quote:

And perhaps you really want to use gtkdialog4, not gtkdialog3. On Precise 5.7.1 your psync gives this message:
Code:
** (gtkdialog3:17733): ERROR **: gtkdialog: Error in line 3, near token 'string': syntax error

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.

On my machine (5.2.Cool it really is gtkdialog3. Perhaps
Code:

GTKDIALOG=$( which gtkdialog4 )
if [[ "$GTKDIALOG" == "" ]] ; then
  GTKDIALOG=$( which gtkdialog3 )
  fi

would be the best here.

Quote:

Moose On The Loose wrote:
None of the existing versions worked right at boot when I made the attached.

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.

I think I did my version at first before that date but also I don't always real all of the forum.

.....

Quote:

With some minor fixes, your code will be a nice alternative to Psync.


Perhaps making it named and described as "compact" would be a solution to the confusion issue. "psync_compact-2.0" comes to mind.
Back to top
View user's profile Send private message 
npierce

Joined: 28 Dec 2009
Posts: 858

PostPosted: Thu 27 Feb 2014, 10:52    Post subject: 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:
  • 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/pet_packages-wary5/).)
  • Removed execute permission bits from non-executable files.

The psync.mo file inside of psync_NLS-2.10.pet was created by Argolance. psync_NLS-2.10.pet is simply psync_NLS-2.9x.pet with a new version number consistent with psync-2.10.pet, so there is no need to reinstall if you already installed psync_NLS-2.9x.pet.
psync-2.10.pet
Description  Released version 2.10
pet

 Download 
Filename  psync-2.10.pet 
Filesize  7.02 KB 
Downloaded  131 Time(s) 
psync_NLS-2.10.pet
Description  NLS for Psync with Argolance's French translation
pet

 Download 
Filename  psync_NLS-2.10.pet 
Filesize  2.16 KB 
Downloaded  126 Time(s) 
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 8 of 8 [118 Posts]   Goto page: Previous 1, 2, 3, ..., 6, 7, 8
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » System
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1608s ][ Queries: 13 (0.0113s) ][ GZIP on ]