After the Installation
Getting Started after the Installation Once you get your Manjaro-Arm installed and booted, there are a few things that you may want to do to make it more tailored to your needs. Below is a list of a few common things that you can change or configure
Contents
Overview
This section will discuss some of the common configurations that you may want to set up for using your device.
General or all editions
Using the Package Manager (CLI)
Using pacman can be a truly wonderful experience. Its simplicity is one of a kind and the power of it can be addicting for people who are not used to it. To perform a full system update
# pacman -Syyu
To install a single package
# pacman -S <packagename>
To install a group of packages
# pacman -S <package 1> <package 2> <package 3>
To search for package
# pacman -Ss <search string>
To see installed packages
# pacman -Q or # pacman -Q | grep <packagename>
To remove packages
# pacman -R <packagename>
There is plenty more that pacman can do however there are very good articles on that located here and here
Changing Password(s)
To change either password Root or your User (manjaro by default) simply run the passwd command as that user: As user manjaro
$ passwd
Put in the current password (manjaro is default password) press return and put in the new password. You will need to put it in twice to confirm
As Root
$ su # passwd
And then do the same procedure as above.
Changing Username
Changing Hostname
To change the host name you simply need to edit one file as root and reboot.
$ sudo nano /etc/hostname
put the desired hostname in place of manjaropi
press ctrl + o to write to the file
press ctrl + x to close
Then reboot. Once it boots you will notice the hostname has change manjaro@newhost
Configuring SSH for more security
By default ssh allows access to the root user. Generally, this is a bad idea for security. Manjaro-Arm has left this enabled to ensure that you can access your device in order to set it up. It would be safest to not allow the root user over ssh and even more to enable ssh keys.
Disabling ssh for root user
To disable the root user, edit the /etc/ssh/sshd.conf as root with your favourite editor
# nano /etc/ssh/sshd.conf
change the PermitRootLogin line to:
PermitRootLogin prohibit-password
write the file to disk and exit the editor Restart sshd by:
# systemctl restart sshd
Setting up keys
Use ntpd to preserve time across reboots
The Raspberry Pi's, along with several other SBC's (single board computers) have no RTC (real time clock). As such, when the SBC loses power, the clock on Manjaro will reset do the default. To get around this, one can use ntpd. ntpd is the Network Time Protocol Daemon, used to synchronize system time over the internet. To set it up, install the ntp package. To have the daemon start at boot, then run
# systemctl enable ntpd.service
To have the ntp update the system time at boot, probably the perferred option:
# systemctl enable ntpdate.service
To make ntp update the system time manually, and run as a daemon in the background, run:
# ntpd -u ntp:ntp
To force ntpd to update the time and exit without keeping the daemon alive, run
# ntpd -q
One can also have ntpd synchronize at network interface startup. To use this with netctl, add
ExecUpPost='/usr/bin/ntpd || true' ExecDownPre='killall ntpd || true'
to the netctl profile file.
Minimal Edition
Installing Xorg and a Desktop Environment and/or a Window Manager
Prep
If you have not already, you should install all available updates (and reboot after doing so):
pacman-mirrors -g; #Update mirrors list pacman-key --refresh-keys; #Refresh/Update security keys pacman-optimize; sync; #A little cleanup pacman -Syyu; #Finally, search for and install any updated packages
Graphics Drivers
The primary Mesa driver should already be installed, as well as mhwd (mhwd will list a number of invalid config files; these can be safely ignored). You will also need:
pacman -S --needed xf86-video-fbdev xf86-video-vesa
There are also a few symlinks that need to be created:
ln -s /usr/lib/mesa/libEGL.so.1.0.0 /usr/lib/libEGL.so ln -s /usr/lib/mesa/libEGL.so.1.0.0 /usr/lib/libEGL.so.1 ln -s /usr/lib/mesa/libEGL.so.1.0.0 /usr/lib/libEGL.so.1.0.0 ln -s /usr/lib/mesa/libGL.so.1.2.0 /usr/lib/libGL.so ln -s /usr/lib/mesa/libGL.so.1.2.0 /usr/lib/libGL.so.1 ln -s /usr/lib/mesa/libGL.so.1.2.0 /usr/lib/libGL.so.1.2.0
Xorg
pacman -S --needed xorg-server xorg-server-utils xorg-xinit pacman -S --needed xorg-twm xorg-xclock xterm
Desktop/Login Manager
pacman -S slim; #This is a very light-weight desktop/login manager. You can use others if you choose
Append the following to ~/.bash_profile
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx
Xfce
pacman -S xfce4; #This installs a number of packages. I chose to install all of them, as they seem to be pretty much the bare minimum anyway pacman -S xfce4-goodies; #This is completely optional and includes extra tools/packages for Xfce
Use vi (or your console text editor of choice) to create ~/.xinitrc with the following content:
#!/bin/sh
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fi
exec startxfce4
Make the file you just created executable with:
chmod +x .xinitrc
Reboot and enjoy your freshly-installed Desktop/Window manager.