diff --git a/RELEASES.md b/RELEASES.md index a68ca96..c32d86e 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,5 +1,15 @@ # EmComm Tools OS Community Release +# 2024.05.19.R2 + +* Enabled Panasonic brightness fix +* Added motd +* Added GNOME settings for power management +* Added pbcopy and pbpaste command aliases +* Installed hamlib 4.5 from source +* Installed JS8Call 2.2.0 from Debian package + + ## 2024.03.16.R1 * Ported and adjusted initial scripts from commercial build diff --git a/overlay/etc/motd b/overlay/etc/motd new file mode 100644 index 0000000..73f27f5 --- /dev/null +++ b/overlay/etc/motd @@ -0,0 +1,8 @@ + _____ ____ _____ _ + | ____|_ __ ___ / ___|___ _ __ ___ _ __ ___ |_ _|__ ___ | |___ + | _| | '_ ` _ \| | / _ \| '_ ` _ \| '_ ` _ \ | |/ _ \ / _ \| / __| + | |___| | | | | | |__| (_) | | | | | | | | | | | | | (_) | (_) | \__ \ + |_____|_| |_| |_|\____\___/|_| |_| |_|_| |_| |_| |_|\___/ \___/|_|___/ + + "Be strong, be safe and be prepared" -- The Tech Prepper KT7RUN + diff --git a/overlay/etc/skel/.bash_profile b/overlay/etc/skel/.bash_profile new file mode 100644 index 0000000..29166d1 --- /dev/null +++ b/overlay/etc/skel/.bash_profile @@ -0,0 +1,17 @@ +# Author : Gaston Gonzalez +# Date : 23 April 2024 +# Description : bash profile + +alias pbcopy='xsel --clipboard --input' +alias pbpaste='xsel --clipboard --output' + +RED='\x1B[1;31m' +BLUE='\x1B[1;34m' +CYAN='\x1B[1;36m' +GREEN='\x1B[1;32m' +YELLOW='\x1B[1;33m' +NC='\x1B[0m' + +echo -e "${YELLOW}" +cat /etc/motd +echo -e "${NC}" diff --git a/overlay/etc/skel/.bashrc b/overlay/etc/skel/.bashrc new file mode 100644 index 0000000..9bc6f27 --- /dev/null +++ b/overlay/etc/skel/.bashrc @@ -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|*-256color) 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 -alF' +alias la='ls -A' +alias l='ls -CF' + +# Add an "alert" alias for long running commands. Use like so: +# sleep 10; alert +alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' + +# 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 + +if [ -f ~/.bash_profile ]; then + . ~/.bash_profile +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 diff --git a/overlay/usr/share/glib-2.0/schemas/90_ubuntu-settings.gschema.override b/overlay/usr/share/glib-2.0/schemas/90_ubuntu-settings.gschema.override index 47b9355..c89d644 100644 --- a/overlay/usr/share/glib-2.0/schemas/90_ubuntu-settings.gschema.override +++ b/overlay/usr/share/glib-2.0/schemas/90_ubuntu-settings.gschema.override @@ -13,6 +13,7 @@ picture-uri = 'file:///usr/share/backgrounds/emcomm-tools-wallpaper.png' [org.gnome.shell] favorite-apps = ['emcomm-tools.desktop', 'js8call.desktop', 'org.gnome.Terminal.desktop', 'fldigi.desktop', 'flmsg.desktop', 'org.gnome.Nautilus.desktop'] +last-selected-power-profile = 'performance' [org.gnome.system.location] enabled = false @@ -22,9 +23,8 @@ idle-delay = 0 [org.gnome.desktop.interface] text-scaling-factor = 1.25 - -[org.gnome.desktop.interface] enable-animations = false +show-battery-percentage = true [org.gnome.desktop.a11y.applications] screen-keyboard-enabled = true @@ -32,5 +32,7 @@ screen-keyboard-enabled = true [org.gnome.desktop.interface] toolkit-accessibility = true -[org.gnome.desktop.peripherals.mouse] -natural-scroll = true +[org.gnome.settings-daemon.plugins.power] +sleep-inactive-ac-type = 'nothing' +sleep-inactive-battery-type = 'nothing' +power-saver-profile-on-low-battery = false diff --git a/scripts/env.sh b/scripts/env.sh index 6de724f..d5a4636 100755 --- a/scripts/env.sh +++ b/scripts/env.sh @@ -2,6 +2,7 @@ # # Author : Gaston Gonzalez # Date : 16 March 2024 +# Updated : 19 May 2024 # Purpose : Global environment variables export ET_HOME=/opt/emcomm-tools @@ -9,3 +10,8 @@ export ET_USER=games export ET_GROUP=games export ET_TEMP_DIR=/tmp/et export ET_LOG_FILE=$ET_TEMP_DIR/et.log + +# Location for source code +export ET_DIST_DIR=/opt/dist +export ET_SRC_DIR=/opt/src + diff --git a/scripts/install-base.sh b/scripts/install-base.sh index 93bc96b..aee7dc7 100755 --- a/scripts/install-base.sh +++ b/scripts/install-base.sh @@ -2,9 +2,13 @@ # # Author : Gaston Gonzalez # Date : 16 March 2024 +# Updated : 17 May 2024 # Purpose : Install base tools set -e +et-log "Installing message of the day" +cp -v ../overlay/etc/motd /etc/ + et-log "Installing base packages" apt install \ build-essential \ @@ -17,5 +21,6 @@ apt install \ openssh-server \ screen \ stow \ + xsel \ tree \ -y diff --git a/scripts/install-hamlib.sh b/scripts/install-hamlib.sh new file mode 100755 index 0000000..423ba7d --- /dev/null +++ b/scripts/install-hamlib.sh @@ -0,0 +1,47 @@ +#!/bin/bash +# +# Author : Gaston Gonzalez +# Date : 25 November 2022 +# Updated : 19 May 2024 +# Purpose : Install hamlib for rig control +set -e + +ET_DIST_DIR=/opt/dist +ET_SRC_DIR=/opt/src + +VERSION=4.5 +APP_AND_VERSION=hamlib-$VERSION +TARBALL=$APP_AND_VERSION.tar.gz +URL=https://github.com/Hamlib/Hamlib/releases/download/$VERSION/$TARBALL +INSTALL_DIR=/opt/$APP_AND_VERSION +LINK_PATH=/opt/hamlib + +if [ ! -e $ET_DIST_DIR/$TARBALL ]; then + et-log "Downloading hamlib: $URL " + curl -s -L -O --fail $URL + + [ ! -e $ET_DIST_DIR ] && mkdir -v $ET_DIST_DIR + [ ! -e $ET_SRC_DIR ] && mkdir -v $ET_SRC_DIR + + mv $TARBALL $ET_DIST_DIR +fi + +CWD_DIR=`pwd` + +cd $ET_SRC_DIR +et-log "Unpacking $ET_DIST_DIR/$TARBALL" +tar -xzf $ET_DIST_DIR/$TARBALL && cd $APP_AND_VERSION + +[ ! -e $INSTALL_DIR ] && mkdir -v $INSTALL_DIR + +et-log "Building Hamlib $VERSION" +./configure --prefix=$INSTALL_DIR +make && make check && make install + +[ -e $LINK_PATH ] && rm $LINK_PATH +ln -v -s $INSTALL_DIR $LINK_PATH + +stow -v -d /opt hamlib -t /usr/local + +cd $CWD_DIR + diff --git a/scripts/install-js8call.sh b/scripts/install-js8call.sh new file mode 100755 index 0000000..d45f4b1 --- /dev/null +++ b/scripts/install-js8call.sh @@ -0,0 +1,54 @@ +#!/bin/bash +# Author : Gaston Gonzalez +# Date : 6 April 2023 +# Updated : 19 May 2024 +# Purpose : Install JS8Call +set -e +trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG +trap 'et-log "\"${last_command}\" command failed with exit code $?."' ERR + +. ./env.sh + +VERSION="2.2.0" +FILE="js8call_${VERSION}_20.04_amd64.deb" +URL="http://files.js8call.com/${VERSION}/${FILE}" + +et-log "Installing JS8Call dependencies..." +apt install \ + libqt5serialport5 \ + libqt5multimedia5-plugins \ + libqt5widgets5 \ + libqt5multimediawidgets5 \ + libqt5core5a \ + libqt5gui5 \ + libqt5multimedia5 \ + libqt5network5 \ + libqt5printsupport5 \ + libqt5serialport5 \ + libqt5widgets5 \ + libdouble-conversion3 \ + libpcre2-16-0 \ + qttranslations5-l10n \ + libmd4c0 \ + libqt5dbus5 \ + libxcb-xinerama0 \ + libxcb-xinput0 \ + libqt5svg5 \ + qt5-gtk-platformtheme \ + libqt5multimediagsttools5 \ + libgfortran5 \ + -y + +if [ ! -e $ET_DIST_DIR/$FILE ]; then + et-log "Downloading JS8Call: $URL" + + curl -s -L -O --fail $URL + + [ ! -e $ET_DIST_DIR ] && mkdir -v $ET_DIST_DIR + + mv -v $FILE $ET_DIST_DIR +else + et-log "${FILE} already downloaded. Skipping..." +fi + +dpkg -i $ET_DIST_DIR/$FILE diff --git a/scripts/install.sh b/scripts/install.sh index 21d98e4..04a1300 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -2,10 +2,8 @@ # # Author : Gaston Gonzalez # Date : 16 March 2024 +# Updated : 19 May 2024 # Purpose : Main installer for EmComm Tools OS Community -set -e -trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG -trap 'et-log "\"${last_command}\" command failed with exit code $?."' ERR . ./env.sh . ./functions.sh @@ -24,4 +22,7 @@ exitIfNotRoot ./configure-gnome.sh ./configure-user.sh -#./cf20-fix-brightness.sh +./fix-panasonic-brightness.sh + +./install-hamlib.sh +./install-js8call.sh