openSUSE Leap 15.0 - Configuration
This guide shows how to configure my minimal installation of openSUSE Leap 15.0.
Manage users
$ zypper install --no-recommends sudo
Add a new user and continue with the following sections using this new user.
Add user
Create user <user>
:
$ useradd -U -u <uid> -m -k /dev/null <user> $ passwd <user>
Configure privileges for <user>
in /etc/sudoers
using visudo
:
$ visudo
then add/uncomment Defaults targetpw
and add permissions for <user>
:
/etc/sudoers
Defaults targetpw ... <user> ALL=(ALL) ALL
Manage packages
Following the list of packages, install the additional packages:
$ sudo zypper install --no-recommends <package1> ... <packagen>
Network manager
NetworkManager
$ sudo zypper install --no-recommends NetworkManager yast2-networkExecute
yast
and under "System" select "Network Settings". In the "Global Options" tab set
"NetworkManager Service" as Network Setup Method.
Firewall
firewalld
$ sudo zypper install --no-recommends firewalld $ sudo systemctl unmask firewalld.service $ sudo systemctl enable --now firewalld.service
Wi-Fi
Broadcom 4331 (MacBook Pro 9.2)
Install either the wl-driver (option 1) or firmware for b43 driver (option 2).
-
Option 1 (Recommended)
Install broadcom-wl wireless driver from Packman:
$ sudo zypper ar -f http://packman.inode.at/suse/openSUSE_Leap_15.0/ Packman $ sudo zypper refresh $ sudo zypper install broadcom-wl broadcom-wl-kmp-default
-
Option 2
Install firmware for b43 wireless driver:
$ sudo zypper install --no-recommends b43-fwcutter $ sudo install_bcm43xx_firmware
NTP
chrony
$ sudo zypper install --no-recommends chrony
systemd-timesyncd.service
is in conflict with chronyd.service
, so disable it first:
$ sudo systemctl disable systemd-timesyncd.service
and then enable chronyd.service
:
$ sudo systemctl enable chronyd.service
Enable NetworkManager's dispatcher to inform chrony when the network status has changed:
$ sudo systemctl enable NetworkManager-dispatcher.service
Power management
TLP
$ sudo zypper install --no-recommends ethtool smartmontools tlp tlp-rdw
Enable services required by tlp
:
$ sudo systemctl enable tlp.service $ sudo systemctl enable tlp-sleep.service
Configure TLP via /etc/default/tlp
:
- Exclude smartphones from autosuspend (i.e. enable charging):
/etc/default/tlp
USB_BLACKLIST_PHONE=1
- Use
systemd-rfkill.service
andsystemd-rfkill.socket
to restore state of radio devices:/etc/default/tlp
RESTORE_DEVICE_STATE_ON_STARTUP=0 #DEVICES_TO_DISABLE_ON_*=... #DEVICES_TO_ENABLE_ON_*=...
Power off, reboot, suspend, hibernate
Configure sudo
to allow user <user>
to execute the necessary
systemctl
system commands as root without asking for the password:
$ sudo visudo -f /etc/sudoers.d/usercmds
and add the following lines:
/etc/sudoers.d/usercmds
## systemctl system commands <user> <hostname>=NOPASSWD:/usr/bin/systemctl poweroff,/usr/bin/systemctl reboot,/usr/bin/systemctl suspend,/usr/bin/systemctl hibernate
where <hostname>
is the machine's hostname.
Fonts
IBM Plex
$ git clone https://github.com/IBM/plex.git $ cd plex $ sudo cp IBM-Plex-*/fonts/complete/ttf/*.ttf /usr/share/fonts/truetype/
Fira Mono
$ git clone https://github.com/mozilla/Fira.git $ cd Fira $ sudo cp ttf/*ttf /usr/share/fonts/truetype/
Font Awesome
$ git clone https://github.com/FortAwesome/Font-Awesome.git $ cd Font-Awesome $ sudo cp webfonts/*.ttf /usr/share/fonts/truetype/
X Window System
$ sudo zypper install --no-recommends xorg-x11-server xf86-input-libinput xf86-video-intel xinit xrandr
Keyboard and touchpad configuration
Tap for touchpad
Add Option "Tapping" "On"
to the touchpad section in file
/etc/X11/xorg.conf.d/40-libinput.conf
:
/etc/X11/xorg.conf.d/40-libinput.conf
Section "InputClass" Identifier "libinput touchpad catchall" MatchIsTouchpad "on" MatchDevicePath "/dev/input/event*" Driver "libinput" Option "Tapping" "On" EndSection
If the file does not exist, copy 40-libinput.conf
from /usr/share/X11/xorg.conf.d/
.
Function keys (MacBook Pro 9.2)
The behaviour of fn+F<num> is configured by the fnmode
option of the
hid_apple
kernel module via the /etc/modprobe.d/hid_apple.conf
file.
- To disable the fn key, add the following line:
/etc/modprobe.d/hid_apple.conf
options hid_apple fnmode=0
- To get F<num> by pressing fn+F<num>, add the following
line:
/etc/modprobe.d/hid_apple.conf
options hid_apple fnmode=1
- To get F<num> by pressing F<num>, add the following line:
/etc/modprobe.d/hid_apple.conf
options hid_apple fnmode=2
Optional - X keyboard configuration (MacBook Pro 9.2)
Optionally, configure the keyboard for X:
$ sudo localectl --no-convert set-x11-keymap <layout> apple_laptop mac
where <layout>
is one of the available layouts from
$ localectl list-x11-keymap-layouts
Window manager
dwm
Install the required library dependencies:
$ sudo zypper install --no-recommends libX11-devel libXft-devel libXinerama-devel
$ git clone https://github.com/icanalesm/dwm.git $ cd dwm $ make $ sudo make install
To execute dwm
with startx
, add at the end of ~/.xinitrc
the following line:
~/.xinitrc
exec dwm
Terminal emulator
st
$ git clone https://github.com/icanalesm/st.git $ cd st $ make $ sudo make install
Terminal multiplexer
tmux
$ sudo zypper install --no-recommends tmux
Color calibration
xcalib
$ sudo zypper install --no-recommends xcalib
Backlight control
brightctl
$ git clone https://github.com/icanalesm/brightctl.git $ cd brightctl
Apply the desired configuration.
Compile and install:
$ make $ sudo make install
Configure sudo
to allow user <user>
to execute brightctl
as
root without asking for the password:
$ sudo visudo -f /etc/sudoers.d/usercmds
and add the following lines:
/etc/sudoers.d/usercmds
## brightctl commands <user> <hostname>=NOPASSWD:/usr/local/bin/brightctl
where <hostname>
is the machine's hostname.
Sound
$ sudo zypper install --no-recommends alsa alsa-utils alsa-plugins
Execute alsamixer
to adjust the playback controls.
Create /var/lib/alsa/asound.state
for alsa-restore.service
:
$ sudo alsactl store
Configure controller (MacBook Pro 9.2)
Add to /etc/modprobe.d/sound.conf
the following line:
/etc/modprobe.d/sound.conf
options snd_hda_intel model=intel-mac-auto
Web browser
Firefox
$ sudo zypper install --no-recommends MozillaFirefox
Image viewer
feh
$ sudo zypper install --no-recommends feh ImageMagick
PDF viewer
zathura
$ sudo zypper install --no-recommends zathura poppler-data zathura-plugin-pdf-poppler zathura-plugin-ps zathura-plugin-djvu