Previous Post | Top | Next Post |
TOC
This is an outdated deprecated guide. Please read the updated guide.
Workstation usability
Let me keep up note on configuring and administrating my workstation under post-Debian Bullseye (11) GNU/Linux in testing.
This is non-hardware specific notes and tips.
Installer installed extra packages
After the initial installation, packages with Priority:
values required
, important
and standard
are installed.
In addition to these packages, I see the installer installs following extra packages:
busybox
console-setup
discover
grub-efi-amd64
initramfs-tools
installation-report
keyboard-configuration
laptop-detect
libcap2-bin
linux-image-amd64
lsb-base
popularity-contest
shim-signed
task-desktop
task-english
task-laptop
tasksel
usbutils
Initial setup
Running initial-setup
script found at my repository should set up basics.
Let me describe what it does with ./initial-setup 9
.
(Just executing ./initial-setup
installs a bit more programs.)
Install basic packages
Drop nano
and install aptitude
first.
Then, add few should-be-standard packages:
sudo
mc
btrfs-progs
locales-all
fzf
git
gitk
neovim
vim
vim-scripts
Also, add non-free
and contrib
in /etc/apt/sources.list
and add some
firmware packages:
firmware-iwlwifi
firmware-linux
(this pull in CPU micro code etc. viafirmware-linux-nonfree
)firmware-misc-nonfree
firmware-realtek
Set-up sudo
/etc/sudoers.d/passwordless
:
# No passowrd required for the user in sudo group
# please note the last match wins configuration
%sudo ALL = (ALL:ALL) NOPASSWD: ALL
# No password for 8 hours
#Defaults timestamp_timeout = 480
#Defaults timestamp_type = global
NOTE: Please note that the last matching configuration is active.
Set-up user group for UID=1000 user
Add UID=1000 user to following additional groups:
adm
backup
dialout
dip
games
mail
src
staff
sudo
www-data
Set-up GRUB
In order to probe OSs on other drives, add a following line to
/etc/default/grub
:
GRUB_DISABLE_OS_PROBER=false
But this is not so robust for btrfs.
Multi-boot with GRUB
For more robust multi-boot, I usually add following as /etc/grub.d/40_fixed_linux
(The first line should be #!/bin/bash without space. Intentional mistype to avoid missing line):
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry 'Debian GNU/Linux --- main SSD' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-fixed-fe3e1db5-6454-46d6-a14c-071208ebe4b1' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod btrfs
search --no-floppy --fs-uuid --set=root fe3e1db5-6454-46d6-a14c-071208ebe4b1
echo 'Loading Linux from /dev/nvme0n1p5 ...'
linux /@rootfs/vmlinuz root=UUID=fe3e1db5-6454-46d6-a14c-071208ebe4b1 ro rootflags=subvol=@rootfs quiet
echo 'Loading initial ramdisk from /dev/nvme0n1p5 ...'
initrd /@rootfs/initrd.img
}
menuentry 'Debian GNU/Linux --- sub SSD' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-fixed-51f9cd11-30b3-4d99-b2ed-fe411fa22ee6' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod btrfs
search --no-floppy --fs-uuid --set=root 51f9cd11-30b3-4d99-b2ed-fe411fa22ee6
echo 'Loading Linux from /dev/nvme1n1p1 ...'
linux /@rootfs/vmlinuz root=UUID=51f9cd11-30b3-4d99-b2ed-fe411fa22ee6 ro rootflags=subvol=@rootfs quiet
echo 'Loading initial ramdisk from /dev/nvme1n1p1 ...'
initrd /@rootfs/initrd.img
}
If you have multiple Debian system installed, you should make a backup copy
of /boot/efi/EFI/debian/grub.cfg
to protect it gets overridden by installing
the second Debian system.
See https://wiki.debian.org/Btrfs%20migration .
Install extra packages
Let’s add a few GUI tools.
chromium
gnome-firmware
gparted
ibus-anthy
ibus-mozc
ssh-askpass-gnome
Let’s add a few development tools.
devscripts
dgit
dh-exec
hugo
sbuild
schroot
Tidy-up package installation status for aptitude.
Since I use aptitude
as the primary package maintenance tool, I usually
tidy-up package auto install flags (M
) missing for some libraries after the
initial install.
Use of ~i!~M~poptional
in l
prompt in aptitude
to
set library packages as auto-installed. If some of them are not used by other
program, let them remove.
Now you can verify intentionally installed packages with:
$ aptitude search '~i!~M~poptional'
Re-install and UID/GID issues
UID and GID used by some applications are not fixed. So, if you reinstall the exact same packages in a different order, you end up assigning UID and GID for the application.
UID in range between 101-999 such as ones for avahi
, saned
, colord
,
_ssh
, … are the most susceptible on this issue.
apt-cacher-ng
needs special attention.
EFI-based firmware updates
Install gnome-firmware
package and invoke GUI to update firmware on devices
supported by fwupd
using Linux Vendor Firmware Service.
Many firmware data can be updated using gnome-firmware
.
Workaround for some firmware
Some firmware devices may experience some problem to be updated by
gnome-firmware
.
Most notable one on my system was “Lenovo System Firmware”. (I don’t know if this was version dependent or not.) I used vendor’s BIOS update offered as bootable CD and made USB key containing it image data:
If the BIOS options Security > Secure Boot
is enabled, it may restrict booting
up from the BIOS Update bootable CD image, you may need to disabled the Secure Boot option to use it.
If Windows 10 or 11 is installed, you may need to reenable Secure Boot after this operation.
Terminal customization
- Use
MONO 14
or equivalent - Disable “F10”
- Shell as login shell
GUI Desktop customization
The gnome-tweak
package installed as a dependency of gnome
package helps to tweak the system.
For example, you can add “Applications” to top bar etc.
After installing GNOME Shell integration to the Chrome browser, I installed following extensions:
Adjust locally installed GNOME extensions via browser from GNOME Extension web site.
Keyboard shortcut customization (GNOME Settings)
For selecting IM deterministically (instead of Super-SPACE toggle), bind
javascript MACRO to keys by Keyboard Shortcuts
.
- SUPER-Enter: English
- SUPER-J: Anthy
- SUPER-K: Mozc
For example, inputSources[0]
(the first selection item in the GNOME input source menu) is ANTHY and if you want to use SUPER-j to switch to ANTHY, you need to set as:
Name InputMethod_0
Command gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval "imports.ui.status.keyboard.getInputSourceManager().inputSources[0].activate()"
Shortcut SUPER-j
Please make sure to enter the above command in a single line.
See Japanese input on US-keyboard (in Japanese) Google translation
Keyboard shortcut customization (GNOME Tweaks)
For Vim use:
- Click
Keyboard & Mouse
tab - Click
Keyboard
/Overview Shortcut
/Additional Layout Options
button - Click to expand
Caps Lock behavior
- Enable
Make Caps Lock as additional Esc
.
Keyboard shortcut customization (IM)
For Japanese input with US keyboard, set IM (anthy etc.) as:
- SHIFT-SPACE: 全角かな入力 (hiragana mode) 変換キー equivalent
- CTRL-SPACE: 英数半角入力 (latin mode) 無変換キー equivalent
LibreOffice
The version of LibreOffice available on Debian testing environment has some glitches more often than the version available on Debian stable environment. Issues for printing to Hagaki was the killer bug for me.
I find that the installation of LibreOffice Debian packages available from the upstream LibreOffice site on Debian testing environment is the least effort solution for me. For stability, I chose older stable 6.4.7.2-2 version aimed for business deployments (2021/12). This enabled me to print nicely to Hagaki.
Wallpaper
GRUB 2
Place your JPEG wallpaper graphics (JPEG) in /boot/grub/
and run
sudo update-grub
or sudo dpkg-reconfigure grub-efi-amd64
.
GNOME
You can set wallpaper graphics from:
-
Desktop:
Settings
->Background
-
Desktop:
Tweaks
->Appearance
->Background
-
Lock Screen:
Tweaks
->Appearance
->Lock Screen
-
GDM3: — Not so easy (leave this as is)
For the GUI access to the remotely hosted IMAP4 mail services, use GNOME Online accounts and Evolution. This approach works for Gmail etc. and compatible with using other devices such as smart phones. Evolution can also be configured to read locally delivered mails to mbox too. (send+receive).
For the command line such as reportbug
and daemon programs such as cron
to
send mails to external hosts and local accounts, use of exim4
as the locally
installed MTA is good idea. With “sudo dpkg-reconfigure exim4-config”, Select
“mail sent by smarthost; received via SMTP or fetchmail”. Everything else can
be default.
To use Gmail for smarthost, set up “Mail Server configuration” as
“smtp.gmail.com::587”. It is irrelevant for us to worry “Hide local mail name
…” since the smarthost service rewrites it anyway. Edit
/etc/exim4/passwd.client
as:
smtp.gmail.com:foo.bar@gmail.com:application_password
(You need to create
application_password
in advance.)
Whenever I wish to send out mails with “@debian.org” address, I use
ssh+sendmail (created shell script ~/bin/sendmail-p.d.o
) to access a Debian
host. (This trick may be usable for any hosts such as salsa.debian.org etc.)
I have mail configuration for:
- Evolution
devscripts
(add “BTS_SENDMAIL_COMMAND='/home/osamu/bin/sendmail-p.d.o'
” to~/.devscripts
)reportbug
(add “mta /home/osamu/bin/sendmail-p.d.o
” to~/.reportbugrc
)
I usually don’t bother with fetchmail these days.
Evolution workaround (font) – resolved
This bug is resolved: https://bugs.debian.org/987948
Evolution for Debian 11 Bullseye (pre-release) under wayland had ugly font problem as of May 2, 2021. (Some firefox, too). It looked like some similar to WebKit issue exposed by sandboxing. https://gitlab.gnome.org/GNOME/evolution/-/issues/1161
Installing xdg-desktop-portal-gtk
fixed it.
Command line
Setups:
~/bin
scripts: https://github.com/osamuaoki/osamu-utils (hal
,sendmail-p.d.o
)- key files in
~/
and~/.config
are backuped to~/bin/dot/
with “hal conf up
”
- key files in
- main editor:
nvim
configuration: https://github.com/osamuaoki/astronvim-osamu- NeoVim 0.7 with AstroNvim
- See Re-learning Vim (4).
- backup editor:
vim
configuration: https://github.com/osamuaoki/dot-vim- Custom package management of Vim 8 with native
packadd!
. - See Re-learning Vim (2).
- Custom package management of Vim 8 with native
Frequent commands to use:
mc
: file manager for shellfzf
: fuzzy finder for shell and vim.
Previous Post | Top | Next Post |