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.

Thursday, May 19, 2016

Page-Specific Gadget Content

This is a feature idea for Google Blogger.

This feature would allow bloggers to display soft classes of information to blog readers on a per-page basis, via sidebar Gadgets like the "Text" and "Links" Gadgets. This would allow Blogger blogs to have a more dynamic feeling with minimal extra data and feature disruption.

The user would primarily interact with this feature while editing a Page.

When a user is editing a Page, there would be a heading called "Page-Specific Content" under "Page Settings".

When the heading is clicked, a list of Gadgets appears. These would be Gadgets that the user already chose in Layout mode. These would also be Gadgets altered to allow for page-specific content. (This would most notably be the "Text" and "Links" Gadgets.)

Default Gadget content is still defined from Layout mode (as it is presently.)