Wednesday, June 13, 2018

Fedora Media Codecs

(Not all of these methods may be required together.)
  • Install the rpmfusion repository:
    • sudo dnf install x264 . . . 
  • Install gstreamer packages
    • sudo dnf install gstreamer1-plugin-openh264
    • sudo dnf install mozilla-openh264
  • Install repository
    • (It might not be necessary to install rpmfusion repo if the flathub gnome extension works. )
    • Install ffmpeg gnome extension and/or packages
  • Install flashplayer (see here)
    • sudo dnf install flash-plugin
  • Install VLC
  • Enable plugins in Firefox Addons section
  • Set individual site prefs
  • Other possibilities:
    • sudo dnf config-manager --set-enabled fedora-cisco-openh264
    • sudo dnf groupupdate multimedia

Saturday, May 19, 2018

Ubuntu Setup Modding Minecraft

  1. Install Eclipse (from the Gnome Software application.)
    • You do not need to install Minecraft, because you will be running a modded instance of the game, built around the mdk.
  2. Create a directory for a mod. ie: ~/minemods/mod_01
  3. Install the Minecraft Forge mdk
    • extract the contents into your mod directory
  4. in a terminal: navigate to the mod directory and list the files
    •  cd ~/minemods/mod_01 && ls
    • note: the 'gradlew' file is a linux executable
  5. run: './gradlew setupDecompWorkspace eclipse --refresh-dependencies'
    • attend the installation to ensure the build was successful
  6. start Eclipse, selecting the workspace directory in the 'eclipse' directory (in the mod directory you just created)

See here for further instruction:

Sunday, April 2, 2017

Arch Linux Cheat Sheet

This walkthrough is largely based on this video walkthrough.

I. Download and Run Arch Linux iso

  2. burn to 
    • disk: Use normal utility (In Windows, right-click .iso file to burn to disk)
    • usb: Use unetbootin
  3. Insert disk or usb and restart computer to boot into Arch Linux
    • An Arch Linux graphic and an options menu should appear
  4. Select option     Boot Arch Linux (x86_64)                       
  5. You should go through a text boot process and then eventually see a command prompt.

II. Partition, Format, Mount

A. Create Disk Partitions with fdisk

  1. type: fdisk -l and note the location of the disk (/dev/sda here)
  2. type: fdisk <disk location>
  3. enter: o to reset the drive
  4. create new partitions
    1. enter: n to create a new partition
    2. enter p or l for primary or logical
    3. enter start point (usually stick with default by pressing enter)
    4. enter end point (enter as +30G for a 30 gigabyte partition)
  5. enter partition types
    1. enter 'type'
    2. select partition number to alter 
    3. select type number
      • (83 for Linux partitions)
      • (82 for swap partitions)
      • (this is not formatting. formatting will be done next)
  6. Finally enter w to save partitions and exit fdisk

B. Format ext4 Partitions with mkfs

  •  example
    • mkfs.ext4 /dev/sda1
  • example
    • mkfs.ext4 /dev/sda3 

C. Mount Filesystem to Partitions for Installation

  1. mount the root partition to /mnt
    • example: mount /dev/sda3 /mnt
  2. make directories (such as /boot and /home) in the /mnt directory
    • example: mkdir /mnt/boot
    • example: mkdir /mnt/home
  3. mount those directories to their respective partitions
    • example: mount /dev/sda1 /mnt/boot
    • example: mount /dev/sda4 /mnt/home

III. Set Up WPA Wireless Networking

  1. Find your computer's interface names by entering: 'ip link' or 'ip a'
    • a wireless interface will start with 'w' if it starts with 'e' (or 'enp'), then it is most definitely not a wireless interface.)
  2. Make sure you know your wireless SSID and passcode from your home router
  3. Copy a wpa wireless config template: cp /etc/netctl/exmaples/wireless-wpa /etc/netctl/<name>
    • name the file whatever you want to.
    • keep the filename simple and memorable
  4. Edit the wpa config template: vim /etc/netctl/<name>
    • edit Interface= to be the name of the wireless interface from the 'ip link' command
    • edit ESSID='<router>' to be the SSID of your wireless router you'd normally see
    • edit Key='<key>' to be whatever your router's passkey is
  5. Start the wireless interface with: netctl start <name>

IV. Install and Configure the System

A. Install the system

  1. pacstrap -i /mnt base 
  2. genfstab -U /mnt >> /mnt/etc/fstab 
  3. arch-chroot /mnt
  4. pacman -S vim openssh grub-bios linux-headers linux-lts linux-lts-headers wpa_supplicant wireless_tools

B. Configure language

  1. vim /etc/locale.gen
    1. un-comment your language (en_US.UTF-8 UTF-8)
    2. save file
  2. enter: locale-gen

 C. Configure time

  1.  ln -sf /usr/share/zoneinfo/<Region>/<City> /etc/localtime
    • example: ln -sf /usr/share/zoneinfo/American/New_York /etc/localtime
  2. hwclock --systohc --utc
    • Runs hwclock(8) to generate /etc/adjtime:

D. Enable SSH at startup

  • systemctl enable sshd.service

E. Set Password

  • passwd

F. Install Grub bootloader

  1. grub-install --target=i386-pc --recheck /dev/sda
  2. cp /usr/share/locale/en\@quot/LC_MESSAGES/ /boot/grub/locale/
  3. grub-mkconfig -o /boot/grub/grub.cfg

Thursday, February 2, 2017

Rust Programming Language

Rust is a Well Planned Modern Language Comparable to C++ Developed Largely by Mozilla

System Update

To make sure that all of Rust's dependencies are up-to-date, run the following commands.
apt-get update
apt-get dist-upgrade -y
apt-get install curl

Install Rust

Installing Rust is a simple process. Run the following command to launch their installation script.
curl -sSf | sh
When the script finishes, Rust will be installed.

Verifying Rust

To verify that Rust was successfully installed, run rustc -V. You will see output similar to:
rustc 1.0.0 (a59de37e9 2015-05-13) (built 2015-05-14)

Using Rust

To use Rust, create a file called and populate it with the following lines of code:
fn main() {
    println!("You have successfully installed rust!");
Now run rustc You will see an executable file called main in the same directory. Execute it by running ./main. The text "You have successfully installed Rust!" will appear on your screen

[The above installation instructions were taken from here.]

Create a New Project with Cargo

cargo new <project name>

There should be a new project folder with an src folder in it
Create a file in the src folder
Write code in the file
To run the project, navigate to the project folder (not inside the src folder)

cargo run

  Compile and Build Executable


Friday, September 23, 2016

Install pygame for Python 3 on Ubuntu

  1. sudo apt-get install python3-pip
  2. sudo pip3 install --upgrade pip
  3. sudo pip3 install pygame

Wednesday, August 24, 2016

Run a Personal MediaWiki

This guide is about quickly running an offline Mediawiki in a virtual machine.

It can also serve as a first-time primer for using and communicating with a Linux server.

However, this guide is NOT an example of effective server management.

MediaWiki is a chore to set up and use, but I love its versatility too much to not have one for my own.

Install VirtualBox

sudo apt-get install virtualbox

Download TurnKey MediaWiki

Set Up Your Virtual Server

Open the downloaded file with Virtualbox.

Follow guided steps to create usernames and passwords.

Start and Stop VM from a Script or Launcher Icon

Your VM's name is in VirtualBox. Open VirtualBox, and select the VM. It appears on the right next to "Name:"

VBoxManage startvm "vm name" --type headless

VBoxManage controlvm "TURNKEY MEDIAWIKI" acpipowerbutton

See Your Wiki From Your Browser

Type your the VM IP address into the browser.

Interact with wiki by creating a user and a new page.

Interact With Virtual Server Remotely

Move a new logo to your server via scp.

Log in to edit LocalSettings.php via ssh.

Friday, August 19, 2016

Walkthrough for Lubuntu with i3 Tiling

At the time of this writing, Lubuntu is getting the LXQt treatment either for version 16.10 or 17.04.

See the Xubuntu version of this here.

One key difference in Xubuntu is its "Whisker Menu", which acts in place of dmenu. Lubuntu and LXQt do not seem to have a keystroke-activated applications menu. (like every other OS)

The idea of this setup is to achieve the best of both worlds from convenient desktop features and essential i3 features. This walkthrough assumes that you are already familiar with using i3, but you do not have to be in order to complete it. An altered default i3 config file is part of the walkthrough, which adapts default i3 keystrokes to LXQt components. (New and replaced sections of the config file are designated in the file.)

  • Use the familiar i3 keystrokes and config file for window tiling.
  • Access normal application menus. (dmenu still available)
  • Desktop notifications/indicators (not typically easy to find for i3)
  • Fixes the administrator authentication problem when using i3 in Ubuntu.
    • Software Center
    • Updater
    • Users and Groups
  • Elegant color scheme and icons

For this guide, you will need to enter terminal commands, but you should not expect to remember them. Conversely, you will always want to understand the i3 config file. The last step will be to create a link to the i3 configuration file on you XFCE panel - to provide a visual reminder that it is central to your user experience, and conveniently available to open and edit.

The i3 site provides the best source about editing the configuration file.

I. Preliminaries

  • You should have LXQt on Lubuntu. This is releasing officially in October 2016, but can be rigged before then.
  • You might want to create a spare user for this, but the settings are not as difficult to reverse as, say, with the walkthrough with Xubuntu.

You should have an LXQt Panel desktop that looks a lot like this:


II. Install i3 and Background Image Manager

i3 is of course the tiling window manager.
Nitrogen is the replacement wallpaper image manager.
  1. Open a terminal
  2. Enter the following:

III. Configure the background image manager: Nitrogen

  1. Open Nitrogen: Accessories >> Nitrogen
  2. Click the button: "Preferences"
  3. Add any folders that you include your wallpaper images: 
  4. Click button: "OK"
  5. Click the dropdown menu on bottom left and select: "Zoomed Fill"
  6. Click the button: "Apply" and exit Nitrogen.

IV. Paste the i3 config file

Let's get down to brass tacks and just do this thing.
  1. In Lubuntu, there should be a directory in your user's home directory named '.config/i3'
    • The file path will be like: /home/<yourusername>/config/i3/
    • If the i3 directory is not there, then take the liberty of creating it: "i3"
  2. Create a new file in the i3 directory named "config"
    • the file path will be like: /home/<yourusername>/.config/i3/config
  3. Open the config file in a text editor and save the following in the file:

The i3 site provides the best source for editing the configuration file.

IV. Set i3 as the Session Window Manager

  1. Open LXQt Session Settings: Preferences >> LXQT Settings >> Session Settings
  2. Click on the Window Manager dropdown box that reads: "openbox" 
  3.  Scroll down the long menu of options until you reach i3, and select i3:  
  4. For "LXQt Modules", uncheck "Desktop" and "Global Keyboard Shortcuts"    
  5. Click the button: "Close" and "OK" on the notification of changes:                               

Here is the magic moment when you can restart your computer and log in with i3 as your window manager.


i3 cheat sheet

The mod key is the 'super key', also called the 'windows key' (left of the space-bar.)

mod+Enter opens a terminal

mod+d opens the dmenu
mod+Shift+q closes the current window tile
mod+r initiates resize-tile mode
mod+1, mod+2, etc. (1-0) switches to a different workspace
mod+Shift+1, mod+Shift+2, etc. (1-0) moves the current window tile to a different workspace
mod+Shift+e initiates Lubuntu's session logout dialogue

V. Configure the LXQt Panel

  • Configure the "Desktop Switcher"
    1. Right-click the desktop switcher
    2. Select the option: "Configure "Desktop Switcher""
    3. Change the dropdown: "Desktop labels" to be: "Names"

VI. Configuring Theme and Icons

As of the creation of this walkthrough, I still found it useful to configure the appearance using the old LXDE method and the new LXQt method:
  • Preferences >> Customize Look and Feel
  • Preferences >> LXQt Settings >> Appearance
    • Dark icons and dark panel look better in my opinion

VII. Try Everything on For Size

If the i3 config file is set up correctly, then all the standard keystrokes should work.