From: Ian Kelling <iank@fsf.org> Date: Sun, 10 Dec 2017 01:27:32 +0000 (-0500) Subject: various minor improvements X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=07d3aa7d2c415178ca720f3a53dfba1129babc4a;p=distro-setup various minor improvements --- diff --git a/distro-end b/distro-end index ca71ad9..76d37ea 100755 --- a/distro-end +++ b/distro-end @@ -70,6 +70,7 @@ case $HOSTNAME in # xawtv has webcam cli control. v4lctl bright 80%; v4lctl list # guvcview also adjusts webcam simple_packages+=( + adb apache2 apache2-doc apt-doc @@ -117,6 +118,7 @@ case $HOSTNAME in jq kid3-qt kid3-cli + linphone linux-doc locate lshw @@ -891,7 +893,7 @@ if [[ $HOSTNAME == frodo ]]; then # Set gui username and password. # # install syncthing via f-droid, - # folder setting, turn off master folder (makes it read only). + # folder setting, turn off send only. # on phone, add device, click bar code icon # on dekstop, top right, actions, device id # after adding, notification will appear on desktop to confirm @@ -902,7 +904,8 @@ if [[ $HOSTNAME == frodo ]]; then # notification will appear in android\'s notifications, you have to # swipe down and tap it to add the folder. It won\'t appear in the # syncthing ui, which would be intuitive, but don\'t wait for it - # there. + # there. The notification may not work, instead open the web gui + # from in the app, there should be a notification within there. # # On phone, set settings to run syncthing all the time, and # show no notification. @@ -934,6 +937,24 @@ esac ####### begin misc packages ########### +### begin spd install + +pi libswitch-perl libdigest-md5-file-perl libgnupg-interface-perl +t=$(mktemp) +wget -O $t http://mirror.fsf.org/fsfsys-trisquel/fsfsys-trisquel/pool/main/s/spd-perl/spd-perl_0.2-1_amd64.deb +s dpkg -i $t +rm $t +# this guesses at the appropriate directory, adjust if needed +x=(/usr/lib/x86_64-linux-gnu/perl/5.*) +sudo ln -s ../../../perl/5.18.2/SPD/ $x +# newer distro had gpg2 as default, older one, flidas, need to make it that way +x=$(which gpg2) +if [[ $x ]]; then + lnf -T $x /usr/local/bin/gpg +fi +### end spd install + + if [[ $HOSTNAME == kw ]]; then cat <<'EOF' NOTE: after this finishes, i did @@ -984,34 +1005,33 @@ mkschroot() { shift apps=($@) d=/nocow/schroot/$n - if [[ -e $d/bin ]]; then - s chroot $d apt-get update - s chroot $d apt-get -y dist-upgrade --purge --auto-remove - s schroot -c $n -- apt-get install --allow-unauthenticated -y ${apps[@]} - else - s mkdir -p $d - s debootstrap $n $d http://deb.debian.org/debian/ - s dd of=/etc/schroot/chroot.d/$n.conf <<EOF + s dd of=/etc/schroot/chroot.d/$n.conf <<EOF [$n] description=$n type=directory directory=$d profile=desktop preserve-environment=true -users=$USER +users=$USER,traci EOF - - s cp -P {,$d}/etc/localtime - cd #schroot fails if our current directory is not in the chroot - s schroot -c $n -- apt-get install --allow-unauthenticated -y ${apps[@]} + if [[ -e $d/bin ]]; then + s chroot $d apt-get update + s chroot $d apt-get -y dist-upgrade --purge --auto-remove + cd; s schroot -c $n -- apt-get install --allow-unauthenticated -y ${apps[@]} + else + s mkdir -p $d + s debootstrap $n $d http://deb.debian.org/debian/ + cd; s schroot -c $n -- apt-get install --allow-unauthenticated -y ${apps[@]} fi + s cp -P {,$d}/etc/localtime + } # for my roommate case $distro in trisquel) mkschroot stretch firefox-esr pulseaudio chromium - ;; + ;; esac s mkdir -p /nocow/user @@ -1285,7 +1305,8 @@ esac case $distro in arch) spa firefox pulseaudio;; - *) : ;; # comes default or with other packages + trisquel) spa abrowser ;; + *) : ;; # comes default or with other packages, or uknown esac @@ -1588,6 +1609,9 @@ DEVICESCAN -a -o on -S on -n standby,q $sched \ ########### misc stuff + + + # stop autopoping windows when i plug in an android phone. # dbus-launch makes this work within an ssh connection, otherwise you get this message, # with still 0 exit code. diff --git a/input-setup b/input-setup index a473c86..798748a 100755 --- a/input-setup +++ b/input-setup @@ -15,7 +15,7 @@ set -x # limitations under the License. # set to oppsite if the order is flipped. -k2flip=true +k2flip=false if $k2flip; then k2inorder=false else diff --git a/mail-setup b/mail-setup index 7cc7a32..83ae53c 100755 --- a/mail-setup +++ b/mail-setup @@ -704,6 +704,25 @@ EOF rm -f /etc/exim4/update-exim4.conf.conf dpkg-reconfigure -u -fnoninteractive exim4-config fi + + # i have the spool directory be common to distro multi-boot, so + # we need the uid to be the same. 608 cuz it's kind of in the middle + # of the free system uids. + IFS=:; read _ _ uid _ < <(getent passwd Debian-exim ); unset IFS + IFS=:; read _ _ gid _ < <(getent group Debian-exim ); unset IFS + if [[ ! $uid ]]; then + # from /var/lib/dpkg/info/exim4-base.postinst, plus uid and gid options + adduser --uid 608 --gid 608 --system --group --quiet --home /var/spool/exim4 \ + --no-create-home --disabled-login --force-badname Debian-exim + elif [[ $uid != 608 ]]; then + systemctl stop exim4 ||: + usermod -u 608 Debian-exim + groupmod -g 608 Debian-exim + usermod -g 608 Debian-exim + find / /nocow -xdev -uid $uid -exec chown -h 608 {} + + find / /nocow -xdev -gid $gid -exec chgrp -h 608 {} + + fi + # light version of exim does not have sasl auth support. apt-get -y install --purge --auto-remove exim4-daemon-heavy spamassassin @@ -868,7 +887,7 @@ fi dir=/nocow/$type sdir=/var/spool/$type # we only do this if our system has $dir -if [[ -e $dir && $(readlink -f $sdir) != $dir ]]; then +if [[ -e /nocow && $(readlink -f $sdir) != $dir ]]; then systemctl stop $type if [[ ! -e $dir && -d $sdir ]]; then mv $sdir $dir