themighty1 / lpfw

Linux Personal Firewall
113 stars 22 forks source link

run silent #21

Open bash64 opened 9 years ago

bash64 commented 9 years ago

I am launching gui.py on login. The window always comes up and the panel tray icon. Is there a way to cause gui.py to run silent and pull up a panel tray icon without the window?

themighty1 commented 9 years ago

yes, in gui/gui.py remove the line 539 window.show()

bash64 commented 9 years ago

thanks!

bash64 commented 9 years ago

I am repeating something I said in the pull section in case you missed it:

Hello, I am releasing a huge Linux Mint 17 book soon. I will not be including Douane as it continuously locked up my laptop. I just discovered Leopard Flower and it works perfectly. I have added a last minute chapter on your software. If I reach 100k people or more with my book your going to see a LOT of downloads of your software. Thank you for writing this. I have been looking for just such an application firewall for a long time now. The book will go up to Amazon in maybe a week or so. The title is "Linux Mint 17 Full and Painless Migration for Anyone Written from the Perspective of a Microsoft User".

themighty1 commented 9 years ago

thank you, I saw it earlier. I applaud you efforts. Feel free to ask questions if you need any extra info for your book.

bash64 commented 9 years ago

last question, is build-essential needed for the compile?

bash64 commented 9 years ago

Here is the chapter I wrote for lpfw. I avoid teaching the user to create an rc script for lpfw (too complex) and settle for running on login which can be done with the GUI in Mint, but the user needs to elevate their sudo priveleges using the /etc/sudoers file or lpfw pops up a password prompt when you login which can cause issues:

Internet - Application Firewall (64bit only)

Leopard Flower

In Microsoft Windows applications are blocked. You are asked if it is ok for them to reach the internet. I like that kind of firewall. Here is an application firewall you can install from Github.com called Leopard Flower. I have tested it and it runs very well. Mandatory: The chapter called 'Sudo - Elevated Privileges" is mandatory to get this to work properly. Please go perform the Sudo procedure before continuing with the install.

LPFW gives the user control over which applications are allowed to use the network. It comes with a GUI. These instructions apply specifically to Ubuntu 14.04 64-bit but are very likely to work on other Linux distributions (Authors note: Linux Mint 17 64bit works fine). Please note that on 32-bit Linuxes lpfw may function incorrectly.

Download and compile Leopard Flower. Website: https://github.com/themighty1/lpfw

Open a terminal and copy and paste:

git clone https://github.com/themighty1/lpfw cd lpfw sudo apt-get install make g++ libnetfilter-queue-dev libnetfilter-conntrack-dev libcap-dev python-qt4 make

If this fails to compile try installing build-essential and try again as such:

sudo apt-get install build-essential

This creates two applications lpfw and gui.py which you will find at /home/{user-login}/lpfw/lpfw and /home/{user-login}/lpfw/gui/gui.py.

lpfw is the service. gui.py is the GUI. You need both running for the application firewall to be active.

Make these run on login using 'Menu->Preferences->Startup Applications'. Please add a delay of 5 seconds for gui.py, but not lpfw.

You can also use the section "Cinnamon Desktop - Running software on Login" to perform this manually. Either way make sure the command you use to launch lpfw is run with gksudo. Example: gksudo /home/{user-login}/lpfw/lpfw lpfw must be run with elevated privileges. gui.py is to be run without them.

Log out and back in to start them up. Do not use File->Exit to get out of the GUI. Click the X in the upper right of the window instead. If you use File->Exit you are stopping the gui and you may find that you are completely blocked from the Internet. Log out and back in again to fix this.

It will get old having the GUI pop up everytime you login. Here is how to make gui.py run silent and stay in the panel tray upon login... Open a terminal and open the gui.py file using a text editor:

cd ~ cd lpfw/gui nano gui.py

Page down to the next to last line (line number 539) you will see this: window.show()

Delete this line.

CTRL-o and then ENTER to save your text file when done typing. CTRL-x is then used to exit NANO.

bash64 commented 8 years ago

I am having issues with kernel 4. LPFW blocks everything.

I am using Linux Mint 17.3 64 bit (ubuntu 14.04). I am using Kernel 4.2.x

Is it approved for kernel 4 at this time?

On 11/02/2015 09:06 PM, dansmith_btc (on Freenode IRC) wrote:

yes, in gui/gui.py remove the line 539 window.show()

— Reply to this email directly or view it on GitHub https://github.com/themighty1/lpfw/issues/21#issuecomment-153217182.