CCCPaste
######################################## install mono
$ sudo apt install apt-transport-https dirmngr -y
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
$ echo "deb https://download.mono-project.com/repo/ubuntu vs-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-vs.list
$ sudo apt update
$ sudo apt install mono-complete -y
$ mono --version
(check release 6.12.0.200 or newer)


###################################### DISABLE TOP BAR & GESTURE
$ sudo apt install -y gnome-shell-extensions gnome-shell-extension-manager
$ extension-manager
# click "Browse"
# enter "hide top bar"
# install "tuxor1337"
# click "installed"
# open "hide top bar" extension preference
# select "intelli hide"
# in tab "sensitivity" disable all
# in tab "intellihide" disable all

# click "Browse"
# enter "disable gesture"
# install "disable gesture 2021"
# click "installed"
# verify the extension is enabled

# close extension manager

######################################## install java
$ sudo apt -y install mplayer wmctrl smstools procmail
confirm Internet
confirm nand

$ sudo apt update
$ sudo apt install -y openjdk-8-jdk librxtx-java curl
$ java -version
(check release 1.8.0_442 or newer)

######################################## change splash screen
$ cd /
$ sudo tar xvzf /media/nand/UPDATE/usr-lib-jni.tar.gz
$ sudo tar xvzf /media/nand/UPDATE/usr-share-plymouth.tar.gz

############################ this is for Ducale
$ sudo vi default.plymouth
HorizontalAlignment=.5
VerticalAlignment=.8
$ sudo vi themes/spinner/spinner.plymouth
HorizontalAlignment=.5
VerticalAlignment=.8
############################ this is for NTX21
$ sudo vi default.plymouth
HorizontalAlignment=.5
VerticalAlignment=.8
$ sudo vi themes/spinner/spinner.plymouth
HorizontalAlignment=.5
VerticalAlignment=.8
############################

$ sudo update-initramfs -uk all


######################################## install application
$ mkdir -p ~/.local/share/fonts
$ mkdir -p ~/.config/autostart/
$ mkdir ~/Desktop/N-and
$ mkdir ~/FlexManager
$ cp -Rv /media/nand/UPDATE/FlexManager/* FlexManager/
$ chmod +x FlexManager/FlexManager.exe
$ cp FlexManager/FlexManager.exe.desktop /home/nand/.config/autostart
$ cp /media/nand/UPDATE/FlexUI.exe.desktop /home/nand/.config/autostart

######################################## hide icons
$ touch /home/nand/Desktop/.hidden

######################################## disable overlay key(was "Super_L"
$ gsettings set org.gnome.mutter overlay-key ""

######################################## increment log rotate frequency
$ sudo cp /etc/cron.daily/logrotate /etc/cron.hourly/
$ sudo gedit /etc/logrotate.d/rsyslog

############################# from here
/var/log/syslog
/var/log/mail.info
/var/log/mail.warn
/var/log/mail.err
/var/log/mail.log
/var/log/daemon.log
/var/log/kern.log
/var/log/auth.log
/var/log/user.log
/var/log/lpr.log
/var/log/cron.log
/var/log/debug
/var/log/messages
{
su root adm
rotate 4
daily
maxsize 1M
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
/usr/lib/rsyslog/rsyslog-rotate
endscript
}
############################# to here


######################################## install gwm
$ sudo bash
$ mkdir /usr/local
$ chmod 755 /usr/local
$ chown root /usr/local
$ mkdir /usr/local/bin
$ chmod 755 /usr/local/bin
$ chown root /usr/local/bin

Decompressione ed installazione del pacchetto gwm
gzip –dc SOURCEDIR/ Update-XXX.tgz | (cd /usr/local/bin ; tar xf -)

$ cd /usr/local/bin/bitx/install
$ ./install-service.sh -i updater
$ ./install-service.sh -i retriever
$ ./install-service.sh -i gateway

$ cd /usr/local/bin/bitx/install/platforms/nand
$ ./install_config.sh

$ service bitxgateway start
$ service bitxupdater start
$ service bitxretriever start
$ ps aux | grep bitx

######################################## install ssh server
$ sudo apt install -y openssh-server openssh-sftp-server ssh-import-id ssh
######################################## install hwclock
$ sudo apt install -y util-linux-extra


######################################## remove traker
$ sudo apt remove -y tracker-extract
$ sudo apt remove -y tracker-miner-fs
$ sudo apt remove -y tracker

######################################## remove rtkit
$ sudo dpkg --remove --force-remove-reinstreq rtkit



######################################## remove snapd
## if exist file @"/etc/xdg/autostart/snap-userd-autostart.desktop"
$ sudo apt-get remove -y --auto-remove gnome-software
$ sudo systemctl stop snapd.service
$ sudo systemctl stop snapd.socket
$ sudo systemctl disable snapd.service
$ sudo systemctl mask snapd.service
$ sudo rm /etc/xdg/autostart/snap-userd-autostart.desktop
## endif

######################################## software & updates
# run "Software & Updates"
# select "Updates"
# set "subscibe to" to "security updates only"
# set "automatic check" to "never"
# set "security update" to "download and install automatically"
# set "other updates" to "every two weeks"
# set "notify" to "never"

######################################## disable periodic internet usage

$ sudo sed -i 's/\"1\"/\"0\"/g' /etc/apt/apt.conf.d/10periodic
#### no longer needed $ sudo sed -i 's/^deb http/# RSR-remove deb http/g' /etc/apt/sources.list


######################################## enable DNS
# To configure DNS settings using systemd-resolved on Ubuntu 24.04, you can edit the /etc/systemd/resolved.conf file and add the desired DNS server addresses under the [Resolve] section. Then, restart the systemd-resolved service using the command sudo systemctl restart systemd-resolved.

$ sudo nano /etc/systemd/resolved.conf

## start from here
[Resolve]
DNS=8.8.8.8 1.1.1.1
## end to here

$ cat /etc/resolv.conf
nameserver 8.8.8.8


$ nmcli radio wifi off
$ reboot


######################################## clean and clone
$ rm -Rf /home/nand/Desktop/N-and/*
$ cat /dev/zero > bigfile
$ rm bigfile
$ sync
$ history -c
$ history -w
$ shutdown now



SAMPLE N.1
----------
00E04C06865B
860195051481098
8999922109230230129


######################################## enable DNS

$ sudo mkdir /etc/systemd/resolved.conf.d/
$ sudo nano /etc/systemd/resolved.conf.d/dns_servers.conf

## start from here
[Resolve]
DNS=8.8.8.8 1.1.1.1
## end to here

$ cat /etc/resolv.conf
nameserver 8.8.8.8


$ nmcli radio wifi off
$ reboot

######################################## clean and clone
$ rm -Rf /home/nand/Desktop/N-and/*
$ cat /dev/zero > bigfile
$ rm bigfile
$ sync
$ history -c
$ history -w
$ shutdown now

+ sudo dd if=/dev/mmcblk0 bs=10M | sudo gzip -c > /path/iso.gz
https://web-in.it/guide/25-clonezilla-guida-backup-live-usb/
https://web-in.it/guide/26-clonezilla-ripristino-backup-disco/



*******************************************************************************
*************** TESTS *********************************************************
*******************************************************************************

- install UI
. verify ICCID
. verify MAC-address
. verify UI on-line
. verify GWM ready

- GWM
. sms
. download log from touch
. send update to touch
. receive realtime from touch
. reboot command

- check gesture disable

- verify network traffic after 1 week (should be less than 100K)

- verify runnable N-and UI XML
- verify runnable React UI IVS ( it must be used --no-sandbox at the moment there is an issue https://askubuntu.com/questions/1512287/obsidian-appimage-the-suid-sandbox-helper-binary-was-found-but-is-not-configu)

Test 1:
16:48:28 start (rx 36.7KB, tx 13.8KB)
10:27:00 mid (rx 285.6KB, tx 908.1KB)
11:30:00 stop (rx 329.1KB, tx 963.5KB)

*******************************************************************************
*******************************************************************************
*******************************************************************************


gsettings set org.gnome.settings-daemon.plugins.media-keys terminal "[]"

===============================================================================================================================================
FlexManager

https://nandgroup.sharepoint.com/sites/N-andInternalSharepoint2.0/Software/Forms/AllItems.aspx?id=%2Fsites%2FN%2DandInternalSharepoint2%2E0%2FSoftware%2FShare%2F1%2EFlexManager%2Fbuild%2Fofficial%2F1%2E8%2E6%2E0&viewid=a23192c7%2Dda7d%2D4d60%2D86c0%2Dd0665e81d55b