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 24 Apr 2014, 21:51
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Network
Firewall status tray icon - firewallstate-2.1
Post new topic   Reply to topic View previous topic :: View next topic
Page 7 of 11 [151 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 Next
Author Message
tasmod


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

PostPosted: Fri 06 Aug 2010, 04:34    Post subject:  

OK i've removed the pet. Told you i was tired Laughing

Seems I packed everything in the pet. Embarassed

I've looked at the code and i didn't complete the call. It doesn't use netonoff, that was a development item. The netonoff script will work on its own, it uses gtkdialog.

The other netonoff window is generated in the code as is the button press events, however i got the code syntax sent to rc.network incorrect. Just have to work out what it should be, probably a ` or a ' or somesuch.

I made a working hybrid tray app and now I'm drawing back in the external scripts and rewriting them in gtk. This keeps them in the binary when compiled and is what I was aiming for.

I'm not bothered about file size or memory constraints, it's a hobby development that if anyone finds useful then I'm happy.


I've come this far by hard graft and hand coding, it's all new territory and hard to learn at my age anyway. Scripting's fine but I wanted to move on a bit.

Yesterday I realised that what I was doing by hand now over hours, could be done in minutes in Glade Interface Designer. It makes my work seem trivial.

Still, I learned to clear bugs and how the program steps through. I still have Gmailtray with a few problems at the moment trying to encrypt/decrypt within the code to keep the password safe from prying eyes. That will keep me going.

_________________
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 
tasmod


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

PostPosted: Fri 06 Aug 2010, 04:48    Post subject:  

Sir Jasper,

Psync does just that. It's a clever little app that syncs to a group of internet time servers and sets your clock accurately. (Within milliseconds)
It's in the Desktop portion of the main menu or it's in the firewallstate menu in later versions.

The group constantly changes but the program tracks them.

When you first use it, the time is set accurately and when the report appears there's an option button to set it to run at each boot up.

You must have your Timezone set correctly though or else your clock will sync to whichever region you choose.

It's worth reading the Help file by using the Help button, there's an interesting article on 'Time' in there.

I wrote the app in bash and used gtkdialog. It was my first "real" app after pwidgets widgets.

I'm not new to coding but it's many years since i actually did anything useful, until Puppy that is.
My last app was in the early 90's in Visual Basic for Windows and was a commercial piece, a credit card reader program. All hobby stuff.

_________________
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 
Jasper


Joined: 25 Apr 2010
Posts: 1035
Location: England

PostPosted: Fri 06 Aug 2010, 10:33    Post subject:  

Hi again Rob,

Thank you for psync. It comes with lupu 508, but it did not come with lupu 5.0.0 which I am using so I downloaded your PET.

It will be of great use to me as I'll be keeping my frugal hard dive installation of 5.0.0 as my principal OS (although I'll install 5.1 when it arrives).

My regards
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 3219

PostPosted: Fri 06 Aug 2010, 14:58    Post subject:  

tasmod wrote:


I'm not bothered about file size or memory constraints, it's a hobby development that if anyone finds useful then I'm happy.


I've come this far by hard graft and hand coding, it's all new territory and hard to learn at my age anyway. Scripting's fine but I wanted to move on a bit.


It might be helpful to note the cost in RAM. It's easy to suddenly have 100M of processes going on for eye-candy or redundancy. Many users wouldn't know, since they don't use a terminal.
Back to top
View user's profile Send private message 
tasmod


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

PostPosted: Fri 06 Aug 2010, 18:07    Post subject:  

All the tray apps are about the same amount more or less.

It's a choice thing. It does have a quit option.

You have to remember how this started out, as a first run tray app which was meant to be discarded after using the firewall wizard.

It has grown since then by user request. Earlier in thread I said I would be offering cutdown or fuller featured versions, I was aware of what was happening.

I'm reaching the point where I can't be bothered anymore, I've spent too many hours on this.

Gmailtray is going the same way, fun but now getting tedious, I've cleared many obstacles and almost have it perfect (for me).

_________________
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 
jpeps

Joined: 31 May 2008
Posts: 3219

PostPosted: Sat 07 Aug 2010, 02:36    Post subject:  

tasmod wrote:
All the tray apps are about the same amount more or less.


Yeah....really adds up. Easily disabled by changing permissions in Startup menu. Links to programs and info files on the tray don't have to involve 13 M processes.
Back to top
View user's profile Send private message 
tasmod


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

PostPosted: Tue 10 Aug 2010, 03:56    Post subject:  

--
_________________
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 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Thu 12 Aug 2010, 11:11    Post subject:  

Hey tasmod

I hope you dont mind this is another topic
but I think you would put this to good use
and somehow add it to a tray app (thats my motive for posting it )


as is its ugly but works Laughing


I use this as reminder while checking how programs are running
I made very minor edits here is the source
http://colby.id.au/node/39
really I just added the launch script


you place this in /usr/sbin called cli_cpu_meter
Code:

#!/bin/bash
# by Paul Colby (http://colby.id.au), no rights reserved ;)


PREV_TOTAL=0
PREV_IDLE=0

while true; do
  CPU=(`cat /proc/stat | grep '^cpu '`) # Get the total CPU statistics.
  unset CPU[0]                          # Discard the "cpu" prefix.
  IDLE=${CPU[4]}                        # Get the idle CPU time.

  # Calculate the total CPU time.
  TOTAL=0
  for VALUE in "${CPU[@]}"; do
    let "TOTAL=$TOTAL+$VALUE"
  done

  # Calculate the CPU usage since we last checked.
  let "DIFF_IDLE=$IDLE-$PREV_IDLE"
  let "DIFF_TOTAL=$TOTAL-$PREV_TOTAL"
  let "DIFF_USAGE=(1000*($DIFF_TOTAL-$DIFF_IDLE)/$DIFF_TOTAL+5)/10"

#### comment next line for use with deskicons
  echo -en "\rCPU: $DIFF_USAGE% "


  # Remember the total and idle CPU times for the next check.
  PREV_TOTAL="$TOTAL"
  PREV_IDLE="$IDLE"

  # Wait before checking again.
  sleep 2
  clear
done



then you run it with this script called mini_cpu_meter it is the launch script

Code:

#!/bin/bash
#worlds smallest console cli app
xterm -geometry 10x1+10+1 -e sh  /usr/sbin/cli_cpu_meter



have fun with it
Joe

_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send private message 
tasmod


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

PostPosted: Fri 13 Aug 2010, 06:07    Post subject:  

Thanks Joe, looks interesting.

I'll look at that in more detail later today.

Right now I'm very close to completing my "poptray" pop3mail tray app.

It works OK and fetches mail count no problem, but, I have already created my "user details" files.

As a fresh install, first run it errors out and segfaults due to not having 'user details' and I'm now working out how to call the user detail entry window (done) and halt the program whilst the files are created (no success).

The other tray apps were no problem as control was mine, however for the thin mail client it is someone else's library, over which I have no control.

_________________
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 
tasmod


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

PostPosted: Fri 13 Aug 2010, 06:18    Post subject:  

Couldn't resist it just looked.

Neat little script.

Hmm, icon colour changes coupled with % value tooltip maybe?

Ah, just remembered where idea for thought came from, BKs freememapp does similar thing if memory gets low. Changes icon colour.

Could add this as a tooltip line to firewallstate tooltip?

_________________
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 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Fri 13 Aug 2010, 13:16    Post subject:  

Dear tasmod and big_bass,

That is a brilliant little script - or two. Smile

I like it.

With kind regards,
vovchik
Back to top
View user's profile Send private message 
tasmod


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

PostPosted: Sat 21 Aug 2010, 05:11    Post subject:  

Version 1.5 posted
_________________
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 
chrome307


Joined: 15 Jan 2009
Posts: 713

PostPosted: Sat 21 Aug 2010, 06:07    Post subject:  

Thank you again for this useful application Smile
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2368
Location: UK

PostPosted: Sat 21 Aug 2010, 13:28    Post subject:  

I just tried this again in 4.2 and the 'Choose keyboard layout' option (in your 1.4 app) doesn't seem to do anything (same as in KLP), although the required wizard is available...

So what command is "Choose keyboard layout" (the 3rd option from the top) executing, in your 1.4 version?

Please let me know, I'd love to use this think in my next puplet, and wanna get this little thing fixed.. I will just symlink the keyboard wizard to whatever command your tool is executing..

thanks.

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
tasmod


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

PostPosted: Sat 21 Aug 2010, 16:36    Post subject:  

Scottman,

I've posted a replacement v1.4. I had made the assumption that the keyboard routine in Lucid 5 was in 4 series. This should run input-wizard which is in both.

_________________
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 
Display posts from previous:   Sort by:   
Page 7 of 11 [151 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Network
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.0789s ][ Queries: 13 (0.0077s) ][ GZIP on ]