Firewall status tray icon - firewallstate-2.1

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

Firewall status tray icon - firewallstate-2.1

#1 Post by tasmod »

firewallstate 2.1

Small change.

The Information window now updates.

The external IP and net IP fields didn't change due to not re-running the 'Info' fields when the Information menu item was run. This has now been changed and the fields are updated.

So if your external IP changes, then the Information window is correct.


=================

firewallstate 2.0

For 5.2.8 and 5.2.9 as well as Slacko

Fixes On/Off bug caused by change of gtk.

=================

firewallstate 1.9

Added the "remove firewall from reboot" button to the On/Off dialogue.
This remembers when it is turned off at reboot.

==================

firewallstate 1.8

There is no need to download if you are running latest Lucid 5.2 as this is the version within that. I post it here to keep up to date.


firewallstate 1.7

Fixed two spelling errors and removed second firewallstate that loaded to root.
===========

Firewallstate-214

a version for ttuuxxx's 214

===========

It places an icon in the tray which indicates the status of the firewall on/off with a menu with utils.

It has a left click run the firewall wizard directly.

There is a right click menu with option to run wizard and also to remove the icon from tray once firewall is running.

The reason for this tray app was for new iso installs really. It would act as a reminder when first starting the install that the firewall was off. Once the wizard had been run it could be removed.
It has grown quite a bit though since.

Version 1.5 & Version 1.5-full

Final versions as far as I'm concerned.

The app now installs to /usr/local/firewallstate and now has a small script for boot startup which has a 20 second wait for the network connection to finish. In other versions if the network wasn't up it errored out and wouldn't start. If that is too long for you just alter the setting in firewallstaterun.

Has right click menu entries:-

Information -This gives a good report of system settings.
Firewall wizard - Select this to run firewall wizard
Internet Connection Wizard - Run this to run the classic wizard.
Set Time & Date - As it says
Psync - Runs my Psync time server accurate time setter app.

It's a bit more concise than before, but as far as C and gtk go, it's not small. Scripting it would have been easy but this was a learning exercise.

Full version has the three settings options in menu as per 1.4 but uses directory tree entry as v1.5.

Version 1.4
Added the 3 options to set them as reported in the information window.
Keyboard
Country
Locale
Added Psync as a menu item.

Version 1.3

Works regardless of rc.local state.
Incorporates the firewallgtk ON/OFF routine as a menu option.

Leaving v1.2 in case anyone doesn't want firewall on/off option.

Version 1.2

Rework, loop routine. Doesn't vanish after a few minutes.

Icons in menu.

Bugfix: If removed from tray and then clicked on menu it didn't append to Startup, although it ran.

These added to right click `Information`.

Network IP address
Added your own External IP address
Keyboard set
Language in use
Time Zone in use



Luci specific version removed
Attachments
version 2.1 menu.jpg
Right click menu
(11.33 KiB) Downloaded 8335 times
firewallstate-2.1.pet
Change to Information window code to update on click.
(13.16 KiB) Downloaded 2480 times
firewallstatesource2.tar
Source file of v2.0 which compiles to binary.
Note: External files not included they are in pet as scripts that can be read.
(3.67 KiB) Downloaded 1506 times
firewallstate-2.0.pet
(13.03 KiB) Downloaded 1581 times
firewallstate-1.9.pet
Slight update. remembers between boots if firewall off.
(13.1 KiB) Downloaded 1761 times
firewallstate-214.pet
Version for Puppy-214
(19.87 KiB) Downloaded 1843 times
ice1.2.png
Information in icewm in lupu506
(20.12 KiB) Downloaded 14675 times
firewallstatus.png
New icon, this is firewall on.
(5.81 KiB) Downloaded 14707 times
Last edited by tasmod on Mon 28 Nov 2011, 15:41, edited 56 times in total.

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

#2 Post by tasmod »

v0.2 now released.
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:

#3 Post by tasmod »

v0.3 released
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:

#4 Post by tasmod »

v0.4

Tested so far on :-

Puppy 431
Luci 212
Lighthouse Pup Mariner 5 (JWM and XFCE tried)
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

#5 Post by big_bass »

Hey tasmod

thanks for the app

did you post the updated source code ?
or just include it in the package

I wanted to add (or if you want to ? ) pre woof puppy versions to the list
so they come up in the display

also I think the routine used to get the ip changed in the later versions
because mine didnt display

made a slack-desc


# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|' on
# the right side marks the last column you can put a character in. You must make
# exactly 11 lines for the formatting to be correct. It's also customary to
# leave one space after the ':'.

|-----handy-ruler------------------------------------------------------|
firewallstate: firewallstate (tasmond)
firewallstate:
firewallstate: It places an icon in the tray which indicates
firewallstate: the status of the firewall on/off.
firewallstate: It has a left click run the firewall wizard directly.
firewallstate: There is a right click menu with option to run wizard
firewallstate: and also to remove the icon from tray once
firewallstate: firewall is running.
firewallstate: acts as a reminder that the firewall was off.
firewallstate: Package created for slaxer_pup
firewallstate:




Joe

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

#6 Post by tasmod »

Hi Joe,

No, I just petted the app as it stood. I haven't yet finished it to my satisfaction. I will post the source later when I'm happy with it, right now it is very heavily commented and has lots of commented out routines I have tried out which need removing. In all about 100 lines worth.

IP reporting, I'll check through further as I have Puppy 412 on this PC I could try. The firewallstate app only launches it, I suppose I could do a check if installed and switch to what is if necessary.

I was hoping for feedback like this as I have lots of additional deps and updates in my 431 install. This means what may work for me doesn't always work for others. That's why I used a clean Luci 212 to do the work on v0.4

The app was aimed at Luci as a first run reminder.
Last edited by tasmod on Thu 22 Jul 2010, 21:37, edited 1 time in total.
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:

#7 Post by tasmod »

v0.5 released

Tested in:-

Puppy 421
Puppy 431
Lucid 212
Lighthouse Pup 5 (Xfce and Jwm)
Puppy 4 432 Iguleder edition

May work in any earlier Puppy.
Last edited by tasmod on Sat 17 Jul 2010, 21:30, edited 2 times in total.
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

#8 Post by vovchik »

Dear tasmod,

Version 0.5 works FINE in 3.x if you create a blank DISTRO_SPECS file first!

With thanks and kind regards,
vovchik

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

#9 Post by tasmod »

Hi Vovchik,

Many thanks for the info.

I realised I had not installed the pet but just ran the executable in 3 series when I tested it.

Of course that meant the icons weren't present so it put a blank in the tray. That had me thinking it didn't work.

I'm working on a fix for that.
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:

#10 Post by tasmod »

ver 0.6

Thanks to vovchik -

Should work in earlier versions. It checks for existence of DISTRO_SPECS if it is not found it defaults to '/etc/puppyversion' and returns that information.
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

#11 Post by big_bass »

maybe this will come in handy I did it in gimp

so you have some different choices depending on your theme

I resized mine to 32x32

wish I could check the code to see why the toggle on dosent toggle to on
after the firewall was set

I understand what you mean by working out the code before you post it
but at least you would have a back up if you change too much then if stops working
the dreaded stale files
I cant say how many times I uploaded stuff to the forum and later needed the copy for myself because of too many edits :D

Joe
Attachments
firewall-warn-120.png
(22.56 KiB) Downloaded 15108 times
firewall-ok-120.png
(24.8 KiB) Downloaded 14919 times

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

#12 Post by tasmod »

Hi Joe,

Those icons look great but that's the problem. They are 22k in size each being so good looking.
I started out with the ones I did like that but eventually saved them with compression(?) set high in xpm.

Barry did the same for his network tray icons at first but then produced some really neat ones which are only 900bytes each and look good.

-------

I've installed Slaxerpup to test and immediately came across a problem or two.

It's a frugal clean install and when I tried to load the pet nothing happened after the install box appeared.

Now, I checked the filesystem setup in slaxerpup and there is no /usr/local/sbin folder.

That's ok I just made v0.7 with it copied to /usr/local/bin instead.

I then tried to run the executable from a terminal on its own as a test.

However it errored, interesting, this is the first time I've come across a missing dep, in this case libgio-2.0.so.0

I assume this was because I had the devx and stuff loaded in my Luci212 that it all worked for me. No-one else has mentioned it.


EDIT
deleted code as now changed
Last edited by tasmod on Mon 19 Jul 2010, 15:07, edited 1 time in total.
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:

#13 Post by tasmod »

OK, did some more investigating, the missing lib message is a symlink to libgio-2.0.so.0.2400.0 which is part of libgio module i believe in slax.


I used gimp and rescaled the icons to 30x30 and saved as compressed png and they look good. They are now 2.3kb each much better than mine.

I didn't realise xpm was so greedy for size. Graphics are not my strong point.
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

#14 Post by vovchik »

Dear tasmod,

I modded the source to use pngs and it works nicely. I also managed to get one of big-bass' pngs to a size of 1.8k using pngnq (after reducing to 30x30). The other one didn't look so hot, and some bottom shadow was lost. Here is the pngnq tool.

With kind regards,
vovchik

PS: for those of you who wish to compile it:

Code: Select all

#!/bin/sh
myfile="$@"
gcc `pkg-config --cflags --libs gtk+-2.0` -o "$myfile" "$myfile".c
strip "$myfile"
PPS. The source for pngnq is here:http://pngnq.sourceforge.net/

PPPS. Still better (another modded version), maybe?: http://pornel.net/pngnq
Attachments
pngnq.tar.gz
(42.85 KiB) Downloaded 1660 times
firewall-on.png
(1.79 KiB) Downloaded 14679 times

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

#15 Post by tasmod »

vovchik,

that's just what i've done for v0.7
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

User avatar
Billtoo
Posts: 3720
Joined: Tue 07 Apr 2009, 13:47
Location: Ontario Canada

Firewall status tray icon applet - firewallstate.0.6

#16 Post by Billtoo »

tasmod wrote:ver 0.6

Thanks to vovchik -

Should work in earlier versions. It checks for existence of DISTRO_SPECS if it is not found it defaults to '/etc/puppyversion' and returns that information.
I downloaded version 0.6 and installed the pet, I was in icewm at the time and your pet didn't work.I switched to jwm and it does work now but it says version 0.5.
I also tried it in fatdog64 and it wouldn't work in jwm so I removed the pet in ppm.

Hope this helps

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

#17 Post by tasmod »

Version 0.7 released with new icons and dependency.

Billtoo, apologies for the version info return, I forgot to update that line in the code.

Slaps back of own hands, naughty boy. :oops:

I don't use icewm so I can't test that, Micko said it worked in Lucid 212 in icewm.

I have made a few changes to the code right now, so try ver0.7 and please report back.

fatdog64 I've no idea what it looks like!

Does the icon appear in tray?
Does it show a blank?
If you right click either icon or blank does the menu come up.
If it does, does Version information work?

If you run it from a terminal does it show any error message?

I'm aware that in a fresh install of slaxerpup it complains of missing libgio.

Small plans for v0.8

Return your own IP, country in use, language and keyboard.

Just ideas at moment, not yet made any code.

Edit: keyboard info done.
Last edited by tasmod on Mon 19 Jul 2010, 09:42, edited 1 time in total.
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#18 Post by 01micko »

Still looks ok to me Rob in Icewm (oh and I fixed my Ice bug :wink: )

Cheers
Attachments
fw-state.png
(72.66 KiB) Downloaded 1809 times
Puppy Linux Blog - contact me for access

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

#19 Post by vovchik »

Dear Rob,

Works fine in 3.x and 4.x. Thanks for the nice work....

With kind regards,
vovchik

PS. I think you could safely add a desktop file (/usr/share/applications) to the pet and have it appear under Network. I did that manually and used you "OK" icon.

User avatar
Billtoo
Posts: 3720
Joined: Tue 07 Apr 2009, 13:47
Location: Ontario Canada

Firewall status tray icon applet - firewallstate.0.7

#20 Post by Billtoo »

tasmod wrote:Version 0.7 released with new icons and dependency.

Billtoo, apologies for the version info return, I forgot to update that line in the code.

Slaps back of own hands, naughty boy. :oops:

I don't use icewm so I can't test that, Micko said it worked in Lucid 212 in icewm.

I have made a few changes to the code right now, so try ver0.7 and please report back.

fatdog64 I've no idea what it looks like.
I booted luci-213 with prefix=ram
I installed your pet and it worked.
I downloaded icewm from puppy package manager after I updated ppm.
When I clicked on the icewm pet a screen popped up and I have attached a screenshot (icewm.jpeg) of that.

In fatdog 64 I installed your pet and restarted xserver.
I noticed a greater distance between blinky and the clipboard icons in the lower right corner.
I right clicked (may have been left I forget) over the area where the firewall applet should be.
The attachment (firewall.jpg) is a screenshot of that.

thanks
Attachments
firewall.jpg
(101.31 KiB) Downloaded 1785 times
icewm.jpg
(70.18 KiB) Downloaded 1638 times

Post Reply