How To Do IRC Idling Properly

Requirements

  1. An Internet connected server.
    • This can be a VPS or a on-prem. server you control that’s accessable from the Internet. You could do something on your LAN as well, but that’s up to you.
  2. Knowledge of IRC.
  3. Knowledge of tmux session attaching/detaching. You can read my quick article about it here: Persistent SSH Sessions Using tmux.

Steps

  1. Open or attach to a tmux session.
  2. Install weechat or irssi (recommended), depending on your preference.
  3. Open irssi.
  4. Connect to the server you want to join. Example: /connect irc.libera.chat.
  5. Join the channel. Example: /join #blastwave.
  6. Detach from the tmux session and go about your day. Then, come back whenever and reattach.

Bonus article

  1. https://zenhack.net/2017/01/08/public-service-announcement-irc-is-not-a-syncronous-medium.html

Accessing QEMU/KVM From An Android Device Over SSH/SPICE Server

Assuming you have QEMU/KVM setup, you can access your VMs from your Android phone. This is thanks to the SPICE protocol already being enabled by default in (virt-manager created) VMs. It’s pretty simple if you already have your virt-manager + QEMU/KVM environment setup.

  1. Install the aSPICE Free app from the Google Play Store
  2. Open the aSPICE Free app
  3. Create a new connection by pressing the icon next to the Search Connections search bar. It’s a computer monitor with a plus symbol. It looks like this: [+].
  4. Input your server credentials, and be sure to switch the Connection Type from SPICE to SPICE over SSH.
    • Each individual connection shortcut you save is an individual VM. The way SPICE works is by hosting a VM video stream on an iterating port. Usually they start on 5900, then go 5901, and so on for every new VM started. These numbers are freed up and moved around when VMs are turned off, so be aware of changing connection details depending on if your VM was restarted or not.

Watching RTMP Streams In VLC Media Player

“Real-Time Messaging Protocol (RTMP) is a communication protocol for streaming audio, video, and data over the Internet. Originally developed as a proprietary protocol by Macromedia for streaming between Flash Player and the Flash Communication Server, Adobe (which acquired Macromedia) has released an incomplete version of the specification of the protocol for public use.” – Taken from Wikipedia

  1. Install VLC Media Player
  2. Open VLC Media Player
  3. In the top left menu bar under the Media tab, click Open Network Stream…
  4. Paste or type your link in the Please enter a network URL: field
  5. Click Play

nofail SSH Mounting in fstab

The following /etc/fstab entry is placed on your client machine, connecting you to your remote machine using SSH keys:

Note that sshfs will have to be installed on your client in order for this to work. This can be done through your distro’s package manager.

sshfs#{REMOTE}@{IP_ADDRESS}:/mnt/{REMOTE_DIR} /mnt/{CLIENT_DIR} fuse ServerAliveInterval=1,reconnect,port={PORT},defaults,_netdev,IdentityFile=/home/{CLIENT}/.ssh/id_rsa,allow_other,nofail 0 0

The port option can be ommited if the default SSH port is used.

The nofail option is important. If you client can’t connect for whatever reason, your entire system won’t halt due to a boot failure.

reconnect and ServerAliveInterval=1 are also important. These are used to ensure your machine doesn’t halt in case the server/remote disconnects while the connection is in use.

Mounting libvirtd Over SSH

I recently took part in a QEMU/KVM installation. I tried adding the connections from my client machine to the internet connected server. This server runs the ssh daemon on a port other than 22. For some reason, there’s no way to do this in the virt-manager GUI. Thankfully, you can do it via the command line by running the following:

virt-manager -c ‘qemu+ssh://${USERNAME}@${IP_ADDRESS}:${PORT}/system?keyfile=${PRIVATE_KEY_PATH}’

SAP PO Release Checklist

Legend

Sender and receiver adapters of certain types use the following colors:

  • SFTP
  • REST

Scenarios

Sender -> Receiver(SFTP -> SFTP)

Sender ->

Source tab
SFTP Server section
  1. Verify Server.
  2. Verify Server fingerprint.
    • This should either be set, or bypassed using a * (wildcard) if I don’t have it.
Authentication section
  1. Verify that valid Usernames and Passwords are used, and meet the length of the one provided.
    • This should be checked multiple times.
File section
  1. File name should look like the following: ZFILENAME_TEST_*.*
    • Note: *.* is important here if using ASMA filename in receiver.
  2. Verify that a proper Directory is used.
    • Check that the directory used exists on the server as well. This should be done from the PO OS level using the sftp command.
Processing tab
Processing Parameters section
  1. Verify that Delete file is either checked or unchecked.
  2. Verify that Archive faulty files is either checked or unchecked. Ensure that the value it holds is correct.
Advanced tab
Adapter specific message attributes section
  1. To use the Sender filename in the Receiver channel, ensure Set adapter specific message attributes (ASMA) is checked, and File name is checked. All other check boxes in the adapter specific message attributes section should be unchecked.

-> Receiver

Source tab
SFTP Server section
  1. Verify Server.
  2. Verify Server fingerprint.
    • This should either be set, or bypassed using a * (wildcard) if I don’t have it.
Authentication section
  1. Verify that valid Usernames and Passwords are used, and meet the length of the one provided.
    • This should be checked multiple times.
File parameter section
  1. Filename should look like the following: .*
    • Note: *.* is important here if using ASMA filename in receiver.
  2. Verify that a proper Filepath is used.
    • Check that the Filepath used exists on the server as well. This should be done from the PO OS level using the sftp command.
  3. Verify that Create Directory is either checked or unchecked. Typically, this should be checked.
  4. Verify that Overwrite is either checked or unchecked. Typically, this should be checked.
Processing tab
Processing parameter section
  1. Verify that Add Timestamp to filename is unchecked. This is required for ASMA.
Advanced tab
Adapter specific Message-Attributes section
  1. Verify that Use Adapter specific Message-Attributes is checked.
  2. Verify that Filename is checked.

Autostart VMWare Workstation Pro VMs on Windows

Create a .bat file with the following file content. Make sure you point to the .vmx file of your VM.

“C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe” -T ws start “Z:\virtual_machine\virtual_machine.vmx” nogui

Move this .bat file to your startup folder at the following location: C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup.

WSL 2 Setup

WSL 1 is fantastic, but lacks some of the features (namely fstab mounting) that WSL 2 brings to the table. WSL and WSL 2 are a bit confusing to set up because of the lack of centralization; “Go to the Windows Features panel, then download this random EXE from a browser…”.

There are multiple ways to go about conducting this, but here’s the simplest way to set up both versions.

Install WSL 1

Open PowerShell as administrator (Shortcut: Windows + x, then hit a, then Alt + y).

Put these two commands into the PowerShell window:

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Hit enter a few times.

Once the commands are done running, restart your computer. Yes, you’re still forced to restart Windows in 2022 for feature additions.

Now, you must choose a distro. I prefer Debian. The other installations are the same process, so choose whatever. You have two options depending on your Windows 10 version:

  • Windows Store download (the easiest)
  • Internet download -> Add-AppxPackage import (for Windows 10 LTSC users)

Windows Store Method

Just type the distro you want into the search bar – like Ubuntu – and hit the installation button. When that’s done, open the distro EXE you downloaded from the MS store and go through the installation process. You can find it by hitting the Start button and typing the distro name.

Internet Download

Skip this step if you’ve already done the Windows Store Method.

Click one of these distro links:

That should be all of the officially supported ones hosted by Microsoft.

After the download, open a PowerShell window as administrator once again. Then, navigate to the directory you downloaded the appx file at (probably your downloads directory), then run the following command (note: the file name will be different depending on your distro):

Add-AppxPackage Debian.appx

Then, run the newly installed EXE on your system. If you installed Debian, run the Debian program, if you installed Ubuntu, run the Ubuntu program, and so on. Go through the setup process until your new user is created.

That’s WSL 1 + distro installation complete. Now we can convert this WSL 1 distro to WSL 2 to get those oh-so-fantastic features.

WSL 2 Installation

Open a PowerShell window as administrator once again. Run the following command (note: the file name will be different depending on your distro):

wsl --set-version Debian 2

This will take a minute, but once it’s done, you’ll have WSL 2. Easy as that.