Giter Site home page Giter Site logo

dv-pi-menu's Introduction

KALI-PI Launcher

Simple touch menu for Raspberry Pi projects using the 3.5" Adafruit PiTFT 480x320 touch screen based on garthvh's original project. It's been slightly improved to be more resource friendly, allow to scroll through multiple themes and return after closing an application.

It runs as a python script in the framebuffer without needing a desktop environment.

This menu is the default launcher in Sticky Finger's Kali Pi Kali-Pi in action

I was after an easy way to launch X Window on either the TFT screen or through HDMI without the need for massive reconfigurations. I came accross garthvh's project featured on Adafruit and used it as basis for this project

Installation

git clone https://github.com/re4son/pitftmenu
cd pitftmenu
For 2.8" screens: git checkout 2.8
customise the file "menu" to match the path
cusomise the scripts to suit your needs

Important: Pygame is broken on on Debian Jessie. I'll explain below how to fix it.

Usage

sudo ./menu

Layout

Start Screen

The first menu is menu_kali-1.py, which provides the following options:

menu_kali-1

All functions are self explainatory. After exiting and application, the screen returns back to the last menu.

The "Screen Off" function launches the python script "menu_screenoff.py", which uses the RPi.GPIO module to turn the screen off. You can turn it back on by pressing anywhere on the screen.

Using the ">>>" button, we can scroll to the next screen, namely "menu_kali-2.py"

menu_kali-2.py

Some more applications to launch:

menu_kali-2.py

Kismet and SDR-Scanner have to be installed for this to work. If you want to enable the reboot and shutdown commands you will need to make the following updates

sudo visudo

Add the following line:

%pi	ALL=(ALL:ALL) NOPASSWD: /sbin/poweroff, /sbin/reboot, /sbin/shutdown, /home/pi/pitftmenu/menu

menu_kali-3.py

This script allows us to stop and start services:

menu_kali-3.py

Press a button to start a service.

The button changes to green when the service is running:

running service

Press the button again to stop the service.

menu_kali-4.py

This script allows us to stop and start MySQL & Snort and allows to update the Snort rules via PulledPork: menu_kali-4.py

menu_kali-9.py

The last script displays some health information:

menu_kali-9

Run menu at startup

The preferred method to run this script on startup is to add it to the end of ".profile"

nano ~/home/.profile

And add the following line to the bottom of the file

sudo /home/pi/pitftmenu/menu

Fix Pygame on Debian Jessie

The package "libsdl1.2-15-10", which ships with Debian Jessie, breaks pygame. To make it work we have to revert back to "libsdl1.2-15-5" from Wheezy.

The quickest way is to comment everything out in your /etc/apt/sources.list and temporarily add:

deb http://archive.raspbian.org/raspbian wheezy main contrib non-free

Import the corresponding keys:

deb http://archive.raspbian.org/raspbian wheezy main contrib non-free
gpg -a --export 9165938D90FDDD2E | sudo apt-key add -

Remove the offending package and replace it with the working one:

sudo apt-get update
sudo apt-get remove libsdl1.2debian python-pygame
apt-get install libsdl-image1.2 libsdl-mixer1.2 libsdl-ttf2.0-0 libsdl1.2debian libsmpeg0 python-pygame
sudo apt-mark hold libsdl1.2debian

Restore "/etc/apt/sources.list" to it's original state.

That's it. Pygame is fixed :-)

References

This project is a fork of garthvh's work, available here: https://github.com/garthvh/pitftmenu

dv-pi-menu's People

Contributors

garthvh avatar re4son avatar

Stargazers

Cybershart avatar xorr0@riseup.net avatar

Watchers

James Cloos avatar  avatar

dv-pi-menu's Issues

Feature request for another menu

Hello, this is not an issue but i was wondering if there could be a menu for WIFI attacks? (such as wifijammer and mdk3 attacks) Or could you please let met know if there is a better way to make my own menus. Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.