Skip to content

Instantly share code, notes, and snippets.

@kurtis318
kurtis318 / KDE_settings_for_4k_display_on_F27.txt
Created November 27, 2017 02:17
KDE settings for 4k display on F27
I installed a fresh install of Fedora 27 on my Dell XPS 15 a couple of days ago. I experimented with GNOME, XFCE and KDE desktops. GNOME appears to work good out of the box. XFCE still has a long way to go so I won't be using it even though it is my favorite (I always revert back to the XFCE desktop on nearly all my Linux computers).
KDE needed some help. Here are my notes.
Change default font size to 192
Start -> Fonts
Enable "Force fonts DPI" and set the value to 192
Increase System Tray Settings icon size
@kurtis318
kurtis318 / Permission_fix_for_Linux_VBox_guest_Win10_host.txt
Created November 6, 2017 02:42
Permission fix for Linux VBox guest Win10 host
I purchased a used Microsoft Surface Pro 2 this past weekend (8gb MEM, 256GBm ssd). I have a RHEL 7.4 guest running using the latest Oracle Virtualbox (needed separate guie3st tools ISO, built-in iso would not comple correctly).
I defined a shared folder to share into my RHEL 74 guest OS. When I tried to open the shared folder from RHGEL 7,4, I got a permission failure.
I found an answer via Google but cannot find the URL. Here is the fix that works after loging out and back in from GNOME session.
sudo usermod -a -G vboxsf $(whoami)
@kurtis318
kurtis318 / Getting_copy-paste_working_in_Windows_10_KVM.txt
Created October 24, 2017 04:23
Getting copy/paste working in Windows 10 KVM
Found the answer to getting copy/paste working in Windows 10 KVM here:
http://blogs.nologin.es/rickyepoderi/index.php?/archives/87-Copy-n-Paste-in-KVM.html
Solution was to run installer in this ISO (do not have url, sorry, I think Google can find it)
virtio-win-0.1.126.iso
Download latest spice tools from here: https://www.spice-space.org/download/binaries/spice-guest-tools/ and install it.
@kurtis318
kurtis318 / How_to_install_ffmpef_on_CentOS_7.txt
Created October 7, 2017 05:06
How to install ffmpef on CentOS 7
I needed to install ffmpeg on my CentOS 7 server. The following web site shows how to install the nux repo.
https://www.vultr.com/docs/how-to-install-ffmpeg-on-centos
Here are the commands:
sudo rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
sudo yum install http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
@kurtis318
kurtis318 / How_to_use_pv_command_with_progress_bar.txt
Created October 6, 2017 04:26
How to use pv command with progress bar
I found a nice package called pv that implements a command line progress bar to use in copying files and creating tar files.
Here is the URL I found that describes the pv command:
https://www.tecmint.com/monitor-copy-backup-tar-progress-in-linux-using-pv-command/
Here are some example useage of pv.
# pv opensuse.vdi > /tmp/opensuse.vdi
# pv /var/log/syslog | zip > syslog.zip
@kurtis318
kurtis318 / which_command_for_python.txt
Created September 26, 2017 14:30
which command for python
I have a need to verify a command exits before executing it (I know, why not just run it?). Anyway, here is sample code I found on stackoverflow. Somewhat old code but it has some python constructs I have not seen yet in my python education journey (nested defs, returning multiple values using 'and' keyword).
URL: https://stackoverflow.com/questions/377017/test-if-executable-exists-in-python
Code:
def which(program):
import os
def is_exe(fpath):
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
@kurtis318
kurtis318 / Fixing_LibreOffice_5.4_crashing_during_launch_on_F26.txt
Last active September 22, 2017 00:59
Fixing LibreOffice 5.4 crashing during launch on F26
The version of Libreoffice that is in the F26 base OS repository has been versions of 5.3. I like to run the latest so I download the latest version manually. About a month ago, I noticed none of the Libreoffice 5.4.x apps would lauch. Running the following command and doing a Google search found a Buggzilla:
/opt/libreoffice5.4/program/soffice --calc
sh: /usr/bin/clang++: No such file or directory
soffice.bin: /builddir/build/BUILD/pocl-0.14/lib/CL/devices/common.c:127: llvm_codegen: Assertion `error == 0' failed.
[kurtis@kwr541 program] $ sudo dnf install pocl pocl-devel
Found this Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1432468
Solution for me was to install pocl and pocl-devel
@kurtis318
kurtis318 / Installing_LetsEncrypt’s_free_SSL_and_auto-renewing.txta
Created September 16, 2017 03:21
Installing LetsEncrypt’s free SSL and auto-renewing
I have an OwnCloud server on the Internet. I needed a valid SSL certificate. I found a web site that told me how to register and install a free SSL certifiacate from LetsEncrypt. Today, I got an email saying my SSL certificate would expire in 9 days.
The following web site has instructions on how to do this for a Linux server on Amazon. It will also work for me based on the instructions.
https://nouveauframework.org/blog/installing-letsencrypts-free-ssl-amazon-linux/
Steps to renew are as follows:
sudo su
@kurtis318
kurtis318 / Fast_Startup_on_Windows_10_not_booting_old_Dell_desktop.txt
Created September 14, 2017 04:38
Fast Startup on Windows 10 not booting old Dell desktop
I have an old Dell 513 desktop with AMD Dual Core running Windows 10. I have not been able to boot on the first try. I had to hold the power button to reset the CPU and next boot worked fine. I do not know the cause, but a way to fix it is to DISABLE Fast Startup.
Fast Startup can be enabled/disabled from the following Control Panel setting:
Control Panel -> Power Options -> click on: "Chose what the power button does" (left column) --?
click on: "Change settings that are currently unavailable" (middle of page) --> Uncheck "Turn on fast startup" checkbox.
The next boot/reboot should now work the first time. Even from a cold start.
@kurtis318
kurtis318 / Unban_IP_in_Fail2Ban_tool.txt
Created September 13, 2017 00:36
Unban IP in Fail2Ban tool
I have a home server on the Internet. I thouhgt it was a good idea to run Fail2Ban. I have on occassion entered the wrong password
too many time (more than 3 maybe 5). I found this web site that had the command to UNBAN an IP. Seems to work now.
https://serverfault.com/questions/285256/how-to-unban-an-ip-properly-with-fail2ban
sudo fail2ban-client set sshd unbanip 63.227.195.102