The time now is Thu 20 Jun 2013, 08:15
All times are UTC - 4 |
| Author |
Message |
sc0ttman

Joined: 16 Sep 2009 Posts: 2201 Location: UK
|
Posted: Tue 03 Aug 2010, 11:29 Post subject:
|
|
| tasmod wrote: | KLP is one of Iguleders isos... different from the 'normal' Puppys, so I couldn't tell you why it won't work...
Right now I'm on 507 and the keyboard setter works for me. |
Can you tell me what command is executed, so I can just create a symlink for it?
_________________ Akita Linux, VLC-GTK, Pup Search, Pup File Search
|
|
Back to top
|
|
 |
jpeps
Joined: 31 May 2008 Posts: 2449
|
Posted: Tue 03 Aug 2010, 11:43 Post subject:
|
|
| WhoDo wrote: |
I just wanted to add my thanks for the firewall status app, Rob. It's something we probably should have had a long time ago. I don't need to be able to turn the firewall on and off; just know which it is at the moment |
Simplest is just "lsmod" to see if iptable is there.
|
|
Back to top
|
|
 |
jpeps
Joined: 31 May 2008 Posts: 2449
|
Posted: Tue 03 Aug 2010, 15:09 Post subject:
|
|
Here's a simple info script, for anyone short of memory:
| Code: |
#! /bin/sh
cat /etc/DISTRO_SPECS | grep DISTRO_NAME | cut -d= -f2
cat /etc/DISTRO_SPECS | grep DISTRO_VERSION | cut -d_ -f2
echo
echo Your external IP Address is:
wget -qO - http://cfaj.freeshell.org/ipaddr.cgi
echo Your local IP Address is:
ifconfig | grep addr: | grep -v 127\. | awk '{print $2}' | cut -d: -f2
VAR=`lsmod | grep iptable`
echo "__________________"
if [ -n "${VAR}" ]; then
echo Firewall On
else
echo Firewall Off
fi
exit 0
|
|
|
Back to top
|
|
 |
Dogdaze
Joined: 03 Aug 2010 Posts: 12
|
Posted: Wed 04 Aug 2010, 01:07 Post subject:
Firewallstate Subject description: Firewall status app |
|
Cheers tasmod,
Thanks for considering my request. I hope that you have luck with it. Thanks for the Gmail tray app tip, I'll be sure to check it out. Going to do that now.
--------------------------------------------------------------------
$$ Don't buy a new computer$$, download a Puppy!
|
|
Back to top
|
|
 |
tasmod

Joined: 04 Dec 2008 Posts: 1460 Location: North Lincolnshire. UK
|
Posted: Wed 04 Aug 2010, 04:33 Post subject:
|
|
Hi Dogdaze,
Just doing a special for you. I have an external call at moment but I'm going to put it in the 'binary' instead.
Do you want a full version, or, simple plus your Internet disconnect?
_________________ Rob
-
The moment after you press "Post" is the moment you actually see the typso 
|
|
Back to top
|
|
 |
Dogdaze
Joined: 03 Aug 2010 Posts: 12
|
Posted: Thu 05 Aug 2010, 04:30 Post subject:
firewallstate Subject description: Firewall status tray icon |
|
Greetings Tasmon,
Sorry, I got side tracked with the kids. Had to rush off to Walmart to purchase a laptop for my youngest son. They had a fantastic sale on HP laptops and after all, it was his birthday, lucky kid! so.... I did not have time to try your Gmail app. So, I have no comment about it,sorry! I will try to check it out tonight. As per your post, ?? I am not sure that I understand your message properly. I guess, what ever you would like to do would be fine with me. If, by full version, you mean, your firewall app and incorporate "disconnect from Internet" in the right click menu ? Then for sure, that is what I would prefer. I am really happy that you have created the firewall status app, I use it all the time. Cheers! I think that it would be a good place to have this option. If,however, you do not want to add it to you right click menu, then a separate app will suffice. I would rather, if it could be added to your Firewall status app, since it is already in the taskbar and I feel that it would be a good place for that option IMO. It is, however, your choice. I mean, what ever you feel comfortable with, is fine by me. Thanks for your response and your time in regards to this request.
--------------------------------------------------------
$$Don't buy a new computer$$, Download a Puppy!
|
|
Back to top
|
|
 |
tasmod

Joined: 04 Dec 2008 Posts: 1460 Location: North Lincolnshire. UK
|
Posted: Thu 05 Aug 2010, 14:36 Post subject:
|
|
Hi Dogdaze,
Well mixed success. I posted in programming forum a question but answered it myself after a few minutes.
I wrote a small bash script and gui to test network stop/start (disconnect internet) and it worked fine on my laptop with a new frugal install of lucid 508.
I then rewrote the C code to do the same thing, but it didn't work on my PC I use for coding.
This had me chasing my tail thinking the code was wrong. It wasn't it just couldn't work on this PC even though it's Lucid 508.
Seems the laptop was setup by another network setup from BK dated 2007 - probably the traditional one.
Seems my PC used Simple Network Setup by BK dated 2010.
There's a difference in code in the rc.network files. SNS will not let me stop/start it in the code, whereas the older rc.network will let me because the code is in it.
So it depends on which rc.network file you have as to whether it will work for you.
If you open /etc/rc.d/rc.network in Geany and look at second line it should say 'LPGL Barry Kauler 2006, 2007 www.puppylinux.com' if it does it will work for you and I will post the small script for you rather than alter the tray app.
Even though I've added about 50 lines of code to do it in the tray app, it takes two actual Bash script lines to do it.
_________________ Rob
-
The moment after you press "Post" is the moment you actually see the typso 
|
|
Back to top
|
|
 |
jpeps
Joined: 31 May 2008 Posts: 2449
|
Posted: Thu 05 Aug 2010, 17:42 Post subject:
|
|
Here's a simple CHEAP alternative (eliminates 13M of ram) that I placed on my tray.
| Code: |
#! /bin/bash
VAR=`lsmod | grep iptable`
if [ -n "${VAR}" ]; then
STATE="Firewall On"
else
STATE="Firewall Off"
fi
export ON='
<window title="">
<vbox>
<text>
<label>Firewall Turned ON</label>
</text>
<button cancel>
</button>
</vbox>
</window>
'
export OFF='
<window title="">
<vbox>
<text>
<label>Firewall Turned Off</label>
</text>
<button cancel>
</button>
</vbox>
</window>
'
export MAIN_DIALOG='
<vbox>
<text>
<input>cat /etc/DISTRO_SPECS | grep DISTRO_NAME | cut -d= -f2</input>
</text>
<text>
<input>cat /etc/DISTRO_SPECS | grep DISTRO_VERSION | cut -d_ -f2</input>
</text>
<text>
<label>Your external IP Address is:</label>
</text>
<text>
<input>wget -qO - http://cfaj.freeshell.org/ipaddr.cgi</input>
</text>
<text>
<label>Your local IP Address is:</label>
</text>
<text>
<input>ifconfig | grep addr: | grep -v 127\. | cut -d: -f2 | cut -d" " -f1 </input>
</text>
<text>
<label>__________________</label>
</text>
<text>
<label>'"$STATE"'</label>
</text>
<hbox>
<button>
<label>Firewall Start</label>
<action>/etc/rc.d/rc.firewall start</action>
<action type="launch">ON</action>
</button>
<button>
<label>Firewall Stop</label>
<action>/etc/rc.d/rc.firewall stop</action>
<action type="launch">OFF</action>
</button>
<button cancel>
</button>
</hbox>
</vbox>
'
gtkdialog3 --program=MAIN_DIALOG
|
|
|
Back to top
|
|
 |
Dogdaze
Joined: 03 Aug 2010 Posts: 12
|
Posted: Thu 05 Aug 2010, 18:46 Post subject:
Firewall Status Subject description: Firewall Status Tray app |
|
Greetings Tasmod,
Thanks a bunch for the quick response! I checked the rc.network file and yes it has the "LGPL Barry Kauler 2006, 2007 www.puppylinux.com" line. So, I guess I might find joy yet. I am using Lupu-507 right now, however, I have not checked if Lupu-508 uses the same rc.network file. I will do that next. It would be sad if that gets changed somewhere along the way to a final release. I hope not. I'll post back soon hopefully with good news.
---------------------------------------------------------------------
$$ Don't buy a new computer $$, download a Puppy!
|
|
Back to top
|
|
 |
tasmod

Joined: 04 Dec 2008 Posts: 1460 Location: North Lincolnshire. UK
|
Posted: Thu 05 Aug 2010, 19:41 Post subject:
|
|
Let me know how you get on Dogdaze and I'll send you the program.
I'm moving on to something else.
_________________ Rob
-
The moment after you press "Post" is the moment you actually see the typso 
|
|
Back to top
|
|
 |
Dogdaze
Joined: 03 Aug 2010 Posts: 12
|
Posted: Thu 05 Aug 2010, 19:55 Post subject:
Firewall Status Tray App |
|
Tasmod,
Just checked Lupu-508, running it now, and yep, it's all good. The rc.network file has the "LGPL Barry Kauler 2006, 2007 www.puppylinux.com" line. So, I guess I'm set. If you can find the time to post your script that would be great or if you already have it inserted in your tray app the latter would be really sweet. Either way I'm looking forward to trying it. Thanks so much for all the time and effort, it is greatly appreciated.
--------------------------------------------------------------------
$$ Don't buy a new computer $$, download a Puppy!
|
|
Back to top
|
|
 |
tasmod

Joined: 04 Dec 2008 Posts: 1460 Location: North Lincolnshire. UK
|
Posted: Thu 05 Aug 2010, 20:13 Post subject:
|
|
Test this one, I haven't, quite tired just now.
Rob
_________________ Rob
-
The moment after you press "Post" is the moment you actually see the typso 
Last edited by tasmod on Fri 06 Aug 2010, 04:15; edited 1 time in total
|
|
Back to top
|
|
 |
Jasper

Joined: 25 Apr 2010 Posts: 889 Location: England
|
Posted: Thu 05 Aug 2010, 20:27 Post subject:
|
|
Hi,
Thank you for your aplet which works perfectly with lupu 5.0.0.
It would be helpful to have the time checked / reset either on demand or automatically with an "official" clock. May I ask if there is already a PET for that or if you may have any thought of doing that sometime?
My regards
Added:
PS The Internet On / Off buttons do not seem to work.
|
|
Back to top
|
|
 |
Dogdaze
Joined: 03 Aug 2010 Posts: 12
|
Posted: Thu 05 Aug 2010, 21:54 Post subject:
firewallstate 1.5 dogdaze.pet |
|
Hi Tasmod,
Like your previous post, some success. It is sort of funny. The applet loads into the taskbar and right click shows "Internet on/off" when clicked a dialog box pups up with the options "Internet ON or OFF". Clicking either of these buttons does nothing. Strange. However in /tmp/ xerrs.log it reports the following about 20 times.
ash: 9262: unknown operand
ash: 9262: unknown operand
/tmp/pup_event_sizefreem
While on my way to the tmp folder I noticed that the applet copied itself to / so being inquisitive I decided to click on the "netonoff script. Well well! When I clicked "Network Off" it did just that and "Network On "connected immediately. Kind of funny I think, I mean not from the taskbar but certainly works from the / folder. Now, please don't take this the wrong way, I do not mean to be rude, it's like I said earlier, I'm inquisitive. I noticed that in the applet popup the title option reads "Internet On/OFF" and in / the script is named "netonoff" is it possible that it is the names that might be the reason that the option from the tray app does not work? Maybe not linked ? Just a thought. Doesn't really matter to me where it works from just so long as I can disconnect and reconnect whenever I wish is really all I wanted. And you did just that! I'm very happy with the script you gave me. I can always link it to the desktop. The rest of the app works perfectly so no need to bother with the "Internet on/off" unless you want to, of course. Again, thanks so much for fulfilling my request. Wish I code Maybe some day...
-------------------------------------------------------------------
$$ Don't buy a new computer $$, download a Puppy!
|
|
Back to top
|
|
 |
Dogdaze
Joined: 03 Aug 2010 Posts: 12
|
Posted: Thu 05 Aug 2010, 22:26 Post subject:
Firewall Status Tray Applet |
|
Hi again Tasmod,
Just had a quick look at "firewall1.5.dogdaze.c" noticed that it calls the /etc/rc.d/rc.network routine and does not call or link to the "netonoff" script. So, if you could please just ignore most of my last post I mean this part "Now, please don't take this the wrong way, I do not mean to be rude, it's like I said earlier, I'm inquisitive. I noticed that in the applet popup the title option reads "Internet On/OFF" and in / the script is named "netonoff" is it possible that it is the names that might be the reason that the option from the tray app does not work? Maybe not linked ? Just a thought." Well, if you could pretend that you did not see or read that, that would be just great. I feel rather foolish. Ha ha! Oh well! What's done is done, sorry about that. I also read "netonoff" script which also calls on the same rc.network routine. Has me curious as to why it won't work from the taskbar applet.
-------------------------------------------------------------------
$$ Don't buy a new computer $$, download a Puppy!
|
|
Back to top
|
|
 |
|
|
|
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
|