Skip to content

Electrostat-Lab/Pi-Kiosk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pi-Kiosk

Kiosk Script Enabler for Pi applications

The raspberry pi reference :

https://www.raspberrypi.com/documentation/

To enable :

  1. Download this package.
  2. Edit the Pi-Kiosk/autostart/autostart.sh script to do what you want on starting up.
  3. Copy the package to /home/pi/.
  4. Start an lxterminal on the pi.
  5. Execute the install script and reboot :
sudo bash /home/pi/Pi-Kiosk/install/install.sh
reboot

To disable :

  • Execute the uninstall script and reboot :
sudo bash /home/pi/Pi-Kiosk/uninstall/uninstall.sh
reboot

Example for a javaFx fullscreen (immersion mode) application :

package sample;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;

/**
 * Fullscreen Jfx application with disabled window exit listener.
 * 
 * @author pavl_g.
 */
public class Main extends Application {

    @Override
    public void start(Stage primaryStage) throws Exception{
        Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"));
        primaryStage.setTitle("Hello World");
        primaryStage.setScene(new Scene(root));
        primaryStage.setFullScreen(true);
        primaryStage.setFullScreenExitHint("Welcome to the world !");
        primaryStage.setOnCloseRequest(event -> {
        });
        primaryStage.show();
    }
    
    public static void main(String[] args) {
        launch(args);
    }
}