Firewall status tray icon - firewallstate-2.1

Configuration wizards, scanners, remote desktop, etc.
Message
Author
User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#91 Post by tasmod »

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

Seems I packed everything in the pet. :oops:

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

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#92 Post by tasmod »

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

Jasper

#93 Post by Jasper »

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

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#94 Post by jpeps »

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.

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#95 Post by tasmod »

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

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#96 Post by jpeps »

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.

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#97 Post by tasmod »

--
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#98 Post by big_bass »

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


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

#!/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: Select all

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

have fun with it
Joe

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#99 Post by tasmod »

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

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#100 Post by tasmod »

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

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#101 Post by vovchik »

Dear tasmod and big_bass,

That is a brilliant little script - or two. :)

I like it.

With kind regards,
vovchik

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#102 Post by tasmod »

Version 1.5 posted
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

User avatar
chrome307
Posts: 708
Joined: Thu 15 Jan 2009, 11:00

#103 Post by chrome307 »

Thank you again for this useful application :)

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#104 Post by sc0ttman »

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.
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#105 Post by tasmod »

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

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#106 Post by tasmod »

FULL menu version 1.5 added.

Both 1.5's have better directory structure and start up routine.
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#107 Post by bigpup »

Using version 1.5 full in Lucid 5.1.1
If I select Quit & remove firewall status it removes the icon from the tray. OK.
If I go to the main menu>network and select Firewallstate- Tray applet it runs the firewall install shell but no icon shows on tray.

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#108 Post by tasmod »

Sorry bigpup I run it all the time on/off in 511 and can't replicate the problem.
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#109 Post by bigpup »

tasmod,
Firewall Status Tray Icon now comes in Luci-234 running at initial start.
There are several posts about on/off not working.
http://www.murga-linux.com/puppy/viewto ... 385#462385

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#110 Post by bigpup »

tasmod wrote:Sorry bigpup I run it all the time on/off in 511 and can't replicate the problem.
bigpup wrote:Using version 1.5 full in Lucid 5.1.1
If I select Quit & remove firewall status it removes the icon from the tray. OK.
If I go to the main menu>network and select Firewallstate- Tray applet it runs the firewall install shell but no icon shows on tray.
Are we talking about the same thing???
I am talking about the Firewall Status Tray icon, not the right click menu item to turn the firewall off or on.
The Lucid Puppy 5.2 thread has problems posted about the right click menu item turn firewall off or on not working.

Post Reply