Linux Hints

  • Problem: Moving files into a web directory, even after changing permissions reporting a permission error when clicked on from web:
    • restorecon -r < path >
  • Adding a user to an existing group
    • usermod -a -G {group} (username}
  • Listing groups a user belongs to
    • groups {username}
  • Forcing all files in a folder to belong to a group:
    • chmod g+s dir
  • Ubuntu: setting your default shell:
    • chsh
    • then type the path to the shell you want, ex: /bin/bash
  • Adding a user
    • useradd -c "{USER FULL NAME}" -g {group} {username}
  • set password for a user
    • passwd {username}
  • Force the user to change their password on next login
    • chage -d 0 {username}
  • Copy disk image
    • sudo dd if=/path/of/source of=/path/of/destination bs=1M
  • Allow http/https through firewall
    • sudo firewall-cmd --add-service=http
    • sudo firewall-cmd --add-service=https
  • Write iso to bootable USB on openSUsE
    • Open SUSE Studio Imagewriter - run application

Kmail

Kmail won't open folders

This one is mostly a matter of restarting so KMail can fetch those pesky items... Some possible steps: Use Alt + F2 or Konsole to type: kquitapp kmail, then wait a minute, then akonadictl stop, wait a minute, type akonadictl start, wait a minute, type kmail. This stops KMail (closing all windows), stops the KMail backend, starts the KMail backend, starts KMail. Having a working internet connection increases the chances of success. Sometimes, you can also just do kquitapp kmail, wait a minute, and start KMail again. Often, a few restarts seem to be needed. It is unclear what is the reason for this, but on bad network connections it is more likely to happen.

PDF

Merging PDF documents

gs -q -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=outputfile.pdf doc1.pdf doc2.pdf doc3.pdf ... docN.pdf

OpenSUSE disk issues

Snapper / btrfs

  • Configure /etc/snapper/configs/root to use say;
# limit for number cleanup
NUMBER_MIN_AGE="1800"
NUMBER_LIMIT="2-3"
NUMBER_LIMIT_IMPORTANT="3-5"

  • Use the following commands to see what is present and disk usage;
snapper list
btrfs fi usage /

  • Then manually run the cronjobs, if the system gets turned off sometimes they don't run...
/etc/cron.daily/suse.de-snapper
/etc/cron.weekly/btrfs-balance

qmail stored in /var/qmail/mailnames/

mail log /var/log/maillog

Comments

Topic revision: r12 - 2020-03-31 - TimMcDonald
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback