User Tools

Site Tools


creator.py

Creator Script

The creator script must be launch via python3

| Terminal
python3 creator.py

USER
Data trasnfer script creator. Version 1.3.1 Written by Reno Sit
Computer IP is: xxx.xxx.xxx.xxx Please select '1' to enter the brewer information first
Select from one of the following options 1. Enter brewer info 2. Create rsync script 3. Set new usb name for the brewers 4. Setup dosbox config (Must have program folder moved) 5. Setup auto start script. 6. Setup smb 7. Shortcuts creator 8. Other Instructions 9. Quit

1. Enter brewer info

1. Enter brewer info

USER
Number of brewers? (1-4):
In this option you enter in what brewer will be in use on this computer. Enter in the # of brewer on this computer, then enter the 3 digit serial number being used.

2. Create rsync script

2. Create rsync script

Requirement

  • Complete option 1

Upon entering this option, it'll bring you back to the main menu as if nothing has happened. This is normal. Two files will be re-created/written over. rsync.sh and rsync-all.sh in side the schedule_task directory.

3. Set new usb name for the brewers

3. Set new usb name for the brewers

Requirement

  • Run the python script with sudo

USER
To create a usb name you will need the following information 1. usb name (ie: /dev/ttyUSB1) 2. Name you want for your device (Gear0) 3. This script must of been run with sudo, otherwise this will not work

Please pick the usb attached from the following list … Enter the USB to use (Enter just the USB #):

In this option, you are able to rename an USB port from a randomly assigned name (I.E. ttyUSB0) to a static name (I.E. com6). Best practice follows. Note: you must launch this script with sudo as it it is required for accessing and modifying the udev files.

  1. Ensure no device is connected.
  2. Restart the computer
  3. Plug the first USB com port into the computer.
  4. Enter the this option and you'll be prompted with a list of USB connected,
    b'[Mon Oct  5 15:28:15 2020] usb 3-1: FTDI USB Serial Device converter now attached to ttyUSB0\n
  5. Enter in 0, then confirm the usb device (y)
  6. Enter the name you would like to rename it to.
  7. You'll be returned back to the main menu. Repeat step 3-7

4. Setup dosbox config

4. Setup dosbox config

Requirements

  • Completed option 1
  • Have moved the corresponding brewer folder into /home/brewer/brews/

USER
Please make sure you have moved the Brewer instrument files into the correct location (/home/Br#xxx/ Please enter the USB name that is being used for Br#xxx:
This option will automatically rewrite the current dosbox config (I.E. BrewCom1-###.conf). Upon entering the the option, you'll be asked to enter in the com port that the specific brewer is using.

5. Setup auto start script

5. Setup auto start script

Requirement: None

USER
Pick an option. 1. Add a new auto start script 2. View an auto start script 3. Delete an auto start script 4. Return to main Menu
This option will assist you in creating a new auto start script for Linux Mint. There are already a few ready to go scripts. To access these, enter 1 (Add a new auto start script) and the following as the name

  1. vnc: This will automatically create the script to start the vnc server on computer startup.
  2. clock: This will automatically start the clock on computer startup.
  3. br#xxx: This will create a script to startup the brewer dosbox on computer startup. To get to this option, the first two letters of the name must be br. Afterwards you will be asked to enter the serial number of the brewer. Enter the 3 digit serial number (I.E. 026). afterwards, it'll bring you back out to the main menu with the script created.
  4. autossh: This will create a script to startup autossh tunnel. Once this is picked, enter the local port you wish to forward (22 for SSH, 5900 for VNC), then enter the port you wish to forward to.

6. Setup smb

6. Setup smb

Requirement:

  • Run the python script with sudo
  • Have Samba installed (This should of been part of the computer setup)

USER
Please make sure you have installed samba. Type y if you have installed samba already: y Did you launch this with sudo? y/n: y
You will be prompt to confirmed samba is installed and the python script launched with sudo. This will automatically add ~/brews as a shared folder by modifying the smb.config. (This only needs to be done once during the initial computer setup.)

7. Shortcuts creator

7. Shortcuts creator

Requirements:

  • Complete Option 1

USER
1. Create brewer dosbox shortcuts 2. Create clock shortcut 3. Create brewcmd shortcut 4. Return to menu

  1. Creates the brewer dosbox shortcuts for the brewers setup in option 1
  2. Creates the shortcut to launch the clock
  3. Create the shortcut to launch brewcmd via wine
creator.py.txt · Last modified: 2021/01/04 14:02 by reno