Tari.in
High intellect, low income.
  • Nav
  • Bottom
  • Tux
  • Kowalski
  • Rico
  • Skipper
  • Private
  • Comment
  • Contact
  • Top
  • There are no visitor comments on this page

    Post-Install Configuration (Manjaro MATE)

    Below is a collection of commands and snippets I have put together over the years. Pick out the parts you find useful, and create your own one-click system configuration shell script.

    Encrypted Home partition

    If you have a default Manjaro installation with full disk encryption, your Home is not separated from the rest of the system. Here is how to add a separate Home partition - make sure your encryption password matches the one you used during installation.

    PARTITION="/dev/sda2"
    sudo cryptsetup luksFormat --type luks2 $PARTITION
    sudo cryptsetup open /dev/$PARTITION Home
    sudo mkfs.ext4 /dev/mapper/Home
    sudo mkdir /mnt/home
    sudo mount /dev/mapper/Home /mnt/home
    sudo rsync --recursive --links --hard-links --perms --executability --acls --xattrs --owner --group --times --whole-file --progress --ignore-times "/home/$USER" /mnt/home
    echo "Home UUID=$(lsblk --nodeps --noheadings -o UUID $PARTITION) /crypto_keyfile.bin luks" | sudo tee -a /etc/crypttab
    echo "/dev/mapper/Home /home ext4 defaults,noatime 0 2" | sudo tee -a /etc/fstab
    sudo cryptsetup luksAddKey $PARTITION /crypto_keyfile.bin
    sudo umount /mnt/home
    sudo rmdir /mnt/home
    

    Swap file

    This creates a Swap file the same size as your RAM.

    sudo dd if=/dev/zero of=/swapfile bs=1M count=`grep MemTotal /proc/meminfo | awk '{print $2 / 1024}' OFMT="%0.0f"` status=progress
    sudo chmod 600 /swapfile
    sudo mkswap /swapfile
    sudo swapon /swapfile
    echo "/swapfile none swap defaults 0 0" | sudo tee -a /etc/fstab
    

    Temp folder on disk

    This mounts /tmp on disk rather than in RAM.

    sudo systemctl mask tmp.mount
    
    cat << EOL | sudo tee "/etc/tmpfiles.d/tmp.conf"
    # see tmpfiles.d(5)
    # always enable /tmp folder cleaning
    D! /tmp 1777 root root 0
    
    # remove files in /var/tmp older than 10 days
    D /var/tmp 1777 root root 10d
    
    # namespace mountpoints (PrivateTmp=yes) are excluded from removal
    x /tmp/systemd-private-*
    x /var/tmp/systemd-private-*
    X /tmp/systemd-private-*/tmp
    X /var/tmp/systemd-private-*/tmp
    EOL
    

    Firefox in RAM

    This moves your firefox profile to RAM.

    sudo pamac install profile-sync-daemon
    firefox about:config
    
    # Set browser.cache.disk.parent_directory to /run/user/1000/firefox
    
    systemctl --user enable psd.service
    

    Sudo timeout

    This disables the timeout for sudo.

    EDITOR=nano sudo visudo
    
    # Append this line:
    Defaults timestamp_timeout=-1
    

    Pulse Audio resampling

    This will get you bit-perfect output.

    cp -r /etc/pulse $HOME/.config
    sed -i "s/^; avoid-resampling.*/avoid-resampling = true/" $HOME/.config/pulse/daemon.conf
    sed -i "s/^; default-sample-format.*/default-sample-format = s24le/" $HOME/.config/pulse/daemon.conf
    

    Hard disk power management

    Some laptop hard drives may produce frequent clicking noises due to the aggressive power management setting. 255 should disable APM completely. Change sda to match your device.

    echo "ACTION==\"add\", SUBSYSTEM==\"block\", KERNEL==\"sda\", RUN+=\"/usr/bin/hdparm -B 255 /dev/sda\"" | sudo tee -a /etc/udev/rules.d/69-hdparm.rules
    

    Software settings

    Here are some settings for sources and updates.

    sudo sed -i "s@RefreshPeriod = 6@RefreshPeriod = 24@" /etc/pamac.conf
    sudo sed -i "s@#RemoveUnrequiredDeps@RemoveUnrequiredDeps@" /etc/pamac.conf
    sudo sed -i "s@#EnableAUR@EnableAUR@" /etc/pamac.conf
    sudo sed -i "s@#CheckAURUpdates@CheckAURUpdates@" /etc/pamac.conf
    #sudo sed -i "s@#DownloadUpdates@DownloadUpdates@" /etc/pamac.conf
    sudo sed -i "s@#CheckAURVCSUpdates@CheckAURVCSUpdates@" /etc/pamac.conf
    

    Upgrade the whole system

    This will pull all available updates, so be patient.

    pamac upgrade --aur
    

    Install Additional Software

    This is what I usually add to a system, change the list to suit your needs.

    # Tools for building things from source
    sudo pamac install base-devel
    
    # Ayatana indicators
    pamac build ayatana-indicator-application ayatana-indicator-power ayatana-indicator-session ayatana-indicator-messages ayatana-indicator-datetime ayatana-indicator-sound ayatana-indicator-printers ayatana-indicator-display mate-indicator-applet matekbd-keyboard-display
    
    # Ubuntu look
    pamac build ambiant
    
    # Font for displaying emojis
    sudo pamac install noto-fonts-emoji
    
    # Applications
    pamac build caja-rename ayatana-webmail my-weather-indicator-git telegram-desktop-bin
    sudo pamac install pamac-tray-icon-plasma evolution vlc aisleriot trash-cli inkscape gimp strawberry mkvtoolnix-gui
    

    Automagically delete old trash

    This checks the trash on reboot and removes anything older than 30 days.

    (crontab -l 2>/dev/null; echo "@reboot /usr/bin/trash-empty 30") | crontab -
    

    Login screen

    Some fixes and settings.

    sudo sed -i "s/^hidden-shells=\/bin\/false \/usr\/bin\/nologin$/hidden-shells=\/bin\/false \/usr\/bin\/nologin \/sbin\/nologin/" /etc/lightdm/users.conf
    echo "activate-numlock=true" | sudo tee -a /etc/lightdm/slick-greeter.conf
    

    Handler for mailto: links

    If you're using a webmail host other than GMail, you may use this:

    cat << EOL | sudo tee "/usr/share/applications/mailto.desktop"
    [Desktop Entry]
    Name=Mailto
    Type=Application
    Exec=firefox https://mail.example.com/YOUR_SEND_MAIL_URL=%u
    Categories=Email;
    MimeType=x-scheme-handler/mailto;
    OnlyShowIn=None
    EOL
    
    xdg-settings set default-url-scheme-handler mailto mailto.desktop
    

    Configure MATE

    Here are some settings for the UI. Change them to whatever you see fit.

    # Some indicator settings
    gsettings set org.ayatana.indicator.datetime show-date true
    gsettings set org.ayatana.indicator.datetime show-day true
    gsettings set org.ayatana.indicator.session show-bug-report false
    gsettings set org.ayatana.indicator.session show-desktop-help false
    gsettings set org.ayatana.indicator.session show-device-info false
    gsettings set org.ayatana.indicator.session show-distro-help false
    gsettings set org.ayatana.indicator.session user-show-menu false
    gsettings set org.ayatana.indicator.session suppress-restart-menuitem true
    
    # Disable Network Manager notifications
    org.gnome.nm-applet disable-connected-notifications true
    org.gnome.nm-applet disable-disconnected-notifications true
    org.gnome.nm-applet suppress-wireless-networks-available true
    
    # Set the wallpaper
    gsettings set org.mate.background picture-filename "/SOME/PATH/IMAGE.jpg"
    gsettings set org.mate.background picture-options "zoom"
    
    # Set the theme
    gsettings set org.mate.interface gtk-theme "THEME_NAME"
    gsettings set org.mate.interface icon-theme "THEME_NAME"
    gsettings set org.mate.peripherals-mouse cursor-theme "THEME_NAME"
    
    # Set the visibility of some icons on your Desktop
    gsettings set org.mate.caja.desktop computer-icon-visible false
    gsettings set org.mate.caja.desktop home-icon-visible false
    gsettings set org.mate.caja.desktop trash-icon-visible false
    gsettings set org.mate.caja.desktop volumes-visible false
    
    # Set the date format of files in Caja to yyyy-MM-dd hh:mm:ss
    gsettings set org.mate.caja.preferences date-format "iso"
    
    # Tell Caja to use detailed lists by default
    gsettings set org.mate.caja.preferences default-folder-viewer "list-view"
    
    # Enable the Delete command in Caja
    gsettings set org.mate.caja.preferences enable-delete true
    
    # Disable sound preview
    gsettings set org.mate.caja.preferences preview-sound "never"
    
    # Show hidden files in Caja
    gsettings set org.mate.caja.preferences show-hidden-files true
    
    # Disable window animation effects
    gsettings set org.mate.interface enable-animations false
    
    # Set the order and position of window controls
    gsettings set org.mate.interface gtk-decoration-layout "menu:minimize,maximize,close"
    
    # Hide input-related menus
    gsettings set org.mate.interface show-input-method-menu false
    gsettings set org.mate.interface show-unicode-menu false
    
    # Set toolbars to display icons with text below
    gsettings set org.mate.interface toolbar-style both
    
    # Prevent QT applications being scaled up
    gsettings set org.mate.interface window-scaling-factor-qt-sync false
    
    # Do not show user switching option
    gsettings set org.mate.lockdown disable-user-switching true
    
    # Disable keyboard sounds
    gsettings set org.mate.Marco.general audible-bell false
    
    # Set the order and position of window controls
    gsettings set org.mate.Marco.general button-layout "menu:minimize,maximize,close"
    
    # Center new windows on screen
    gsettings set org.mate.Marco.general center-new-windows true
    
    # Disallow autorun on media insertion
    gsettings set org.mate.media-handling autorun-never true
    gsettings set org.mate.media-handling automount-open false
    
    # Always show notifications on the specified monitor
    gsettings set org.mate.NotificationDaemon theme "coco"
    gsettings set org.mate.NotificationDaemon monitor-number 1
    gsettings set org.mate.NotificationDaemon use-active-monitor false
    
    # Show this number of items in the places menu
    gsettings set org.mate.panel.menubar max-items-or-submenu 10
    
    # Hide the Menu Bar icon
    gsettings set org.mate.panel.menubar show-icon false
    
    # Set Pluma's colours to classic
    gsettings set org.mate.pluma color-scheme "classic"
    
    # Disable right margin in Pluma
    gsettings set org.mate.pluma display-right-margin false
    
    # Tell Pluma to convert tabs to spaces
    gsettings set org.mate.pluma insert-spaces true
    
    # Disable wrapping in Pluma
    gsettings set org.mate.pluma wrap-mode GTK_WRAP_NONE
    
    # Some power management
    gsettings set org.mate.power-manager action-critical-battery "suspend"
    
    # Disable the suspend button
    gsettings set org.mate.power-manager button-suspend "nothing"
    
    # Hide the systray power icon
    gsettings set org.mate.power-manager icon-policy "never"
    
    # Turn off monitors after specified number of seconds
    gsettings set org.mate.power-manager sleep-display-ac 3600
    
    # Disable screensaver
    gsettings set org.mate.screensaver mode "blank-only"
    
    # Disallow user switching when screen is locked
    gsettings set org.mate.screensaver user-switch-enabled false
    
    # Activate power saving after a certain number of minutes
    gsettings set org.mate.session idle-delay 60
    
    # Disable keyboard sounds
    gsettings set org.mate.sound input-feedback-sounds false
    
    # Set Sticky Notes to green
    gsettings set org.mate.stickynotes default-color "rgb(138,226,52)"
    gsettings set org.mate.stickynotes use-system-color false
    
    # Set default Sticky Notes size
    gsettings set org.mate.stickynotes default-height 200
    gsettings set org.mate.stickynotes default-width 300
    
    # Always show Sticky Notes
    gsettings set org.mate.stickynotes desktop-hide false
    

    Enable network time synchronization

    sudo timedatectl set-ntp true
    

    Fix Pamac's indicator

    cp /etc/xdg/autostart/pamac-tray-plasma.desktop $HOME/.config/autostart/pamac-tray-plasma.desktop
    sed -i "/OnlyShowIn.*/d" $HOME/.config/autostart/pamac-tray-plasma.desktop
    cp /etc/xdg/autostart/pamac-tray.desktop $HOME/.config/autostart/pamac-tray.desktop
    echo "X-MATE-Autostart-enabled=false" >> $HOME/.config/autostart/pamac-tray.desktop
    
    Add your comment to this page

    Note: If you wish to report a bug, request a feature, or ask a question about an application - please do so by using the appropriate GitHub link on the application's page.

    3 + 7 =
    Please wait, this could take a second...