Skip to content

Instantly share code, notes, and snippets.

@kurtis318
kurtis318 / Running_PulseAudio_on_headless_server.txt
Created August 9, 2018 19:42
Running PulseAudio on headless server
REF: https://askubuntu.com/questions/939144/playing-audio-stops-in-unity-when-i-switch-user/939338#939338
I have a server that is not running a desktop or window manager at startup. I do have a VNC session started automatically at boot but when I launch VLC and try to play a streaming station, I do not get any output to my stero system I have connected to the output of my server. When I look at the PulseAudio Value Control app, I see a dummy device where the output is going out to. If I start XFCE on the server console by hand, PulseAudio server is running and I can go to the VNC session and audio gets routed to my stero.
I do not want to have to manually start XFCE on my console because I update and reboot it often and I am also lazy. The solution is to get PulseAudio server to run without needing to start XFCE desktop at the system console.
The above referenced web site gate me the solution. I can open a terminal in my VNC session and run the following command and when I launch VLC in the VNC sessio
@kurtis318
kurtis318 / Running_AnyDesk_on_Fedora 28.txt
Created July 18, 2018 17:04
Running AnyDesk on Fedora 28
I came across AnyDesk when I was at work one day. I was having trouble getting it to run on my Fedora 28 laptop. I ended up installing it in a Windows 10 KVM and it worked great there.
Here is how I finally got it working.
1. Download Linux tar file from here: https://anydesk.com/remote-desktop
2. Untar the file into the downloaded directory.
3. Install gtkglext-libs.i686 and mesa-dri-drivers.i686 which are 32 bit versions of the 64 bit versions that are already installed (AnyDesk is 32 bit).
sudo dnf -y install gtkglext-libs.i686 mesa-dri-drivers.i686
4. Switch to the untarred directory /home/kurtis/bin/anydesk-2.9.7
5. Run the anydesk biary: ./anydesk
@kurtis318
kurtis318 / dnf_history_list_example.txt
Last active August 22, 2018 20:10
dnf history list example
[kurtis@kwr50p anydesk-2.9.7] $ sudo dnf history list
Contacting OpenClient Router for restricted repository information
Added restricted repo: RHEL-7-x86_64-crashplan
Added restricted repo: Fedora-28-x86_64-Licensed
ID | Command line | Date and time | Action(s) | Altered
-------------------------------------------------------------------------------
115 | install mesa-dri-drivers | 2018-07-18 11:49 | Install | 5
114 | install python2-vlc.noar | 2018-07-18 10:21 | Install | 2
113 | -y update | 2018-07-18 07:45 | E, I, U | 59 EE
@kurtis318
kurtis318 / Installing_and_configuring_NFS_server.txt
Last active July 15, 2018 03:55
Installing and configuring NFS server
Install the following packages:
sudo dnf -y install nfs-utils
sudo mount -o auto,nofail,noatime,nolock,intr,tcp,actimeo=1800,rsize=32768,wsize=32768 192.168.0.210:/home/kurtis /home/kurtis/mnt/jakester.kurtis
REF: https://www.alihassanlive.com/e2k3/2018/2/25/rpc-port-mapper-failure-unable-to-receive-errno-113-no-route-to-host
Run the following commands on the server as root user:
firewall-cmd --permanent --add-service=mountd
@kurtis318
kurtis318 / Windows_10_How-to_unpin_folder_Start_Menu.txt
Created July 9, 2018 05:29
Windows 10 How-to unpin folder in Start Menu
I have a Dell XPS 13 with Windows 10 Home installed. I noticed one day that I had two icons that I could not remove by right button clicking on the icon, and selecting "Unpin from Start" menu item. There was not menu item listed just the "resize" menu item.
After lots of Googleing I accidently stumbled onto the solution. I had read about removing "folders" in the start menu but I did not believe that is what I had. It turns out, that was exactly what I had. The two icons that I could not unpin from the start menu were actually folders.
I clicked on one of the icons and the icon disappeared and low and behold, there was what looked like a collection of icons. In my case, each "folder" had only one icon. Right button clicking on the single icon in the folder produced a menu with "Unpin from start" item. Once the icon in the folder was unpinned, the folder icon also disappeared fixing the issue I was Googling without any luck.
@kurtis318
kurtis318 / remove_known_hosts_on_chromebook.txt
Created July 5, 2018 22:05
Remove .ssh/known_hosts file on chromebook
I have a chromebook and use the secure shell to log into remote servers.
I had to re-install a server because the Fedora server upgrade from version 27 to 28 and for some reason all my passwords got messed up.
This meant that the server has a new ssh key and when I try to access it from the secure shell app on my chromebook, I get and error about the server key not matching.
The solution is:
1. Keep the secure shell screen open to the error message.
2. Right button click on the title bar of the secure shell window.
3. Press Control-LeftShift-J to open a new console.
4. Be sure the console is at the "top" session.
@kurtis318
kurtis318 / rh_centos_php5_to_php7.txt
Created May 27, 2018 00:17
Upgrade RH/CentOS from PHP 5 to PHP 7.
REF: https://doc.owncloud.org/server/10.0/admin_manual/upgrading/upgrade_php.html
yum install rh-php70 rh-php70-php rh-php70-php-gd rh-php70-php-mbstring rh-php70-php-mysqlnd rh-php70-php-intl rh-php70-php-ldap
cp /opt/rh/rh-php70/enable /etc/profile.d/rh-php70.sh
source /opt/rh/rh-php70/enable
mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php56.off
mv /etc/httpd/conf.modules.d/10-php.conf /etc/httpd/conf.modules.d/10-php56.off
@kurtis318
kurtis318 / python_how-tos-and_more.txt
Last active May 25, 2018 14:06
Python How-To's and more
This is a collection of Python How-To's and more.
#-------------------------------------------------------------------------------
Read a file into a variable:
REF: https://stackoverflow.com/questions/3277503/in-python-how-do-i-read-a-file-line-by-line-into-a-list
with open('/your/path/file') as f:
my_lines = f.readlines()
@kurtis318
kurtis318 / Cleanup_old_kernels_on_Debian_Ubuntu.txt
Last active November 26, 2018 15:56
Cleanup old kernels on Debian and/or Ubuntu
I watched one of my virtual machines perfor an apt-get dist-upgrade and I noticed abot 10 kernels being built.
This took a quite a while to complete. Here is the solution I found that I don't want to forget.
REF: https://www.tecmint.com/remove-old-kernel-in-debian-and-ubuntu/
Show kernels installed:
dpkg -l | grep linux-image | awk '{print$2}'
@kurtis318
kurtis318 / Fix_for_tiny_GDM_login_screen_with_hdpi_monitor.txt
Created May 17, 2018 03:43
Fix for tiny GDM login screen with hdpi monitor
Upgraded my XPS 15 from F27 to F28. The new GDM signon screen was very tiny. If I logged out, the login screen would be normal size.
Here is the solution I found from my friend Google.
REF: https://askubuntu.com/questions/906797/scaling-gnome-login-screen-on-hidpi-display
Make a backup of this xml file:
sudo cp /usr/share/glib-2.0/schemas/org.gnome.desktop.interface.gschema.xml /usr/share/glib-2.0/schemas/org.gnome.desktop.interface.gschema.xml.bak0