Announcement

Collapse
No announcement yet.

Recommended things to do directly after a Kubuntu 22.04 LTS installation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Recommended things to do directly after a Kubuntu 22.04 LTS installation

    • I always perform (and recommend) the following 5 (7) steps directly after any Kubuntu (22.04) desktop installation - this usually takes under 5-10 minutes (including reboot):

    To do so --> open the Konsole terminal emulator from your --> Application Launcher --> System.
    Due to preventing typing errors​, please copy and paste the following commands one by one into Konsole - e.g. with your mouse or with "[Ctrl] [c]" and "[Ctrl] [Shift] [v]" - and execute them with [Return]. Double-check that you did not miss a letter or two.
    --> Everything in grey behind a single "⦁" is a whole command and has to be copied as a whole - even if it is longer than one line.

    1. If you don't need the information about when you have accessed (= opened or read) a file or folder, I suggest to additionally use the "noatime" option for your drive's ext4 partitions in the /etc/fstab file
    ( = this makes using old HDDs a tiny little bit faster and reduces write actions - and therefore wear on SSDs).

    If you installed Kubuntu 22.04 LTS with the default settings (and did not choose "Manual Installation/partitioning"), the system will use the ext4 file system for your drive's Linux partitions.
    And if your system doesn't use ext4 the following three commands won't do anything (except making a backup of your /etc/fstab file).
    • sudo cp /etc/fstab /etc/fstab.orig (this makes a backup of your /etc/fstab​ file first)
    • sudo sed -i '/ext4/ s/errors=remount-ro/errors=remount-ro,noatime/' /etc/fstab (this adds the "noatime" option for the "root" ext4 partition)​​
    • sudo sed -i '/ext4/ s/defaults/defaults,noatime/' /etc/fstab (this adds the "noatime" option for other ext4 partitions)​
    For safety reasons don't use the sed commands of step 1. in any other context than a fresh Kubuntu 22.04 LTS installation! Instead check and modify your /etc/fstab file by hand if need be - and back it up first.

    The change will be applied with the reboot after step 6. (7.)

    2. Reduce swappiness for desktop installations like it is suggested for *Ubuntu and like e.g. TUXEDO OS also does it
    ( = the system will use the physical memory modules longer and use the swap file or partition later).

    If you are curious you can check the setting with sudo sysctl vm.swappiness now and then again after step 6. (7.) and the reboot.
    • echo -e "# Reduce swappiness for desktop installation (default = 60)\nvm.swappiness=10" | sudo tee /etc/sysctl.d/99-sysswappiness.conf (this writes the modified value to your system)
    The change will be applied with the reboot after step 6. (7.)

    3. Reduce systemd timeouts for desktop installations like KDE suggests for Plasma in their Distributions/Packaging Recommendations
    ( = the system will not "hang" for 90 seconds and longer from time to time when logging out, rebooting or shutting down).

    I am reasonably conservative here and use 15 seconds, because on older machines it has seldom taken 10-13 seconds before certain services were able to gracefully quit by themselves (for example: KDE neon uses 15 seconds, TUXEDO OS and Garuda KDE use 10 seconds).
    • sudo mkdir -p /etc/systemd/system.conf.d && echo -e "# Reduce timeout (default = 90s)\n\n[Manager]\nDefaultTimeoutStopSec=15s" | sudo tee /etc/systemd/system.conf.d/99-systemtimeout.conf (this writes the first modified value to your system)
    • sudo mkdir -p /etc/systemd/user.conf.d && echo -e "# Reduce timeout (default = 90s)\n\n[Manager]\nDefaultTimeoutStopSec=15s" | sudo tee /etc/systemd/user.conf.d/99-usertimeout.conf (this writes the second modified value to your system)
    The change will be applied with the reboot after step 6. (7.)

    4.a) Change GRUB to show the boot menu for 1 second in single-boot systems
    ( = only Kubuntu is installed - this makes the boot menu much easier to access whenever you might need it).
    • sudo cp /etc/default/grub /etc/default/grub.orig (this makes a backup of your /etc/default/grub​ file first)​
    • sudo sed -i 's/^GRUB_TIMEOUT_STYLE=hidden/GRUB_TIMEOUT_STYLE=menu/' /etc/default/grub (this writes the first modified value to your system)
    • sudo sed -i 's/^GRUB_TIMEOUT=0/GRUB_TIMEOUT=1/' /etc/default/grub (this writes the second modified value to your system)
    • sudo update-grub (this updates your GRUB boot loader with the new values)
    OR

    4.b) Change GRUB to show the boot menu with all installed systems for 5 seconds in multi-boot systems
    ( = Kubuntu and another Linux or/and Windows are installed - and be sure to absolutely disable Windows fast startup if you intend to access the "C:" drive from Linux).
    • sudo cp /etc/default/grub /etc/default/grub.orig (this makes a backup of your /etc/default/grub​ file first)​​
    • sudo sed -i 's/^GRUB_TIMEOUT_STYLE=hidden/GRUB_TIMEOUT_STYLE=menu/' /etc/default/grub (this writes the first modified value to your system)
    • sudo sed -i 's/^GRUB_TIMEOUT=0/GRUB_TIMEOUT=5/' /etc/default/grub (this writes the second modified value to your system)
    • echo -e "\n# Enable os-prober for other installed systems\nGRUB_DISABLE_OS_PROBER=false" | sudo tee -a /etc/default/grub (this writes the third modified value to your system)
    • sudo update-grub (this updates your GRUB boot loader with the new values)
    The change will be visible with the reboot after step 6. (7.)

    5. Update your system and your programs for the first time
    (this is generally one of the first things you should do after installing any operating system).​
    • sudo snap refresh && sudo systemctl daemon-reload (this updates the Snaps)
    • sudo apt update && sudo apt full-upgrade (this updates all of your installation except for the Snaps)
    • sudo apt autopurge && sudo apt autoclean (this removes possible remains of the installation process)
    In case this is not a fresh Kubuntu 22.04 LTS installation, be careful with the autopurge in step 5. and thoroughly read and understand the output in Konsole !

    6. Install fundamental missing software like
    • multimedia codecs etc.
    • Microsoft Web and replacement fonts
    • exFAT utilities (the file system you should use to e.g. share USB sticks between Linux, Windows and macOS).
    You can select with [Tab] and confirm with [Return] in the following dialogues, select "Ok" and "Yes" to install.
    • sudo apt update && sudo apt install kubuntu-restricted-extras gstreamer1.0-vaapi libvdpau-va-gl1 rar fonts-crosextra-carlito fonts-crosextra-caladea exfatprogs (this installs all of the listed above)


    7. If you have a CD, DVD or Blu-ray drive, install the following to be able to play back video CDs, DVDs or Blu-rays.

    You can select with [Tab] and confirm with [Return] in the following dialogues, select "Ok" and "Yes" to install.
    • sudo apt update && sudo apt install libdvd-pkg (this installs the video play back for optical media)
    • sudo dpkg-reconfigure libdvd-pkg (this activates the video play back for optical media)

    • reboot and enjoy Kubuntu 22.04 LTS !
    Now it is time to begin thinking about a backup strategy for your future user data, e.g. with Kup ( --> System Settings --> Backups) or with something more versatile like Back In Time (as in Kubuntu Focus - please use the PPA for Kubuntu 22.04 LTS !) - or may it even only be regularly "by hand"…



    • Bonus - individual and potentially less important things to do:

    a. It is possible to remove Snap from Kubuntu 22.04 LTS and to use the "traditional" Firefox additionally to or instead of the Snap

    b. Enable Flatpak
    (e.g. to increase your pool of available programs).​

    c. Enable password feedback for the command line interface
    ( = so you can see something like ***** instead of nothing when typing in your password in Konsole - like you can see it in e.g. Linux Mint and Garuda KDE).
    • echo -e "# Enable password feedback\nDefaults pwfeedback" | sudo tee /etc/sudoers.d/pwfeedback (this writes the modified value to your system)
    • sudo chmod 0440 /etc/sudoers.d/pwfeedback (this applies the correct permissions to the written file)
    You will have to close Konsole and open it again to apply the change.

    d. Disable fast user switching
    (e.g. for security or performance reasons in multi-user setups).
    • echo -e "\n[KDE Action Restrictions] [\$i]\naction/switch_user=false\naction/start_new_session=false" | sudo tee -a /usr/share/kubuntu-default-settings/kf5-settings/kdeglobals (this writes the modified values to your system)
    You will have to log out and in again or reboot to apply the change.

    e. Enable both the Kubuntu Backports and Backports Extra PPAs for Kubuntu 22.04 LTS
    (e.g. to get Plasma 5.27.x and more recent versions of KDE Gear - programs like the Kate text editor or the screenshot utility Spectacle).​
    Last edited by Schwarzer Kater; May 16, 2024, 04:27 AM. Reason: modified explanation
    Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
    Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

    get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
    install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

    #2
    Last time I looked, this: nvm.swappiness was vm.swappiness

    Please Read Me

    Comment


      #3
      Also. may consider using CODE tags for the CLI entries. The Forum software has a "Copy Code" button for code tagged fields.

      Like this:
      Code:
      sudo mkdir -p /etc/systemd/system.conf.d && echo -e "# Reduce timeout (default = 90s)\n\n[Manager]\nDefaultTimeoutStopSec=15s" | sudo tee /etc/systemd/system.conf.d/99-systemtimeout.conf (this writes the first modified value to your system)
      Instead of:​​​​​​​
      • sudo mkdir -p /etc/systemd/system.conf.d && echo -e "# Reduce timeout (default = 90s)\n\n[Manager]\nDefaultTimeoutStopSec=15s" | sudo tee /etc/systemd/system.conf.d/99-systemtimeout.conf (this writes the first modified value to your system)

      Please Read Me

      Comment


        #4
        echo -e and "\n" is a carriage return - so everything is correct as it is. I also have tested (copied and pasted from here) everything in fresh installations before posting, of course. That's why it took 90 minutes between the 22.04 LTS and the 23.10 post (and a man has to eat, too)…
        But thank you for having a look anyway!

        PS: I considered using CODE tags, but then it would not have been as pleasant to read IMHO - the possibility to copy the commands is the same/similar.
        And in combination with "Everything in grey behind a single "⦁" is a whole command and has to be copied as a whole - even if it is longer than one line.​" at the beginning of the posts I think people will manage (as always: if they do read the instructions, too…).
        Last edited by Schwarzer Kater; May 13, 2024, 09:06 AM. Reason: addition
        Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
        Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

        get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
        install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

        Comment


        • oshunluvr
          oshunluvr commented
          Editing a comment
          Ah, I see your points.
      Working...
      X