kopia lustrzana https://github.com/F5OEO/rpidatv
Add language and autostart to menu structure
rodzic
e724aac9a5
commit
b8213dc17c
|
@ -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,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"
|
||||
StrIPMenu="Adresse IP"
|
||||
|
||||
######## AUTOSTART MENU #########
|
||||
|
||||
StrAutostartSetupTitle="Configure le démarrage"
|
||||
StrAutostartSetupContext="Choix:"
|
||||
AutostartSetupConsole="Menu console(ce menu)"
|
||||
AutostartSetupDisplay="Graphique(avec ecran tactile)"
|
||||
AutostartSetupButton="Boutons poussoires"
|
||||
AutostartSetupPrompt="Log-on to Linux Command Prompt"
|
||||
AutostartSetupConsole="Log-on to rpidatv Menu"
|
||||
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"
|
||||
StrDisplaySetupContext="Choix:"
|
||||
|
|
|
@ -82,11 +82,19 @@ StrAutostartMenu="Automatic startup"
|
|||
StrDisplayMenu="Display type"
|
||||
StrIPMenu="IP Address"
|
||||
|
||||
######## AUTOSTART MENU #########
|
||||
|
||||
StrAutostartSetupTitle="Autostart setup"
|
||||
StrAutostartSetupContext="Choice:"
|
||||
AutostartSetupConsole="Console menu"
|
||||
AutostartSetupDisplay="Display with touchscreen"
|
||||
AutostartSetupButton="Push buttons"
|
||||
AutostartSetupPrompt="Log-on to Linux Command Prompt"
|
||||
AutostartSetupConsole="Log-on to rpidatv Menu"
|
||||
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"
|
||||
StrDisplaySetupContext="Choice:"
|
||||
|
|
151
scripts/menu.sh
151
scripts/menu.sh
|
@ -602,10 +602,9 @@ menuchoice=$(whiptail --title "$StrOutputTitle" --menu "$StrOutputContext" 16 78
|
|||
|
||||
do_transmit()
|
||||
{
|
||||
$PATHSCRIPT"/a.sh" >/dev/null 2>/dev/null &
|
||||
#$PATHSCRIPT"/a.sh" &
|
||||
do_status
|
||||
do_stop_transmit
|
||||
$PATHSCRIPT"/a.sh" >/dev/null 2>/dev/null &
|
||||
do_status # Wait here transmitting until user presses a key
|
||||
do_stop_transmit
|
||||
}
|
||||
|
||||
do_stop_transmit()
|
||||
|
@ -644,8 +643,6 @@ do_receive_status()
|
|||
whiptail --title "RECEIVE" --msgbox "$INFO" 8 78
|
||||
sudo killall rpidatvgui >/dev/null 2>/dev/null
|
||||
sudo killall leandvb >/dev/null 2>/dev/null
|
||||
|
||||
|
||||
}
|
||||
|
||||
do_receive()
|
||||
|
@ -666,58 +663,101 @@ do_receive()
|
|||
/home/pi/rpidatv/bin/rpidatvgui 0 1 >/dev/null 2>/dev/null &
|
||||
do_receive_status;;
|
||||
esac
|
||||
|
||||
}
|
||||
|
||||
do_autostart_setup()
|
||||
{
|
||||
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
|
||||
MODE_STARTUP=$(get_config_var startup $CONFIGFILE)
|
||||
|
||||
esac
|
||||
Radio1=OFF
|
||||
Radio2=OFF
|
||||
Radio3=OFF
|
||||
Radio4=OFF
|
||||
Radio5=OFF
|
||||
Radio6=OFF
|
||||
Radio7=OFF
|
||||
|
||||
chstartup=$(whiptail --title "$StrAutostartSetupTitle" --radiolist \
|
||||
"$StrAutostartSetupContext" 20 78 8 \
|
||||
"Console" "$AutostartSetupConsole" $Radio1 \
|
||||
"Display" "$AutostartSetupDisplay" $Radio2 \
|
||||
"Button" "$AutostartSetupButton" $Radio3 \
|
||||
3>&2 2>&1 1>&3)
|
||||
case "$MODE_STARTUP" in
|
||||
Prompt)
|
||||
Radio1=ON;;
|
||||
Console)
|
||||
Radio2=ON;;
|
||||
Display)
|
||||
Radio3=ON;;
|
||||
Button)
|
||||
Radio4=ON;;
|
||||
TX_boot)
|
||||
Radio5=ON;;
|
||||
Display_boot)
|
||||
Radio6=ON;;
|
||||
Button_boot)
|
||||
Radio7=ON;;
|
||||
*)
|
||||
Radio1=ON;;
|
||||
esac
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
case "$chstartup" in
|
||||
Console) cp $PATHSCRIPT"/install_bashrc" /home/pi/.bashrc >/dev/null 2>/dev/null;;
|
||||
Display) MODE_DISPLAY=$(get_config_var display $CONFIGFILE)
|
||||
case "$MODE_DISPLAY" in
|
||||
Waveshare)
|
||||
cp $PATHSCRIPT"/install_display_inversed.fr" /home/pi/.bashrc >/dev/null 2>/dev/null;;
|
||||
*)
|
||||
cp $PATHSCRIPT"/install_display.fr" /home/pi/.bashrc >/dev/null 2>/dev/null;;
|
||||
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)
|
||||
|
||||
Button) cp $PATHSCRIPT"/install_button" /home/pi/.bashrc >/dev/null 2>/dev/null;;
|
||||
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;;
|
||||
|
||||
esac
|
||||
set_config_var startup "$chstartup" $CONFIGFILE
|
||||
fi
|
||||
##$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()
|
||||
|
@ -769,6 +809,7 @@ chdisplay=$(whiptail --title "$StrDisplaySetupTitle" --radiolist \
|
|||
|
||||
## Set constants for the amendment of /boot/config.txt below
|
||||
|
||||
PATHCONFIGS="/home/pi/rpidatv/scripts/configs" ## Path to config files
|
||||
lead='^## Begin LCD Driver' ## Marker for start of inserted text
|
||||
tail='^## End LCD Driver' ## Marker for end of inserted text
|
||||
CHANGEFILE="/boot/config.txt" ## File requiring added text
|
||||
|
@ -794,7 +835,7 @@ if [ $? -eq 0 ]; then ## If the selection has changed
|
|||
## Replace whatever is between the markers with the driver text
|
||||
|
||||
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
|
||||
rm $TRANSFILE ## Delete the transfer file
|
||||
|
@ -880,15 +921,17 @@ MENU_LANG=$(get_config_var menulanguage $CONFIGFILE)
|
|||
# Set Language
|
||||
|
||||
if [ "$MENU_LANG" == "en" ]; then
|
||||
source $PATHSCRIPT"/langgb.sh"
|
||||
source $PATHSCRIPT"/langgb.sh"
|
||||
else
|
||||
source $PATHSCRIPT"/langfr.sh"
|
||||
source $PATHSCRIPT"/langfr.sh"
|
||||
fi
|
||||
|
||||
status="0"
|
||||
|
||||
OnStartup
|
||||
#$PATHRPI"/rpibutton.sh" &
|
||||
if [ "$1" != "menu" ]; then # if tx on boot
|
||||
OnStartup # go straight to transmit
|
||||
fi
|
||||
|
||||
sleep 0.2
|
||||
|
||||
while [ "$status" -eq 0 ]
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
modeinput=PATERNAUDIO
|
||||
symbolrate=2000
|
||||
fec=2
|
||||
freqoutput=1255
|
||||
symbolrate=250
|
||||
fec=7
|
||||
freqoutput=437
|
||||
rfpower=7
|
||||
modeoutput=IQ
|
||||
modeoutput=QPSKRF
|
||||
tsvideofile=/home/pi/rpidatv/video/f4day.ts
|
||||
call=F5OEO
|
||||
paternfile=/home/pi/rpidatv/video
|
||||
|
|
Ładowanie…
Reference in New Issue