Skip to content

Instantly share code, notes, and snippets.

@taoteh1221
Last active April 15, 2022 15:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taoteh1221/3a1f040d0b6881dca15ceefbde5098a3 to your computer and use it in GitHub Desktop.
Save taoteh1221/3a1f040d0b6881dca15ceefbde5098a3 to your computer and use it in GitHub Desktop.
Setup from scratch for a pine64 H64B SOC Device: https://wiki.pine64.org/wiki/PINE_H64
Setup from scratch for a pine64 H64B SOC Device: https://wiki.pine64.org/wiki/PINE_H64
=============================================================
Armbian (disk image) install:
=============================================================
https://armbian.tnahosting.net/archive/pineh64-b/archive/
=============================================================
Set hardware clock to correct date / time if needed:
=============================================================
Set date and time (UTC time):
hwclock --set --date="2011-08-14 16:45:05"
Set your timezone (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones):
sudo timedatectl set-timezone America/New_York
=============================================================
LXQT Desktop (as Lubuntu) install:
=============================================================
sudo apt install lubuntu-desktop
=============================================================
Disk Usage Analyzer (baobab) / gnome-disk-utility / unrar installs:
=============================================================
sudo apt install baobab gnome-disk-utility unrar
=============================================================
Tux in the rain wallpaper:
=============================================================
https://ftp.psu.ac.th/pub/linux-logo/raining.jpg
=============================================================
Duplicate network manager in system tray fix:
=============================================================
Remove duplicates in: /etc/xdg/autostart/
=============================================================
Bluetooth fix:
=============================================================
Get rtl8723bs_fw.bin AND rtl8723bs_config.bin from https://kernel.googlesource.com/pub/scm/linux/kernel/git/jkirsher/firmware/+/refs/heads/master/rtl_bt/
Copy it to /lib/firmware/rtl_bt/ as root / sudo, and reboot.
=============================================================
Rhythmbox (GUI music / radio player) and my custom bluetooth internet radio setup install:
=============================================================
sudo apt install rhythmbox rhythmbox-plugins ubuntu-restricted-extras gstreamer1.0-plugins-ugly gstreamer1.0-plugins-bad
wget --no-cache -O bt-radio-setup.bash https://tinyurl.com/bt-radio-setup;chmod +x bt-radio-setup.bash;./bt-radio-setup.bash
=============================================================
Amule (file sharing) install (ONLY USE WITH A VPN...AirVPN 'Eddie' VPN APP ROCKS!):
=============================================================
Compile from source:
(WXWIDGETS CONFIGURE NEEDS THIS APPENDED FOR #ARM64# DEVICES: --build=aarch64-unknown-linux-gnu)
http://wiki.amule.org/wiki/HowTo_Compile_In_Debian#Preparing:_Compiling_and_installing_wxwidgets
=============================================================
=============================================================
Add external USB drive that auto-mounts on system boot:
=============================================================
=============================================================
Format an external USB disk to NTFS filesystem.
Get USB disk UUID with command: sudo blkid
/dev/DEVICE_NAME: UUID="XXXXXXXXXXXXXXXXXXXXX" TYPE="ntfs" PTTYPE="dos" PARTUUID="YYYYYYYY"
Add this to /etc/fstab:
UUID=XXXXXXXXXXXXXXXXXXXXX /media/ext_usb ntfs auto,nofail,sync,users,defaults,noatime,utf8,dmask=002,fmask=111,uid=1000,gid=1000,rw 0 0
Create mount path:
sudo mkdir -p /mnt/ext_usb
sudo chown -R YOUR_USERNAME:YOUR_USERNAME /mnt/ext_usb
Manual check / mount:
sudo mount -a
Reboot, and it should ALSO auto-mount on startup.
FROM THERE, YOU CAN MAKE SYMBOLIC LINKS TO THIS DIRECTORY, #OR# TO ANY OF IT'S SUBDIRECTORIES, AND PLACE THESE LINKS WHEREVER YOU WISH IN YOUR HOME DIRECTORY.
=============================================================
=============================================================
Setup NAS To Auto-Mount At System Boot
=============================================================
=============================================================
https://wiki.ubuntu.com/MountWindowsSharesPermanently
http://www.strika.co/ubuntu-14-04-how-to-properly-mount-a-cifs-share-as-a-normal-user/
Create directory to mount:
sudo mkdir /mnt/NAS_Private
Add this to /etc/fstab:
//192.168.1.15/privateshare /mnt/NAS_Private cifs credentials=/root/.smb_login,uid=1000,gid=1000,file_mode=0777,dir_mode=0777,iocharset=utf8,rw,users 0 0
Enter your samba auth info in a new file /root/.smb_login:
username=USERNAMEHERE
password=PASSWORDHERE
domain=WORKGROUP
Set STRICT permissions on this auth file:
sudo chmod 600 /root/.smb_login
Test the NAS mounting (should be mounted at /mnt/NAS_Private after):
sudo mount -a
MOUNT #WILL# FAIL AT BOOT, BECAUSE REMOTE FILESYSTEM SUPPORT ISN'T LOADED THAT EARLY,
SO WE SET A 15 SECOND DELAYED CRON JOB TO MOUNT IT...
Set a root cronjob:
sudo crontab -e
Add this as the cronjob:
@reboot /bin/bash -c 'sleep 15 && /bin/mount -a'
Reboot, and it should auto-mount on startup.
FROM THERE, YOU CAN MAKE SYMBOLIC LINKS TO THIS DIRECTORY, #OR# TO ANY OF IT'S SUBDIRECTORIES, AND PLACE THESE LINKS WHEREVER YOU WISH IN YOUR HOME DIRECTORY.
=============================================================
=============================================================
Xscreensaver fix / make pretty (save as a bash script, and make executable with chmod +x):
=============================================================
=============================================================
#!/bin/bash
# Credit to: https://www.troglobit.com/2019/07/XScreenSaver-Fonts/
# RUN #MANUALLY# FIRST #WITH# 'manual' as a CLI var: ./script_name manual
# (TO INSTALL ttf-mscorefonts-installer AND RUN A TEST WITH xfontsel)
# Add to LXQT autostart (#WITHOUT# 'manual' as a CLI var),
# to activate on login: https://wiki.archlinux.org/title/LXQt#Autostart
DETECT_FONTS=$(sed -n '/xscreensaver.Dialog.headingFont/p' ~/.Xdefaults)
if [ "$DETECT_FONTS" == "" ]; then
touch ~/.Xdefaults
sleep 2
# Don't nest / indent, or it could malform the settings
read -r -d '' SCREENSAVER_FONTS <<- EOF
\r
! XScreenSaver font settings
xscreensaver.Dialog.headingFont: -*-verdana-bold-r-*-*-28-*-*-*-*-*-*-*
xscreensaver.Dialog.bodyFont: -*-verdana-medium-r-*-*-20-*-*-*-*-*-*-*
xscreensaver.Dialog.labelFont: -*-verdana-medium-r-*-*-20-*-*-*-*-*-*-*
xscreensaver.Dialog.unameFont: -*-verdana-medium-r-*-*-26-*-*-*-*-*-*-*
xscreensaver.Dialog.buttonFont: -*-verdana-bold-r-*-*-20-*-*-*-*-*-*-*
xscreensaver.Dialog.dateFont: -*-veranda-medium-r-*-*-16-*-*-*-*-*-*-*
xscreensaver.passwd.passwdFont: -*-verdana-bold-r-*-*-20-*-*-*-*-*-*-*
\r
EOF
echo -e "$SCREENSAVER_FONTS" >> ~/.Xdefaults
echo "Fonts configured in ~/.Xdefaults"
echo " "
sleep 2
fi
# If CLI param included, presume a MANUAL run
if [ -n "$1" ]; then
sudo apt install ttf-mscorefonts-installer -y
sleep 2
cd /usr/share/fonts/truetype/msttcorefonts
sudo mkfontscale
sudo mkfontdir
fi
xset +fp /usr/share/fonts/truetype/msttcorefonts/
xset fp rehash
xrdb -merge ~/.Xdefaults
# If CLI param included, presume a MANUAL run
if [ -n "$1" ]; then
cd /etc/fonts/conf.d
sudo ln -s ../conf.avail/10-autohint.conf .
sudo ln -s ../conf.avail/10-sub-pixel-rgb.conf .
fi
sleep 1
xscreensaver-command -restart
sleep 2
# If CLI param included, presume a MANUAL run
if [ -n "$1" ]; then
xfontsel
fi
# Bash script END
=============================================================
=============================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment