FIRST INSTALL
apt-get install chromium-browser
apt-get install omxplayer
apt-get install terminator
apt-get install nano (if not already installed)
apt-get install zenity (if not already installed)
THEN CREATE A BASH SCRIPT OF ALL OF THESE PERSONALLY WRITTEN SCRIPTS.
MAKE SURE THAT EVERY SHELL SCRIPT IS A .sh FILE ENDING EACH ONE OF THESE IS SCRIPTED TO OPEN UP A DIRECTORY FOR YOU TO FIND AND PICK WHAT YOU WANT.
IT RUNS A BACKGROUND TERMINAL & ALLOWS YOU TO CONTROL THE SONG OR MOVIE.
MOVIE KEYS ARE AS FOLLOWS; p or space bar for pause, q for quit, - & + for sound up and down, left arrow and right arrow for skipping forward and back.
MUSIC PLAYER REALLY ONLY HAS A SKIP SONG AND THAT IS CTRL+C AND IF THAT IS THE LAST SONG OR ONLY SONG THEN IT SHUTS DOWN AND THE TERMINAL GOES AWAY.
****INSTRUCTIONS TO MAKE THE SCRIPTS****
- OPEN UP A TERMINAL
- CD TO THE DIRECTORY YOU WANT THE SCRIPTS TO BE
cd /home/pi/Desktop/
- OPEN UP THE NANO EDITOR WITH THE TITLE OF SHELL YOU WANT
sudo nano Movie_Player.sh
- INSIDE NANO, TYPE OR COPY/PAST (REMEMBER THAT IN TERMINAL YOU NEED TO CTRL+SHIFT+V) THE SCRITP
- SAVE THE DATA WITH CTRL+O
ctrl+o
- HIT ENTER TO SAVE AS THAT FILE NAME OR DELETE THE FILE NAME THEN TYPE NEW ONE JUST MAKE SURE IT ENDS IN .sh THEN HIT ENTER
- NEXT YOU NEED TO SUDO CHMOD IT WITH +X TO MAKE IT CLICKABLE AS A BASH
sudo chmod +x Movie_Player.sh
- FINALLY RUN IT TO TEST EITHER BY DOUBLE CLICKING IT AND CHOOSING "EXECUTE IN TERMINAL" OR BY ./ IT IN TERMINAL
./Movie_Player.sh
YOU ARE NOW GOOD TO PICK A MOVIE OR SELECT A SONG OR ALBUM AND ENJOY!
**** ALL OF THESE SCRIPTS ACCOUNT FOR SPACES IN THE FILENAME
SO YOU CAN ACCESS "TOM PETTY" OR "SIXTEEN STONE" WITHOUT NEEDING THE " _ " BETWEEN THE WORDS.
-------WATCH A MOVIE SCRIPT ------- (
#! / bin / ทุบตี
FILE =zenity --title "Pick a Movie" --file-selection
สำหรับไฟล์ใน "$ {FILE [0]}"
ทำ omxplayer "$ {FILE [0]}" เรียบร้อยแล้ว
--------LISTEN TO A SONG -------
! / bin / ทุบตี
FILE =zenity --title "Pick a Song" --file-selection
สำหรับไฟล์ใน "$ {FILE [0]}"
เล่น "$ {FILE [0]}" เรียบร้อยแล้ว
--------LISTEN TO AN ALBUM ---------- SONGS IN ORDER
! / bin / ทุบตี
DIR =zenity --title "Pick a Album" --file-selection --directory
สำหรับ DIR ใน "$ {DIR [0]}"
ทำ cd "$ {DIR [0]}" && find -type f -name ' .ogg' -o -name ' .mp3' | เรียงลำดับ - ในขณะที่อ่าน DIR; เล่น "$ DIR" เสร็จแล้ว
--------LISTEN TO AN ALBUM WITH SONGS IN RANDOM ORDER --------
! / bin / ทุบตี
DIR =zenity --title "Pick a Album" --file-selection --directory
สำหรับ DIR ใน "$ {DIR [0]}"
ทำ cd "$ {DIR [0]}" && find -type f -name ' .ogg' -o -name ' .mp3' | ในขณะที่อ่าน DIR; เล่น "$ DIR" เสร็จแล้ว