Difference between revisions of "Template:UbuntuJammyDesktop-Common"
(updated by API) |
(updated by API) |
||
(10 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
<br/> | <br/> | ||
Root:<br/> | Root:<br/> | ||
− | | + | User Name: root<br/> |
+ | Password: fa<br/> | ||
===View IP address=== | ===View IP address=== | ||
Since the hostname is FriendlyElec.lan by default, you can use the ping command to get the IP address: | Since the hostname is FriendlyElec.lan by default, you can use the ping command to get the IP address: | ||
Line 19: | Line 20: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
$ sudo apt-get update | $ sudo apt-get update | ||
+ | </syntaxhighlight> | ||
+ | ===Install Ubuntu software center=== | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | $ sudo apt-get install snapd | ||
+ | $ sudo snap install snap-store | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Install the kernel-header package=== | ===Install the kernel-header package=== | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
sudo dpkg -i /opt/linux-headers-*.deb | sudo dpkg -i /opt/linux-headers-*.deb | ||
+ | </syntaxhighlight> | ||
+ | try to compile a kernel module: | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | sudo apt update | ||
+ | sudo apt install git gcc make bc | ||
+ | git clone https://github.com/RinCat/RTL88x2BU-Linux-Driver.git | ||
+ | cd RTL88x2BU-Linux-Driver | ||
+ | make -j$(nproc) | ||
+ | sudo make install | ||
+ | sudo modprobe 88x2bu | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Change time zone=== | ===Change time zone=== | ||
Line 48: | Line 64: | ||
| NanoPi-R2S | | NanoPi-R2S | ||
| NanoPi-R2C-Plus | | NanoPi-R2C-Plus | ||
+ | | NanoPi-R2S-Plus | ||
| NanoPi-R2C = | | NanoPi-R2C = | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Line 53: | Line 70: | ||
cd sd-fuse_rk3328 | cd sd-fuse_rk3328 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | | NanoPi-R5C | ||
| NanoPi-R5S = | | NanoPi-R5S = | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
− | git clone https://github.com/friendlyarm/sd-fuse_rk3568.git -b | + | git clone https://github.com/friendlyarm/sd-fuse_rk3568.git -b kernel-6.1.y |
cd sd-fuse_rk3568 | cd sd-fuse_rk3568 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | | NanoPi-R6C | ||
+ | | NanoPC-T6 | ||
| NanoPi-R6S = | | NanoPi-R6S = | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
− | git clone https://github.com/friendlyarm/sd-fuse_rk3588.git -b | + | git clone https://github.com/friendlyarm/sd-fuse_rk3588.git -b kernel-6.1.y |
cd sd-fuse_rk3588 | cd sd-fuse_rk3588 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 81: | Line 101: | ||
sudo firstboot && sudo reboot | sudo firstboot && sudo reboot | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | ===Start the program automatically at startup(For example | + | ===Start the program automatically at startup(For example Firefox)=== |
Put the desktop file in the ~/.config/autostart/ directory, for example: | Put the desktop file in the ~/.config/autostart/ directory, for example: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Line 108: | Line 128: | ||
sudo reboot | sudo reboot | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | ===Video playback with hardware decoding=== | ||
+ | ====GUI==== | ||
+ | * Locate the video file in the file browser, right click and select "Play with mpv media player" | ||
+ | * Using Kodi player | ||
+ | * Using Chromium web browser, you can play videos on the web with hardware decoding (limited to the video formats supported by the CPU) | ||
+ | ====Command line==== | ||
+ | * Play local video file | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | export DISPLAY=:0.0 | ||
+ | mpv --fs /home/pi/Videos/demo.mp4 | ||
+ | </syntaxhighlight> | ||
+ | * Play web-video | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | export DISPLAY=:0.0 | ||
+ | mpv --fs https://www.youtube.com/watch?v=lK-nYDmC1Dk | ||
+ | </syntaxhighlight> | ||
+ | ===How to Install Plex Media Server=== | ||
+ | Run the following command to install: | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list | ||
+ | curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add - | ||
+ | sudo apt update | ||
+ | sudo apt install plexmediaserver | ||
+ | </syntaxhighlight> | ||
+ | After successful installation, enable Plex (starts automatically at system startup): | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | sudo systemctl enable plexmediaserver | ||
+ | sudo systemctl start plexmediaserver | ||
+ | sudo systemctl status plexmediaserver | ||
+ | </syntaxhighlight> | ||
+ | After installation, login to Plex server by entering the following address in your computer browser: http://IPAddress:32400/web/ <br/> | ||
===Install Docker Engine=== | ===Install Docker Engine=== | ||
====Install Docker Engine==== | ====Install Docker Engine==== |
Latest revision as of 06:11, 19 January 2024
Contents
- 1 Account & Password
- 2 View IP address
- 3 Connect to Ubuntu via SSH
- 4 Update Software Packages
- 5 Install Ubuntu software center
- 6 Install the kernel-header package
- 7 Change time zone
- 8 Change startup LOGO and Wallpaper
- 9 Soft Factory Reset
- 10 Start the program automatically at startup(For example Firefox)
- 11 Disable auto-mounting
- 12 Setup Chinese language and Input method
- 13 Video playback with hardware decoding
- 14 How to Install Plex Media Server
- 15 Install Docker Engine
1 Account & Password
Regular Account:
User Name: pi
Password: pi
Root:
User Name: root
Password: fa
2 View IP address
Since the hostname is FriendlyElec.lan by default, you can use the ping command to get the IP address:
ping FriendlyElec.lan
3 Connect to Ubuntu via SSH
ssh pi@FriendlyElec.lan
The default password is: pi
4 Update Software Packages
$ sudo apt-get update
5 Install Ubuntu software center
$ sudo apt-get install snapd $ sudo snap install snap-store
6 Install the kernel-header package
sudo dpkg -i /opt/linux-headers-*.deb
try to compile a kernel module:
sudo apt update sudo apt install git gcc make bc git clone https://github.com/RinCat/RTL88x2BU-Linux-Driver.git cd RTL88x2BU-Linux-Driver make -j$(nproc) sudo make install sudo modprobe 88x2bu
7 Change time zone
7.1 Check the current time zone
timedatectl
7.2 List all available time zones
timedatectl list-timezones
7.3 Set the time zone (e.g. Shanghai)
sudo timedatectl set-timezone Asia/Shanghai
8 Change startup LOGO and Wallpaper
8.1 Change startup LOGO
Replace the following two files in the kernel source code directory and recompile the kernel:
kernel/logo.bmp
kernel/logo_kernel.bmp
Or use the script to operate, as shown below:
- Download scripts:
git clone https://github.com/friendlyarm/sd-fuse_rk3399.git -b kernel-4.19 cd sd-fuse_rk3399
- Compile kernel and repackage firmware
convert files/logo.jpg -type truecolor /tmp/logo.bmp convert files/logo.jpg -type truecolor /tmp/logo_kernel.bmp LOGO=/tmp/logo.bmp KERNEL_LOGO=/tmp/logo_kernel.bmp ./build-kernel.sh ubuntu-jammy-desktop-arm64 ./mk-emmc-image.sh ubuntu-jammy-desktop-arm64
9 Soft Factory Reset
Execute the following command in a terminal:
sudo firstboot && sudo reboot
10 Start the program automatically at startup(For example Firefox)
Put the desktop file in the ~/.config/autostart/ directory, for example:
mkdir ~/.config/autostart/ cp /usr/share/applications/firefox.desktop ~/.config/autostart/
11 Disable auto-mounting
sudo systemctl mask udisks2 sudo reboot
12 Setup Chinese language and Input method
12.1 Setup Chinese language
Enter the following command and select 'zh_CN.UTF-8':
sudo dpkg-reconfigure locales
Add environment variables to .bashrc:
echo "export LC_ALL=zh_CN.UTF-8" >> ~/.bashrc echo "export LANG=zh_CN.UTF-8" >> ~/.bashrc echo "export LANGUAGE=zh_CN.UTF-8" >> ~/.bashrc
Reboot device:
sudo reboot
13 Video playback with hardware decoding
13.1 GUI
- Locate the video file in the file browser, right click and select "Play with mpv media player"
- Using Kodi player
- Using Chromium web browser, you can play videos on the web with hardware decoding (limited to the video formats supported by the CPU)
13.2 Command line
- Play local video file
export DISPLAY=:0.0 mpv --fs /home/pi/Videos/demo.mp4
- Play web-video
export DISPLAY=:0.0 mpv --fs https://www.youtube.com/watch?v=lK-nYDmC1Dk
14 How to Install Plex Media Server
Run the following command to install:
echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add - sudo apt update sudo apt install plexmediaserver
After successful installation, enable Plex (starts automatically at system startup):
sudo systemctl enable plexmediaserver sudo systemctl start plexmediaserver sudo systemctl status plexmediaserver
After installation, login to Plex server by entering the following address in your computer browser: http://IPAddress:32400/web/
15 Install Docker Engine
15.1 Install Docker Engine
sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg lsb-release curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt update sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin
Let’s verify:
sudo docker info
15.2 Run Docker as a non-root user
sudo groupadd docker sudo gpasswd -a ${USER} docker sudo systemctl restart docker sudo chmod a+rw /var/run/docker.sock
Let’s verify:
docker images
15.3 Testing Docker: Installing Nextcloud with docker
mkdir ~/nextcloud -p docker run -d -p 8888:80 --name nextcloud -v ~/nextcloud/:/var/www/html/ --restart=always --privileged=true arm64v8/nextcloud
After installation, visit: http://Device-IP-Address:8888 on your computer browser to view the nextcloud web page.