kopia lustrzana https://github.com/F5OEO/rpidatv
Merge branch 'menu-simplification' of github.com:davecrump/rpidatv
commit
370810fb5c
|
@ -0,0 +1,3 @@
|
||||||
|
[Service]
|
||||||
|
ExecStart=
|
||||||
|
ExecStart=-/sbin/agetty --autologin pi --noclear %I 38400 linux
|
|
@ -0,0 +1,112 @@
|
||||||
|
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||||
|
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||||
|
# for examples
|
||||||
|
|
||||||
|
# If not running interactively, don't do anything
|
||||||
|
[ -z "$PS1" ] && return
|
||||||
|
|
||||||
|
# don't put duplicate lines or lines starting with space in the history.
|
||||||
|
# See bash(1) for more options
|
||||||
|
HISTCONTROL=ignoreboth
|
||||||
|
|
||||||
|
# append to the history file, don't overwrite it
|
||||||
|
shopt -s histappend
|
||||||
|
|
||||||
|
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||||
|
HISTSIZE=1000
|
||||||
|
HISTFILESIZE=2000
|
||||||
|
|
||||||
|
# check the window size after each command and, if necessary,
|
||||||
|
# update the values of LINES and COLUMNS.
|
||||||
|
shopt -s checkwinsize
|
||||||
|
|
||||||
|
# If set, the pattern "**" used in a pathname expansion context will
|
||||||
|
# match all files and zero or more directories and subdirectories.
|
||||||
|
#shopt -s globstar
|
||||||
|
|
||||||
|
# make less more friendly for non-text input files, see lesspipe(1)
|
||||||
|
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||||
|
|
||||||
|
# set variable identifying the chroot you work in (used in the prompt below)
|
||||||
|
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
|
||||||
|
debian_chroot=$(cat /etc/debian_chroot)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||||
|
case "$TERM" in
|
||||||
|
xterm-color) color_prompt=yes;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||||
|
# off by default to not distract the user: the focus in a terminal window
|
||||||
|
# should be on the output of commands, not on the prompt
|
||||||
|
force_color_prompt=yes
|
||||||
|
|
||||||
|
if [ -n "$force_color_prompt" ]; then
|
||||||
|
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||||
|
# We have color support; assume it's compliant with Ecma-48
|
||||||
|
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||||
|
# a case would tend to support setf rather than setaf.)
|
||||||
|
color_prompt=yes
|
||||||
|
else
|
||||||
|
color_prompt=
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$color_prompt" = yes ]; then
|
||||||
|
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\] \[\033[01;34m\]\w \$\[\033[00m\] '
|
||||||
|
else
|
||||||
|
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||||
|
fi
|
||||||
|
unset color_prompt force_color_prompt
|
||||||
|
|
||||||
|
# If this is an xterm set the title to user@host:dir
|
||||||
|
case "$TERM" in
|
||||||
|
xterm*|rxvt*)
|
||||||
|
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# enable color support of ls and also add handy aliases
|
||||||
|
if [ -x /usr/bin/dircolors ]; then
|
||||||
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
#alias dir='dir --color=auto'
|
||||||
|
#alias vdir='vdir --color=auto'
|
||||||
|
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
alias fgrep='fgrep --color=auto'
|
||||||
|
alias egrep='egrep --color=auto'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# some more ls aliases
|
||||||
|
#alias ll='ls -l'
|
||||||
|
#alias la='ls -A'
|
||||||
|
#alias l='ls -CF'
|
||||||
|
|
||||||
|
# Alias definitions.
|
||||||
|
# You may want to put all your additions into a separate file like
|
||||||
|
# ~/.bash_aliases, instead of adding them here directly.
|
||||||
|
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||||
|
|
||||||
|
if [ -f ~/.bash_aliases ]; then
|
||||||
|
. ~/.bash_aliases
|
||||||
|
fi
|
||||||
|
|
||||||
|
# enable programmable completion features (you don't need to enable
|
||||||
|
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||||
|
# sources /etc/bash.bashrc).
|
||||||
|
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
|
||||||
|
. /etc/bash_completion
|
||||||
|
fi
|
||||||
|
|
||||||
|
## Uncomment to enable tidy shutdown by hardware button
|
||||||
|
## Button to 3.3v on physical pin 15. LED to indicate still running on pin 13
|
||||||
|
## See https://github.com/philcrump/pi-sdn
|
||||||
|
## sudo pi-sdn 3 2 &
|
||||||
|
|
||||||
|
|
||||||
|
./rpidatv/scripts/rpibutton.sh
|
||||||
|
|
|
@ -0,0 +1,121 @@
|
||||||
|
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||||
|
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||||
|
# for examples
|
||||||
|
|
||||||
|
# If not running interactively, don't do anything
|
||||||
|
case $- in
|
||||||
|
*i*) ;;
|
||||||
|
*) return;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# don't put duplicate lines or lines starting with space in the history.
|
||||||
|
# See bash(1) for more options
|
||||||
|
HISTCONTROL=ignoreboth
|
||||||
|
|
||||||
|
# append to the history file, don't overwrite it
|
||||||
|
shopt -s histappend
|
||||||
|
|
||||||
|
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||||
|
HISTSIZE=1000
|
||||||
|
HISTFILESIZE=2000
|
||||||
|
|
||||||
|
# check the window size after each command and, if necessary,
|
||||||
|
# update the values of LINES and COLUMNS.
|
||||||
|
shopt -s checkwinsize
|
||||||
|
|
||||||
|
# If set, the pattern "**" used in a pathname expansion context will
|
||||||
|
# match all files and zero or more directories and subdirectories.
|
||||||
|
#shopt -s globstar
|
||||||
|
|
||||||
|
# make less more friendly for non-text input files, see lesspipe(1)
|
||||||
|
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||||
|
|
||||||
|
# set variable identifying the chroot you work in (used in the prompt below)
|
||||||
|
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
||||||
|
debian_chroot=$(cat /etc/debian_chroot)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||||
|
case "$TERM" in
|
||||||
|
xterm-color) color_prompt=yes;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||||
|
# off by default to not distract the user: the focus in a terminal window
|
||||||
|
# should be on the output of commands, not on the prompt
|
||||||
|
force_color_prompt=yes
|
||||||
|
|
||||||
|
if [ -n "$force_color_prompt" ]; then
|
||||||
|
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||||
|
# We have color support; assume it's compliant with Ecma-48
|
||||||
|
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||||
|
# a case would tend to support setf rather than setaf.)
|
||||||
|
color_prompt=yes
|
||||||
|
else
|
||||||
|
color_prompt=
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$color_prompt" = yes ]; then
|
||||||
|
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w \$\[\033[00m\] '
|
||||||
|
else
|
||||||
|
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||||
|
fi
|
||||||
|
unset color_prompt force_color_prompt
|
||||||
|
|
||||||
|
# If this is an xterm set the title to user@host:dir
|
||||||
|
case "$TERM" in
|
||||||
|
xterm*|rxvt*)
|
||||||
|
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# enable color support of ls and also add handy aliases
|
||||||
|
if [ -x /usr/bin/dircolors ]; then
|
||||||
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
#alias dir='dir --color=auto'
|
||||||
|
#alias vdir='vdir --color=auto'
|
||||||
|
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
alias fgrep='fgrep --color=auto'
|
||||||
|
alias egrep='egrep --color=auto'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# colored GCC warnings and errors
|
||||||
|
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||||
|
|
||||||
|
# some more ls aliases
|
||||||
|
#alias ll='ls -l'
|
||||||
|
#alias la='ls -A'
|
||||||
|
#alias l='ls -CF'
|
||||||
|
|
||||||
|
# Alias definitions.
|
||||||
|
# You may want to put all your additions into a separate file like
|
||||||
|
# ~/.bash_aliases, instead of adding them here directly.
|
||||||
|
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||||
|
|
||||||
|
if [ -f ~/.bash_aliases ]; then
|
||||||
|
. ~/.bash_aliases
|
||||||
|
fi
|
||||||
|
|
||||||
|
# enable programmable completion features (you don't need to enable
|
||||||
|
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||||
|
# sources /etc/bash.bashrc).
|
||||||
|
if ! shopt -oq posix; then
|
||||||
|
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||||
|
. /usr/share/bash-completion/bash_completion
|
||||||
|
elif [ -f /etc/bash_completion ]; then
|
||||||
|
. /etc/bash_completion
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
#con2fbmap 1 1
|
||||||
|
|
||||||
|
## Uncomment to enable tidy shutdown by hardware button
|
||||||
|
## Button to 3.3v on physical pin 15. LED to indicate still running on pin 13
|
||||||
|
## See https://github.com/philcrump/pi-sdn
|
||||||
|
## sudo pi-sdn 3 2 &
|
||||||
|
|
||||||
|
./rpidatv/scripts/menu.sh menu
|
|
@ -0,0 +1,121 @@
|
||||||
|
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||||
|
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||||
|
# for examples
|
||||||
|
|
||||||
|
# If not running interactively, don't do anything
|
||||||
|
case $- in
|
||||||
|
*i*) ;;
|
||||||
|
*) return;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# don't put duplicate lines or lines starting with space in the history.
|
||||||
|
# See bash(1) for more options
|
||||||
|
HISTCONTROL=ignoreboth
|
||||||
|
|
||||||
|
# append to the history file, don't overwrite it
|
||||||
|
shopt -s histappend
|
||||||
|
|
||||||
|
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||||
|
HISTSIZE=1000
|
||||||
|
HISTFILESIZE=2000
|
||||||
|
|
||||||
|
# check the window size after each command and, if necessary,
|
||||||
|
# update the values of LINES and COLUMNS.
|
||||||
|
shopt -s checkwinsize
|
||||||
|
|
||||||
|
# If set, the pattern "**" used in a pathname expansion context will
|
||||||
|
# match all files and zero or more directories and subdirectories.
|
||||||
|
#shopt -s globstar
|
||||||
|
|
||||||
|
# make less more friendly for non-text input files, see lesspipe(1)
|
||||||
|
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||||
|
|
||||||
|
# set variable identifying the chroot you work in (used in the prompt below)
|
||||||
|
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
||||||
|
debian_chroot=$(cat /etc/debian_chroot)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||||
|
case "$TERM" in
|
||||||
|
xterm-color) color_prompt=yes;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||||
|
# off by default to not distract the user: the focus in a terminal window
|
||||||
|
# should be on the output of commands, not on the prompt
|
||||||
|
force_color_prompt=yes
|
||||||
|
|
||||||
|
if [ -n "$force_color_prompt" ]; then
|
||||||
|
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||||
|
# We have color support; assume it's compliant with Ecma-48
|
||||||
|
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||||
|
# a case would tend to support setf rather than setaf.)
|
||||||
|
color_prompt=yes
|
||||||
|
else
|
||||||
|
color_prompt=
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$color_prompt" = yes ]; then
|
||||||
|
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w \$\[\033[00m\] '
|
||||||
|
else
|
||||||
|
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||||
|
fi
|
||||||
|
unset color_prompt force_color_prompt
|
||||||
|
|
||||||
|
# If this is an xterm set the title to user@host:dir
|
||||||
|
case "$TERM" in
|
||||||
|
xterm*|rxvt*)
|
||||||
|
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# enable color support of ls and also add handy aliases
|
||||||
|
if [ -x /usr/bin/dircolors ]; then
|
||||||
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
#alias dir='dir --color=auto'
|
||||||
|
#alias vdir='vdir --color=auto'
|
||||||
|
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
alias fgrep='fgrep --color=auto'
|
||||||
|
alias egrep='egrep --color=auto'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# colored GCC warnings and errors
|
||||||
|
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||||
|
|
||||||
|
# some more ls aliases
|
||||||
|
#alias ll='ls -l'
|
||||||
|
#alias la='ls -A'
|
||||||
|
#alias l='ls -CF'
|
||||||
|
|
||||||
|
# Alias definitions.
|
||||||
|
# You may want to put all your additions into a separate file like
|
||||||
|
# ~/.bash_aliases, instead of adding them here directly.
|
||||||
|
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||||
|
|
||||||
|
if [ -f ~/.bash_aliases ]; then
|
||||||
|
. ~/.bash_aliases
|
||||||
|
fi
|
||||||
|
|
||||||
|
# enable programmable completion features (you don't need to enable
|
||||||
|
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||||
|
# sources /etc/bash.bashrc).
|
||||||
|
if ! shopt -oq posix; then
|
||||||
|
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||||
|
. /usr/share/bash-completion/bash_completion
|
||||||
|
elif [ -f /etc/bash_completion ]; then
|
||||||
|
. /etc/bash_completion
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
#con2fbmap 1 1
|
||||||
|
|
||||||
|
## Uncomment to enable tidy shutdown by hardware button
|
||||||
|
## Button to 3.3v on physical pin 15. LED to indicate still running on pin 13
|
||||||
|
## See https://github.com/philcrump/pi-sdn
|
||||||
|
## sudo pi-sdn 3 2 &
|
||||||
|
|
||||||
|
./rpidatv/scripts/menu.sh
|
|
@ -0,0 +1,113 @@
|
||||||
|
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||||
|
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||||
|
# for examples
|
||||||
|
|
||||||
|
# If not running interactively, don't do anything
|
||||||
|
[ -z "$PS1" ] && return
|
||||||
|
|
||||||
|
# don't put duplicate lines or lines starting with space in the history.
|
||||||
|
# See bash(1) for more options
|
||||||
|
HISTCONTROL=ignoreboth
|
||||||
|
|
||||||
|
# append to the history file, don't overwrite it
|
||||||
|
shopt -s histappend
|
||||||
|
|
||||||
|
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||||
|
HISTSIZE=1000
|
||||||
|
HISTFILESIZE=2000
|
||||||
|
|
||||||
|
# check the window size after each command and, if necessary,
|
||||||
|
# update the values of LINES and COLUMNS.
|
||||||
|
shopt -s checkwinsize
|
||||||
|
|
||||||
|
# If set, the pattern "**" used in a pathname expansion context will
|
||||||
|
# match all files and zero or more directories and subdirectories.
|
||||||
|
#shopt -s globstar
|
||||||
|
|
||||||
|
# make less more friendly for non-text input files, see lesspipe(1)
|
||||||
|
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||||
|
|
||||||
|
# set variable identifying the chroot you work in (used in the prompt below)
|
||||||
|
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
|
||||||
|
debian_chroot=$(cat /etc/debian_chroot)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||||
|
case "$TERM" in
|
||||||
|
xterm-color) color_prompt=yes;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||||
|
# off by default to not distract the user: the focus in a terminal window
|
||||||
|
# should be on the output of commands, not on the prompt
|
||||||
|
force_color_prompt=yes
|
||||||
|
|
||||||
|
if [ -n "$force_color_prompt" ]; then
|
||||||
|
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||||
|
# We have color support; assume it's compliant with Ecma-48
|
||||||
|
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||||
|
# a case would tend to support setf rather than setaf.)
|
||||||
|
color_prompt=yes
|
||||||
|
else
|
||||||
|
color_prompt=
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$color_prompt" = yes ]; then
|
||||||
|
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\] \[\033[01;34m\]\w \$\[\033[00m\] '
|
||||||
|
else
|
||||||
|
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||||
|
fi
|
||||||
|
unset color_prompt force_color_prompt
|
||||||
|
|
||||||
|
# If this is an xterm set the title to user@host:dir
|
||||||
|
case "$TERM" in
|
||||||
|
xterm*|rxvt*)
|
||||||
|
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# enable color support of ls and also add handy aliases
|
||||||
|
if [ -x /usr/bin/dircolors ]; then
|
||||||
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
#alias dir='dir --color=auto'
|
||||||
|
#alias vdir='vdir --color=auto'
|
||||||
|
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
alias fgrep='fgrep --color=auto'
|
||||||
|
alias egrep='egrep --color=auto'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# some more ls aliases
|
||||||
|
#alias ll='ls -l'
|
||||||
|
#alias la='ls -A'
|
||||||
|
#alias l='ls -CF'
|
||||||
|
|
||||||
|
# Alias definitions.
|
||||||
|
# You may want to put all your additions into a separate file like
|
||||||
|
# ~/.bash_aliases, instead of adding them here directly.
|
||||||
|
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||||
|
|
||||||
|
if [ -f ~/.bash_aliases ]; then
|
||||||
|
. ~/.bash_aliases
|
||||||
|
fi
|
||||||
|
|
||||||
|
# enable programmable completion features (you don't need to enable
|
||||||
|
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||||
|
# sources /etc/bash.bashrc).
|
||||||
|
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
|
||||||
|
. /etc/bash_completion
|
||||||
|
fi
|
||||||
|
|
||||||
|
## Uncomment to enable tidy shutdown by hardware button
|
||||||
|
## Button to 3.3v on physical pin 15. LED to indicate still running on pin 13
|
||||||
|
## See https://github.com/philcrump/pi-sdn
|
||||||
|
## sudo pi-sdn 3 2 &
|
||||||
|
|
||||||
|
sudo killall fbcp
|
||||||
|
fbcp &
|
||||||
|
./rpidatv/bin/rpidatvgui
|
||||||
|
|
|
@ -0,0 +1,113 @@
|
||||||
|
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||||
|
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||||
|
# for examples
|
||||||
|
|
||||||
|
# If not running interactively, don't do anything
|
||||||
|
[ -z "$PS1" ] && return
|
||||||
|
|
||||||
|
# don't put duplicate lines or lines starting with space in the history.
|
||||||
|
# See bash(1) for more options
|
||||||
|
HISTCONTROL=ignoreboth
|
||||||
|
|
||||||
|
# append to the history file, don't overwrite it
|
||||||
|
shopt -s histappend
|
||||||
|
|
||||||
|
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||||
|
HISTSIZE=1000
|
||||||
|
HISTFILESIZE=2000
|
||||||
|
|
||||||
|
# check the window size after each command and, if necessary,
|
||||||
|
# update the values of LINES and COLUMNS.
|
||||||
|
shopt -s checkwinsize
|
||||||
|
|
||||||
|
# If set, the pattern "**" used in a pathname expansion context will
|
||||||
|
# match all files and zero or more directories and subdirectories.
|
||||||
|
#shopt -s globstar
|
||||||
|
|
||||||
|
# make less more friendly for non-text input files, see lesspipe(1)
|
||||||
|
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||||
|
|
||||||
|
# set variable identifying the chroot you work in (used in the prompt below)
|
||||||
|
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
|
||||||
|
debian_chroot=$(cat /etc/debian_chroot)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||||
|
case "$TERM" in
|
||||||
|
xterm-color) color_prompt=yes;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||||
|
# off by default to not distract the user: the focus in a terminal window
|
||||||
|
# should be on the output of commands, not on the prompt
|
||||||
|
force_color_prompt=yes
|
||||||
|
|
||||||
|
if [ -n "$force_color_prompt" ]; then
|
||||||
|
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||||
|
# We have color support; assume it's compliant with Ecma-48
|
||||||
|
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||||
|
# a case would tend to support setf rather than setaf.)
|
||||||
|
color_prompt=yes
|
||||||
|
else
|
||||||
|
color_prompt=
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$color_prompt" = yes ]; then
|
||||||
|
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\] \[\033[01;34m\]\w \$\[\033[00m\] '
|
||||||
|
else
|
||||||
|
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||||
|
fi
|
||||||
|
unset color_prompt force_color_prompt
|
||||||
|
|
||||||
|
# If this is an xterm set the title to user@host:dir
|
||||||
|
case "$TERM" in
|
||||||
|
xterm*|rxvt*)
|
||||||
|
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# enable color support of ls and also add handy aliases
|
||||||
|
if [ -x /usr/bin/dircolors ]; then
|
||||||
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
#alias dir='dir --color=auto'
|
||||||
|
#alias vdir='vdir --color=auto'
|
||||||
|
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
alias fgrep='fgrep --color=auto'
|
||||||
|
alias egrep='egrep --color=auto'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# some more ls aliases
|
||||||
|
#alias ll='ls -l'
|
||||||
|
#alias la='ls -A'
|
||||||
|
#alias l='ls -CF'
|
||||||
|
|
||||||
|
# Alias definitions.
|
||||||
|
# You may want to put all your additions into a separate file like
|
||||||
|
# ~/.bash_aliases, instead of adding them here directly.
|
||||||
|
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||||
|
|
||||||
|
if [ -f ~/.bash_aliases ]; then
|
||||||
|
. ~/.bash_aliases
|
||||||
|
fi
|
||||||
|
|
||||||
|
# enable programmable completion features (you don't need to enable
|
||||||
|
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||||
|
# sources /etc/bash.bashrc).
|
||||||
|
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
|
||||||
|
. /etc/bash_completion
|
||||||
|
fi
|
||||||
|
|
||||||
|
## Uncomment to enable tidy shutdown by hardware button
|
||||||
|
## Button to 3.3v on physical pin 15. LED to indicate still running on pin 13
|
||||||
|
## See https://github.com/philcrump/pi-sdn
|
||||||
|
## sudo pi-sdn 3 2 &
|
||||||
|
|
||||||
|
sudo killall fbcp
|
||||||
|
fbcp &
|
||||||
|
./rpidatv/bin/rpidatvgui 1
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
# KEYBOARD CONFIGURATION FILE
|
||||||
|
|
||||||
|
# Consult the keyboard(5) manual page.
|
||||||
|
|
||||||
|
XKBMODEL="pc105"
|
||||||
|
XKBLAYOUT="fr"
|
||||||
|
XKBVARIANT=""
|
||||||
|
XKBOPTIONS=""
|
||||||
|
|
||||||
|
BACKSPACE="guess"
|
|
@ -0,0 +1,10 @@
|
||||||
|
# KEYBOARD CONFIGURATION FILE
|
||||||
|
|
||||||
|
# Consult the keyboard(5) manual page.
|
||||||
|
|
||||||
|
XKBMODEL="pc105"
|
||||||
|
XKBLAYOUT="gb"
|
||||||
|
XKBVARIANT=""
|
||||||
|
XKBOPTIONS=""
|
||||||
|
|
||||||
|
BACKSPACE="guess"
|
|
@ -0,0 +1,10 @@
|
||||||
|
# KEYBOARD CONFIGURATION FILE
|
||||||
|
|
||||||
|
# Consult the keyboard(5) manual page.
|
||||||
|
|
||||||
|
XKBMODEL="pc105"
|
||||||
|
XKBLAYOUT="us"
|
||||||
|
XKBVARIANT=""
|
||||||
|
XKBOPTIONS=""
|
||||||
|
|
||||||
|
BACKSPACE="guess"
|
|
@ -0,0 +1,118 @@
|
||||||
|
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||||
|
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||||
|
# for examples
|
||||||
|
|
||||||
|
# If not running interactively, don't do anything
|
||||||
|
case $- in
|
||||||
|
*i*) ;;
|
||||||
|
*) return;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# don't put duplicate lines or lines starting with space in the history.
|
||||||
|
# See bash(1) for more options
|
||||||
|
HISTCONTROL=ignoreboth
|
||||||
|
|
||||||
|
# append to the history file, don't overwrite it
|
||||||
|
shopt -s histappend
|
||||||
|
|
||||||
|
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||||
|
HISTSIZE=1000
|
||||||
|
HISTFILESIZE=2000
|
||||||
|
|
||||||
|
# check the window size after each command and, if necessary,
|
||||||
|
# update the values of LINES and COLUMNS.
|
||||||
|
shopt -s checkwinsize
|
||||||
|
|
||||||
|
# If set, the pattern "**" used in a pathname expansion context will
|
||||||
|
# match all files and zero or more directories and subdirectories.
|
||||||
|
#shopt -s globstar
|
||||||
|
|
||||||
|
# make less more friendly for non-text input files, see lesspipe(1)
|
||||||
|
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||||
|
|
||||||
|
# set variable identifying the chroot you work in (used in the prompt below)
|
||||||
|
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
||||||
|
debian_chroot=$(cat /etc/debian_chroot)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||||
|
case "$TERM" in
|
||||||
|
xterm-color) color_prompt=yes;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||||
|
# off by default to not distract the user: the focus in a terminal window
|
||||||
|
# should be on the output of commands, not on the prompt
|
||||||
|
force_color_prompt=yes
|
||||||
|
|
||||||
|
if [ -n "$force_color_prompt" ]; then
|
||||||
|
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||||
|
# We have color support; assume it's compliant with Ecma-48
|
||||||
|
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||||
|
# a case would tend to support setf rather than setaf.)
|
||||||
|
color_prompt=yes
|
||||||
|
else
|
||||||
|
color_prompt=
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$color_prompt" = yes ]; then
|
||||||
|
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w \$\[\033[00m\] '
|
||||||
|
else
|
||||||
|
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||||
|
fi
|
||||||
|
unset color_prompt force_color_prompt
|
||||||
|
|
||||||
|
# If this is an xterm set the title to user@host:dir
|
||||||
|
case "$TERM" in
|
||||||
|
xterm*|rxvt*)
|
||||||
|
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# enable color support of ls and also add handy aliases
|
||||||
|
if [ -x /usr/bin/dircolors ]; then
|
||||||
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
#alias dir='dir --color=auto'
|
||||||
|
#alias vdir='vdir --color=auto'
|
||||||
|
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
alias fgrep='fgrep --color=auto'
|
||||||
|
alias egrep='egrep --color=auto'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# colored GCC warnings and errors
|
||||||
|
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||||
|
|
||||||
|
# some more ls aliases
|
||||||
|
#alias ll='ls -l'
|
||||||
|
#alias la='ls -A'
|
||||||
|
#alias l='ls -CF'
|
||||||
|
|
||||||
|
# Alias definitions.
|
||||||
|
# You may want to put all your additions into a separate file like
|
||||||
|
# ~/.bash_aliases, instead of adding them here directly.
|
||||||
|
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||||
|
|
||||||
|
if [ -f ~/.bash_aliases ]; then
|
||||||
|
. ~/.bash_aliases
|
||||||
|
fi
|
||||||
|
|
||||||
|
# enable programmable completion features (you don't need to enable
|
||||||
|
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||||
|
# sources /etc/bash.bashrc).
|
||||||
|
if ! shopt -oq posix; then
|
||||||
|
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||||
|
. /usr/share/bash-completion/bash_completion
|
||||||
|
elif [ -f /etc/bash_completion ]; then
|
||||||
|
. /etc/bash_completion
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
## Uncomment to enable tidy shutdown by hardware button
|
||||||
|
## Button to 3.3v on physical pin 15. LED to indicate still running on pin 13
|
||||||
|
## See https://github.com/philcrump/pi-sdn
|
||||||
|
## sudo pi-sdn 3 2 &
|
|
@ -0,0 +1,21 @@
|
||||||
|
modeinput=PATERNAUDIO
|
||||||
|
symbolrate=250
|
||||||
|
fec=7
|
||||||
|
freqoutput=437
|
||||||
|
rfpower=7
|
||||||
|
modeoutput=QPSKRF
|
||||||
|
tsvideofile=/home/pi/rpidatv/video/f4day.ts
|
||||||
|
call=F5OEO
|
||||||
|
paternfile=/home/pi/rpidatv/video
|
||||||
|
udpinaddr=230.0.0.2
|
||||||
|
pidvideo=1001
|
||||||
|
pidpmt=1000
|
||||||
|
serviceid=1
|
||||||
|
gpio_i=12
|
||||||
|
gpio_q=13
|
||||||
|
pathmedia=/home/pi/rpidatv/video
|
||||||
|
locator=JNO6EP
|
||||||
|
pidstart=1000
|
||||||
|
pidaudio=1002
|
||||||
|
display=Waveshare
|
||||||
|
menulanguage=fr
|
|
@ -85,11 +85,19 @@ StrAutostartMenu="Démarrage automatique"
|
||||||
StrDisplayMenu="Ecran"
|
StrDisplayMenu="Ecran"
|
||||||
StrIPMenu="Adresse IP"
|
StrIPMenu="Adresse IP"
|
||||||
|
|
||||||
|
######## AUTOSTART MENU #########
|
||||||
|
|
||||||
StrAutostartSetupTitle="Configure le démarrage"
|
StrAutostartSetupTitle="Configure le démarrage"
|
||||||
StrAutostartSetupContext="Choix:"
|
StrAutostartSetupContext="Choix:"
|
||||||
AutostartSetupConsole="Menu console(ce menu)"
|
AutostartSetupPrompt="Log-on to Linux Command Prompt"
|
||||||
AutostartSetupDisplay="Graphique(avec ecran tactile)"
|
AutostartSetupConsole="Log-on to rpidatv Menu"
|
||||||
AutostartSetupButton="Boutons poussoires"
|
AutostartSetupDisplay="Log-on to start Graphique(avec ecran tactile)"
|
||||||
|
AutostartSetupButton="Log-on to enable Boutons poussoires"
|
||||||
|
AutostartSetupTX_boot="Boot-up to Transmit"
|
||||||
|
AutostartSetupDisplay_boot="Boot-up to Graphique(avec ecran tactile)"
|
||||||
|
AutostartSetupButton_boot="Boot-up to Boutons poussoires"
|
||||||
|
|
||||||
|
######## TOUCHSCREEN MENU #########
|
||||||
|
|
||||||
StrDisplaySetupTitle="Configure un ecran tactile - apres reboot"
|
StrDisplaySetupTitle="Configure un ecran tactile - apres reboot"
|
||||||
StrDisplaySetupContext="Choix:"
|
StrDisplaySetupContext="Choix:"
|
||||||
|
@ -101,6 +109,11 @@ DisplaySetupConsole="Network Console"
|
||||||
StrIPSetupTitle="Configure en IP Statique"
|
StrIPSetupTitle="Configure en IP Statique"
|
||||||
StrIPSetupContext="Exemple: 192.168.1.60"
|
StrIPSetupContext="Exemple: 192.168.1.60"
|
||||||
|
|
||||||
|
######## LANGUAGE MENU #########
|
||||||
|
|
||||||
|
StrLanguageTitle="Configure la Langue"
|
||||||
|
StrKeyboardChange="Redemarrage apres reglage"
|
||||||
|
|
||||||
######## MAIN MENU #########
|
######## MAIN MENU #########
|
||||||
StrMainMenuTitle="RpiDATV GUI Version 2.0 (F5OEO Evariste)"
|
StrMainMenuTitle="RpiDATV GUI Version 2.0 (F5OEO Evariste)"
|
||||||
StrMainMenuSource="Selection de la source"
|
StrMainMenuSource="Selection de la source"
|
||||||
|
|
|
@ -82,11 +82,19 @@ StrAutostartMenu="Automatic startup"
|
||||||
StrDisplayMenu="Display type"
|
StrDisplayMenu="Display type"
|
||||||
StrIPMenu="IP Address"
|
StrIPMenu="IP Address"
|
||||||
|
|
||||||
|
######## AUTOSTART MENU #########
|
||||||
|
|
||||||
StrAutostartSetupTitle="Autostart setup"
|
StrAutostartSetupTitle="Autostart setup"
|
||||||
StrAutostartSetupContext="Choice:"
|
StrAutostartSetupContext="Choice:"
|
||||||
AutostartSetupConsole="Console menu"
|
AutostartSetupPrompt="Log-on to Linux Command Prompt"
|
||||||
AutostartSetupDisplay="Display with touchscreen"
|
AutostartSetupConsole="Log-on to rpidatv Menu"
|
||||||
AutostartSetupButton="Push buttons"
|
AutostartSetupDisplay="Log-on to start Touchscreen Display"
|
||||||
|
AutostartSetupButton="Log-on to enable Button Control"
|
||||||
|
AutostartSetupTX_boot="Boot-up to Transmit"
|
||||||
|
AutostartSetupDisplay_boot="Boot-up to Touchscreen Display"
|
||||||
|
AutostartSetupButton_boot="Boot-up to Button Control"
|
||||||
|
|
||||||
|
######## TOUCHSCREEN MENU #########
|
||||||
|
|
||||||
StrDisplaySetupTitle="Touchscreen setup - needs reboot after setting"
|
StrDisplaySetupTitle="Touchscreen setup - needs reboot after setting"
|
||||||
StrDisplaySetupContext="Choice:"
|
StrDisplaySetupContext="Choice:"
|
||||||
|
@ -98,10 +106,15 @@ DisplaySetupConsole="Network Console"
|
||||||
StrIPSetupTitle="Setup a static IP"
|
StrIPSetupTitle="Setup a static IP"
|
||||||
StrIPSetupContext="Example: 192.168.1.60"
|
StrIPSetupContext="Example: 192.168.1.60"
|
||||||
|
|
||||||
|
######## LANGUAGE MENU #########
|
||||||
|
|
||||||
|
StrLanguageTitle="Language Selection"
|
||||||
|
StrKeyboardChange="Needs reboot after setting"
|
||||||
|
|
||||||
######## MAIN MENU #########
|
######## MAIN MENU #########
|
||||||
StrMainMenuTitle="RpiDATV GUI Version 2.0 (F5OEO Evariste)"
|
StrMainMenuTitle="RpiDATV GUI Version 2.0 (F5OEO Evariste)"
|
||||||
StrMainMenuSource="Source select"
|
StrMainMenuSource="Select Video Source"
|
||||||
StrMainMenuOutput="Output select"
|
StrMainMenuOutput="Configure Output"
|
||||||
StrMainMenuCall="Station call setup"
|
StrMainMenuCall="Station call setup"
|
||||||
StrMainMenuSystem="System setup"
|
StrMainMenuSystem="System setup"
|
||||||
StrMainMenuExitTitle="Exit"
|
StrMainMenuExitTitle="Exit"
|
||||||
|
|
222
scripts/menu.sh
222
scripts/menu.sh
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
PATHSCRIPT=/home/pi/rpidatv/scripts
|
PATHSCRIPT=/home/pi/rpidatv/scripts
|
||||||
PATHRPI=/home/pi/rpidatv/bin
|
PATHRPI=/home/pi/rpidatv/bin
|
||||||
|
CONFIGFILE=$PATHSCRIPT"/rpidatvconfig.txt"
|
||||||
|
PATHCONFIGS="/home/pi/rpidatv/scripts/configs" ## Path to config files
|
||||||
|
|
||||||
set_config_var() {
|
set_config_var() {
|
||||||
lua - "$1" "$2" "$3" <<EOF > "$3.bak"
|
lua - "$1" "$2" "$3" <<EOF > "$3.bak"
|
||||||
|
@ -600,10 +602,9 @@ menuchoice=$(whiptail --title "$StrOutputTitle" --menu "$StrOutputContext" 16 78
|
||||||
|
|
||||||
do_transmit()
|
do_transmit()
|
||||||
{
|
{
|
||||||
$PATHSCRIPT"/a.sh" >/dev/null 2>/dev/null &
|
$PATHSCRIPT"/a.sh" >/dev/null 2>/dev/null &
|
||||||
#$PATHSCRIPT"/a.sh" &
|
do_status # Wait here transmitting until user presses a key
|
||||||
do_status
|
do_stop_transmit
|
||||||
do_stop_transmit
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_stop_transmit()
|
do_stop_transmit()
|
||||||
|
@ -642,8 +643,6 @@ do_receive_status()
|
||||||
whiptail --title "RECEIVE" --msgbox "$INFO" 8 78
|
whiptail --title "RECEIVE" --msgbox "$INFO" 8 78
|
||||||
sudo killall rpidatvgui >/dev/null 2>/dev/null
|
sudo killall rpidatvgui >/dev/null 2>/dev/null
|
||||||
sudo killall leandvb >/dev/null 2>/dev/null
|
sudo killall leandvb >/dev/null 2>/dev/null
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_receive()
|
do_receive()
|
||||||
|
@ -664,59 +663,101 @@ do_receive()
|
||||||
/home/pi/rpidatv/bin/rpidatvgui 0 1 >/dev/null 2>/dev/null &
|
/home/pi/rpidatv/bin/rpidatvgui 0 1 >/dev/null 2>/dev/null &
|
||||||
do_receive_status;;
|
do_receive_status;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_autostart_setup()
|
do_autostart_setup()
|
||||||
{
|
{
|
||||||
MODE_STARTUP=$(get_config_var startup $CONFIGFILE)
|
MODE_STARTUP=$(get_config_var startup $CONFIGFILE)
|
||||||
case "$MODE_STARTUP" in
|
|
||||||
Console)
|
|
||||||
Radio1=ON
|
|
||||||
Radio2=OFF
|
|
||||||
Radio3=OFF
|
|
||||||
;;
|
|
||||||
Display)
|
|
||||||
Radio1=OFF
|
|
||||||
Radio2=ON
|
|
||||||
Radio3=OFF
|
|
||||||
;;
|
|
||||||
Button)
|
|
||||||
Radio1=OFF
|
|
||||||
Radio2=OFF
|
|
||||||
Radio3=ON
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
Radio1=ON
|
|
||||||
Radio2=OFF
|
|
||||||
Radio3=OFF
|
|
||||||
|
|
||||||
esac
|
|
||||||
|
|
||||||
chstartup=$(whiptail --title "$StrAutostartSetupTitle" --radiolist \
|
Radio1=OFF
|
||||||
"$StrAutostartSetupContext" 20 78 8 \
|
Radio2=OFF
|
||||||
"Console" "$AutostartSetupConsole" $Radio1 \
|
Radio3=OFF
|
||||||
"Display" "$AutostartSetupDisplay" $Radio2 \
|
Radio4=OFF
|
||||||
"Button" "$AutostartSetupButton" $Radio3 \
|
Radio5=OFF
|
||||||
3>&2 2>&1 1>&3)
|
Radio6=OFF
|
||||||
|
Radio7=OFF
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
case "$MODE_STARTUP" in
|
||||||
|
Prompt)
|
||||||
case "$chstartup" in
|
Radio1=ON;;
|
||||||
Console) cp $PATHSCRIPT"/install_bashrc" /home/pi/.bashrc >/dev/null 2>/dev/null;;
|
Console)
|
||||||
Display) MODE_DISPLAY=$(get_config_var display $CONFIGFILE)
|
Radio2=ON;;
|
||||||
case "$MODE_DISPLAY" in
|
Display)
|
||||||
Waveshare)
|
Radio3=ON;;
|
||||||
cp $PATHSCRIPT"/install_display_inversed.fr" /home/pi/.bashrc >/dev/null 2>/dev/null;;
|
Button)
|
||||||
*)
|
Radio4=ON;;
|
||||||
cp $PATHSCRIPT"/install_display.fr" /home/pi/.bashrc >/dev/null 2>/dev/null;;
|
TX_boot)
|
||||||
esac;;
|
Radio5=ON;;
|
||||||
|
Display_boot)
|
||||||
Button) cp $PATHSCRIPT"/install_button" /home/pi/.bashrc >/dev/null 2>/dev/null;;
|
Radio6=ON;;
|
||||||
|
Button_boot)
|
||||||
esac
|
Radio7=ON;;
|
||||||
set_config_var startup "$chstartup" $CONFIGFILE
|
*)
|
||||||
fi
|
Radio1=ON;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
chstartup=$(whiptail --title "$StrAutostartSetupTitle" --radiolist \
|
||||||
|
"$StrAutostartSetupContext" 20 78 8 \
|
||||||
|
"Prompt" "$AutostartSetupPrompt" $Radio1 \
|
||||||
|
"Console" "$AutostartSetupConsole" $Radio2 \
|
||||||
|
"Display" "$AutostartSetupDisplay" $Radio3 \
|
||||||
|
"Button" "$AutostartSetupButton" $Radio4 \
|
||||||
|
"TX_boot" "$AutostartSetupTX_boot" $Radio5 \
|
||||||
|
"Display_boot" "$AutostartSetupDisplay_boot" $Radio6 \
|
||||||
|
"Button_boot" "$AutostartSetupButton_boot" $Radio7 \
|
||||||
|
3>&2 2>&1 1>&3)
|
||||||
|
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
case "$chstartup" in
|
||||||
|
Prompt)
|
||||||
|
sudo systemctl disable getty@tty1.service
|
||||||
|
sudo rm /etc/systemd/system/getty@tty1.service.d/autologin.conf
|
||||||
|
cp $PATHCONFIGS"/prompt.bashrc" /home/pi/.bashrc;;
|
||||||
|
Console)
|
||||||
|
sudo systemctl disable getty@tty1.service
|
||||||
|
sudo rm /etc/systemd/system/getty@tty1.service.d/autologin.conf
|
||||||
|
cp $PATHCONFIGS"/console.bashrc" /home/pi/.bashrc;;
|
||||||
|
|
||||||
|
##$PATHSCRIPT"/install_bashrc" /home/pi/.bashrc >/dev/null 2>/dev/null;;
|
||||||
|
|
||||||
|
Display)
|
||||||
|
sudo systemctl disable getty@tty1.service
|
||||||
|
sudo rm /etc/systemd/system/getty@tty1.service.d/autologin.conf
|
||||||
|
MODE_DISPLAY=$(get_config_var display $CONFIGFILE)
|
||||||
|
case "$MODE_DISPLAY" in
|
||||||
|
Waveshare)
|
||||||
|
cp $PATHCONFIGS"/displaywaveshare.bashrc" /home/pi/.bashrc;; #>/dev/null 2>/dev/null;;
|
||||||
|
*)
|
||||||
|
cp $PATHCONFIGS"/display.bashrc" /home/pi/.bashrc;; #>/dev/null 2>/dev/null;;
|
||||||
|
esac;;
|
||||||
|
Button)
|
||||||
|
sudo systemctl disable getty@tty1.service
|
||||||
|
sudo rm /etc/systemd/system/getty@tty1.service.d/autologin.conf
|
||||||
|
cp $PATHCONFIGS"/button.bashrc" /home/pi/.bashrc;;
|
||||||
|
TX_boot)
|
||||||
|
sudo mkdir -pv /etc/systemd/system/getty@tty1.service.d/
|
||||||
|
sudo cp $PATHCONFIGS"/autologin.conf" /etc/systemd/system/getty@tty1.service.d/
|
||||||
|
sudo systemctl enable getty@tty1.service
|
||||||
|
cp $PATHCONFIGS"/console_tx.bashrc" /home/pi/.bashrc;;
|
||||||
|
Display_boot)
|
||||||
|
sudo mkdir -pv /etc/systemd/system/getty@tty1.service.d/
|
||||||
|
sudo cp $PATHCONFIGS"/autologin.conf" /etc/systemd/system/getty@tty1.service.d/
|
||||||
|
sudo systemctl enable getty@tty1.service
|
||||||
|
MODE_DISPLAY=$(get_config_var display $CONFIGFILE)
|
||||||
|
case "$MODE_DISPLAY" in
|
||||||
|
Waveshare)
|
||||||
|
cp $PATHCONFIGS"/displaywaveshare.bashrc" /home/pi/.bashrc;; #>/dev/null 2>/dev/null;;
|
||||||
|
*)
|
||||||
|
cp $PATHCONFIGS"/display.bashrc" /home/pi/.bashrc;; #>/dev/null 2>/dev/null;;
|
||||||
|
esac;;
|
||||||
|
Button_boot)
|
||||||
|
sudo mkdir -pv /etc/systemd/system/getty@tty1.service.d/
|
||||||
|
sudo cp $PATHCONFIGS"/autologin.conf" /etc/systemd/system/getty@tty1.service.d/
|
||||||
|
sudo systemctl enable getty@tty1.service
|
||||||
|
cp $PATHCONFIGS"/button.bashrc" /home/pi/.bashrc;;
|
||||||
|
esac
|
||||||
|
set_config_var startup "$chstartup" $CONFIGFILE
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
do_display_setup()
|
do_display_setup()
|
||||||
|
@ -769,20 +810,20 @@ chdisplay=$(whiptail --title "$StrDisplaySetupTitle" --radiolist \
|
||||||
## Set constants for the amendment of /boot/config.txt below
|
## Set constants for the amendment of /boot/config.txt below
|
||||||
|
|
||||||
PATHCONFIGS="/home/pi/rpidatv/scripts/configs" ## Path to config files
|
PATHCONFIGS="/home/pi/rpidatv/scripts/configs" ## Path to config files
|
||||||
lead='^## Begin LCD Driver' ## Marker for start of inserted message
|
lead='^## Begin LCD Driver' ## Marker for start of inserted text
|
||||||
tail='^## End LCD Driver' ## Marker for start of inserted message
|
tail='^## End LCD Driver' ## Marker for end of inserted text
|
||||||
CHANGEFILE="/boot/config.txt" ## File requiring added message
|
CHANGEFILE="/boot/config.txt" ## File requiring added text
|
||||||
APPENDFILE=$PATHCONFIGS"/lcd_markers.txt" ## File containing both markers
|
APPENDFILE=$PATHCONFIGS"/lcd_markers.txt" ## File containing both markers
|
||||||
TRANSFILE=$PATHCONFIGS"/transfer.txt" ## File used for transfer
|
TRANSFILE=$PATHCONFIGS"/transfer.txt" ## File used for transfer
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then ## If the selection has changed
|
if [ $? -eq 0 ]; then ## If the selection has changed
|
||||||
|
|
||||||
grep -q "$lead" "$CHANGEFILE" ## Is the first marker already present?
|
grep -q "$lead" "$CHANGEFILE" ## Is the first marker already present?
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
sudo bash -c 'cat '$APPENDFILE' >> '$CHANGEFILE' ' ## If not append the markers
|
sudo bash -c 'cat '$APPENDFILE' >> '$CHANGEFILE' ' ## If not append the markers
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$chdisplay" in ## Select the correct driver text
|
case "$chdisplay" in ## Select the correct driver text
|
||||||
|
|
||||||
Tontec35) INSERTFILE=$PATHCONFIGS"/tontec35.txt" ;; ## Message to be added
|
Tontec35) INSERTFILE=$PATHCONFIGS"/tontec35.txt" ;; ## Message to be added
|
||||||
HDMITouch) INSERTFILE=$PATHCONFIGS"/hdmitouch.txt" ;;
|
HDMITouch) INSERTFILE=$PATHCONFIGS"/hdmitouch.txt" ;;
|
||||||
|
@ -794,7 +835,7 @@ if [ $? -eq 0 ]; then ## If the selection has changed
|
||||||
## Replace whatever is between the markers with the driver text
|
## Replace whatever is between the markers with the driver text
|
||||||
|
|
||||||
sed -e "/$lead/,/$tail/{ /$lead/{p; r $INSERTFILE
|
sed -e "/$lead/,/$tail/{ /$lead/{p; r $INSERTFILE
|
||||||
}; /$tail/p; d }" $CHANGEFILE >> $TRANSFILE
|
}; /$tail/p; d }" $CHANGEFILE >> $TRANSFILE
|
||||||
|
|
||||||
sudo cp "$TRANSFILE" "$CHANGEFILE" ## Copy from the transfer file
|
sudo cp "$TRANSFILE" "$CHANGEFILE" ## Copy from the transfer file
|
||||||
rm $TRANSFILE ## Delete the transfer file
|
rm $TRANSFILE ## Delete the transfer file
|
||||||
|
@ -823,9 +864,39 @@ menuchoice=$(whiptail --title "$StrSystemTitle" --menu "$StrSystemContext" 16 78
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
do_language_setup()
|
||||||
|
{
|
||||||
|
menuchoice=$(whiptail --title "$StrLanguageTitle" --menu "$StrOutputContext" 16 78 6 \
|
||||||
|
"1 French Menus" "Menus Francais" \
|
||||||
|
"2 English Menus" "Change Menus to English" \
|
||||||
|
"3 French Keyboard" "$StrKeyboardChange" \
|
||||||
|
"4 UK Keyboard" "$StrKeyboardChange" \
|
||||||
|
"5 US Keyboard" "$StrKeyboardChange" \
|
||||||
|
3>&2 2>&1 1>&3)
|
||||||
|
case "$menuchoice" in
|
||||||
|
1\ *) set_config_var menulanguage "fr" $CONFIGFILE ;;
|
||||||
|
2\ *) set_config_var menulanguage "en" $CONFIGFILE ;;
|
||||||
|
3\ *) sudo cp $PATHCONFIGS"/keyfr" /etc/default/keyboard ;;
|
||||||
|
4\ *) sudo cp $PATHCONFIGS"/keygb" /etc/default/keyboard ;;
|
||||||
|
5\ *) sudo cp $PATHCONFIGS"/keyus" /etc/default/keyboard ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Check Language
|
||||||
|
|
||||||
|
MENU_LANG=$(get_config_var menulanguage $CONFIGFILE)
|
||||||
|
|
||||||
|
# Set Language
|
||||||
|
|
||||||
|
if [ "$MENU_LANG" == "en" ]; then
|
||||||
|
source $PATHSCRIPT"/langgb.sh"
|
||||||
|
else
|
||||||
|
source $PATHSCRIPT"/langfr.sh"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
OnStartup()
|
OnStartup()
|
||||||
{
|
{
|
||||||
CALL=$(get_config_var call $CONFIGFILE)
|
CALL=$(get_config_var call $CONFIGFILE)
|
||||||
MODE_INPUT=$(get_config_var modeinput $CONFIGFILE)
|
MODE_INPUT=$(get_config_var modeinput $CONFIGFILE)
|
||||||
MODE_OUTPUT=$(get_config_var modeoutput $CONFIGFILE)
|
MODE_OUTPUT=$(get_config_var modeoutput $CONFIGFILE)
|
||||||
SYMBOLRATEK=$(get_config_var symbolrate $CONFIGFILE)
|
SYMBOLRATEK=$(get_config_var symbolrate $CONFIGFILE)
|
||||||
|
@ -840,10 +911,27 @@ INFO=$CALL":"$MODE_INPUT"-->"$MODE_OUTPUT"("$SYMBOLRATEK"KSymbol FEC "$FECNUM"/"
|
||||||
do_transmit
|
do_transmit
|
||||||
}
|
}
|
||||||
|
|
||||||
#********************************************* MAIN MENU **************************************************
|
#********************************************* MAIN MENU *********************************
|
||||||
|
#************************* Execution of Console Menu starts here *************************
|
||||||
|
|
||||||
|
# Check Language
|
||||||
|
|
||||||
|
MENU_LANG=$(get_config_var menulanguage $CONFIGFILE)
|
||||||
|
|
||||||
|
# Set Language
|
||||||
|
|
||||||
|
if [ "$MENU_LANG" == "en" ]; then
|
||||||
|
source $PATHSCRIPT"/langgb.sh"
|
||||||
|
else
|
||||||
|
source $PATHSCRIPT"/langfr.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
status="0"
|
status="0"
|
||||||
OnStartup
|
|
||||||
#$PATHRPI"/rpibutton.sh" &
|
if [ "$1" != "menu" ]; then # if tx on boot
|
||||||
|
OnStartup # go straight to transmit
|
||||||
|
fi
|
||||||
|
|
||||||
sleep 0.2
|
sleep 0.2
|
||||||
|
|
||||||
while [ "$status" -eq 0 ]
|
while [ "$status" -eq 0 ]
|
||||||
|
@ -865,14 +953,15 @@ INFO=$CALL":"$MODE_INPUT"-->"$MODE_OUTPUT"("$SYMBOLRATEK"KSymbol FEC "$FECNUM"/"
|
||||||
#do_transmit
|
#do_transmit
|
||||||
#do_status
|
#do_status
|
||||||
#do_display_on
|
#do_display_on
|
||||||
#"1 Transmission" "Demarre la transmission"\
|
|
||||||
menuchoice=$(whiptail --title "$StrMainMenuTitle" --menu "$INFO" 16 82 6 \
|
menuchoice=$(whiptail --title "$StrMainMenuTitle" --menu "$INFO" 16 82 8 \
|
||||||
"0 Transmit" "Go to transmit" \
|
"0 Transmit" "Go to transmit" \
|
||||||
"1 Source" "$StrMainMenuSource" \
|
"1 Source" "$StrMainMenuSource" \
|
||||||
"2 Output" "$StrMainMenuOutput" \
|
"2 Output" "$StrMainMenuOutput" \
|
||||||
"3 Station" "$StrMainMenuCall" \
|
"3 Station" "$StrMainMenuCall" \
|
||||||
"4 Receive" "Receive via rtlsdr" \
|
"4 Receive" "Receive via rtlsdr" \
|
||||||
"5 System" "$StrMainMenuSystem" \
|
"5 System" "$StrMainMenuSystem" \
|
||||||
|
"6 Language" "Set Language and Keyboard" \
|
||||||
3>&2 2>&1 1>&3)
|
3>&2 2>&1 1>&3)
|
||||||
|
|
||||||
case "$menuchoice" in
|
case "$menuchoice" in
|
||||||
|
@ -882,6 +971,7 @@ INFO=$CALL":"$MODE_INPUT"-->"$MODE_OUTPUT"("$SYMBOLRATEK"KSymbol FEC "$FECNUM"/"
|
||||||
3\ *) do_station_setup ;;
|
3\ *) do_station_setup ;;
|
||||||
4\ *) do_receive ;;
|
4\ *) do_receive ;;
|
||||||
5\ *) do_system_setup ;;
|
5\ *) do_system_setup ;;
|
||||||
|
6\ *) do_language_setup ;;
|
||||||
*)
|
*)
|
||||||
|
|
||||||
whiptail --title "$StrMainMenuExitTitle" --msgbox "$StrMainMenuExitContext" 8 78
|
whiptail --title "$StrMainMenuExitTitle" --msgbox "$StrMainMenuExitContext" 8 78
|
||||||
|
|
|
@ -17,3 +17,5 @@ pathmedia=/home/pi/rpidatv/video
|
||||||
locator=JNO6EP
|
locator=JNO6EP
|
||||||
pidstart=1000
|
pidstart=1000
|
||||||
pidaudio=1002
|
pidaudio=1002
|
||||||
|
display=Waveshare
|
||||||
|
menulanguage=en
|
||||||
|
|
Ładowanie…
Reference in New Issue