Tech tips

Monday, December 15, 2014

Backup
first needed to backup my Linux Mint 14 files for a final time. Having hardware probs with my dedicated file server, so decided to create a new one as a VM on my ProxMox server I setup several months ago. It has 3Gig of Raid protected storage on high quality NAS/SAN drives, so it's perfect really and has been underutilized with VMs to serve Minecraft (mineOS), WinXP for running tax software, and a few other test OS's.

Setup FreeNAS server as ProxMox VM

gotchas: change Processor type from default to qemu64; add at least 4 Gig RAM (I flexible on demand up to 8 Gig); remember it needs at least 2 virtual drives, 1 for file system and another for storage

Restore Files
Return the files I know I want to my computer. I don't want to dump the complete home directory since desktop settings and many other files not needed reside there, so I'll restore in parts as shown below.

Not needed at this time - previously I had needed Oracle Java for ProxMox VM server functionality, however, at this point OpenJDK IcedTea 2.5.3 seems to be performing all the required ProxMox functions.

Saturday, March 2, 2013

To Linux Mint 14 Cinnamon x64
from Linux Mint 11 Gnome 64 bit. I had tried Linux Mint Debian XFCE, but decided I wanted the added ease of use, stability and packages afforded by Ubuntu base and did not need so much the bleeding edge afforded by Debian testing base. I then tried Linux Mint 13 XFCE x64, but after installing Mint 14 Cinnamon on my daughter's computer I was hooked!

Amazon Prime was working correctly in Firefox for a while, then in Dec 2012 suddenly quit working for some videos. After some search, I discovered the solution. The package 'hal' needed to be installed. Once installed from Software manager, Amazon prime movies began working again.

Java 7 from Oracle

ProxMox Server administration would not work properly under OpenJDK (unfortunately), so I needed to install Oracle Java 7. My instructions for doing so are here: http://techtips-tom.blogspot.com/2013/01/getting-java-working-in-linux-mint-14.html

sudo add-apt-repository ppa:webupd8team/java

sudo apt-get update

sudo apt-get install oracle-java7-installer

java -version

this verifies the oracle java 7 is installed (if not link to tutorial)

update-java-alternatives -l

this lists the installed alternatives - note the openjdk java listed

sudo update-java-alternatives -s [name of openjdk]

this switches back to primary java use of openjdk, but keeps links to Oracle Java 7 intact for functions not supported in openjdk

will show some errors because of the missing alternatives in openjdk

java -version

this should show the openjdk java

Create Menu Item or Launcher
At first I could not figure out how to Create a menu item or modify the menu, a bit tricky, though simple and logical...

simply right click the desired program in Menu and choose the desired location

Minecraft Launcher
The suggested sample launcher script given on Minecraft.net does not work. Following is what works for me:

command: java -jar /home/user/.minecraft/minecraft.jar

downloaded image file for menu icon and placed in .minecraft folder

Created menu item as described above with the command given here

Pithos - Pandora Music Player
This nifty program allows me to use Pandora service in a true aplication/program so my keyboard media buttons work. http://kevinmehall.net/p/pithos/

sudo add-apt-repository ppa:kevin-mehall/pithos-daily

sudo apt-get update

sudo apt-get install pithos

Rapid Photo Downloader - The best for getting images off your devices, renaming and ordering
To get the latest version, added the following ppa repository. Followed this help: http://damonlynch.net/rapid/ubuntu.html and performed the following in console.

sudo add-apt-repository ppa:dlynch3

sudo apt-get update

sudo apt-get install rapid-photo-downloader

Steam Games and Flash Player within steam
Installed Steam for buying and installing games. (I'm not much of a gamer, but want to support the the industry as they consider porting games for Linux.) One of the issues is that the flash player within steam does not work. Found this workaround: http://www.webupd8.org/2013/01/how-to-get-flash-player-to-work-with.html It entails doing the following:

Move the file .../install_flash_player_11_linux.i386/libflashplayer.so into the folder you made ~/.local/share/Steam/ubuntu12_32/plugins

you can now delete the downloaded and unzipped files

made sure the libxt6:i386 was installed on my computer: it was

sudo apt-get install libxt6:i386

GRIVE - Google Drive Configuration
Because Google does not have an official Google Drive client for Linux yet (to automatically sync Google drive to a spot on your local hard drive), can use an open source alternative. One is available via a WebUpd8 PPA. See this page for details: http://www.webupd8.org/2012/05/grive-open-source-google-drive-client.html Problems are that it is command line only, no auto sync, doesn't download google docs.

I'm skipping this setup for now... think I will wait for official client.

SpiderOak Backup
SpiderOak.com has a good online backup solution and has had a stable Linux client for much time. Allows you to share files with others, file encryption, etc. Download client install file from https://spideroak.com/opendownload/

Printer Configuration
Because gnome-control-center has a broken or useless link to printer setup options, I added a launcher to system-config-printer, which seems to be awol from the menu.

mySQL or MariaDB
I am looking at MariaDB as a replacement for mySQL. Seems like the way to go, but for now, going to install mySQL, then play with MariaDB on the side. I've been installing mySQL right on my desktop computer and running it in the background for my business accounting database back end without any issues. Following are the packages installed.

mysql-server

automysqlbackup - for automatic backups

libreoffice-mysql-connector - for moving data between mySQL database and spreadsheets

First go through the "New Server Instance" setup to connect to local SQL Server

Now I can "Manage Import/Export" to add in my SQL dump file from my old computer

Connecting to SQL database from LibreOffice Base

/Edit/Database/Properties

Database name = GVaccounts

Server = localhost

Port = 3306

User name = []

select password required

/Edit/Database/Connection Type

Database type = MySQL (Native)

SimpleScreenRecorder

This program is a good screen recording program which overcomes some of the problems of other options. Enter the following in a terminal. Thanks to Jim Lynch for the heads up.

sudo add-apt-repository ppa:maarten-baert/simplescreenrecorder

sudo apt-get update

sudo apt-get install simplescreenrecorder

Sony Music Player - flash player woes
I have 2 Sony mp3 players. Both stopped working in recent versions of Linux in terms of being able to transfer music files on or off the player. I had given up on this, deciding to not buy this brand again, and keeping my music stagnant on it, occasionally updating from someone else's computer.
WORK AROUND is now working again. Just installed jsymphonic from the software manager and now able to access these players again. jsymphonic - file manager for sony's mp3 players.

Add my Favorite Programs

Accessories

KeypassX - password vault

Lucky Backup - full featured front end for rsync

grsync - another rsync front end, connects to network drives

Guake - my favorite terminal app

Shutter - screen saver that lets you edit screen shots before saving them to custom location

SpiderOak Backup - computer back up service front end

optional:

ClamTK - antivirus front end

jSymphonic - allows access to Sony music players

f.lux - night time screen dimmer

USB Image writer (LM 17 has USB writer)

Administration

optional

APTonCE

GParted - disk format utility (LM 17 has USB formatter & Disks)

hardinfo - System Information - shows detailed info on hardwqare

ChromeApps - installs automatically with Chrome apps

Education

BibleTime - bible study program

Games

Steam - I am not a gamer, but I appreciate the Linux support of the Steam community (same reasoning for purchasing Humble Indy Bundles). I signed up and bought a couple titles... works great, even in Beta! http://store.steampowered.com/about/

Google Music Manager - allows me to upload titles to/from Google account (both for purchasing from Play and for downloading my other music onto my Android devices)

Pidgin - My favorite (for now) IM client

Transmission - simple, stable bitTorrent client

Optional

Chromium Browser

Google Earth

Skype

Office

ePDFviewer - worked to print a few PDF docs when the default viewer had misplaced numberical dataap

Optional

GNUCash - Personal finance

Gnumeric - light weight spreadsheet

KeepNote - simple note taking

PDF Shuffler - working with PDFs

Programming (optional)

Emma - SQL front end, simple

Meld

Sound & Video

Audio Tag Tool - fixing mp3 tags

Pithos - Pandora music player

K3B - awesome disk writer

Netflix desktop - from PPA, see above, but maybe obsolete soon!

Openshot video editor - video projects

VLC media player

Optional

simple screen Recorder

Sound Recorder

System

Lucky Backup - fav backup program

Guake - (my favorite quick command line access) via F12

VirtualBox Non-free

Optional

Unet Boot (LM 17 has USB writer)

Wine

Other packages to install:

ubuntu-restricted-extras This package allows playing of mp3s, etc. Perhaps unnecessary with Linux Mint. Actually, thsi uninstalled libavcodec53 and libavutil51 and replaced them with libavcodedc-extra-53 and libavutil-extra51. It also installed various other packages..

I had been using MineOS Crux, MineOS+, and MineOS at times before, but on reinstalling a server found the 64 bit versions buggy at best and not working at worst. Plus the install procedures were difficult.

On the VM architecture I had previously used Ubuntu based KVM, Oracle VirtualBox and VMWare Vsphere. This is my first OS install on ProxMox VM server, so thought I would take time and document both ProxMox utilization as well as my MineOS install and preferred settings.

Tuesday, January 8, 2013

Linux Mint 14 XFCE and Cinnamon
The following are the Steps which I took to install Oracle Java 7, which I needed for ProxMox functionality, then reverting back to openJDK so other apps I have (don't work on Oracle Java 7) still work.

This installed Java 7, but not all my java stuff works with Java 7 yet, so for now I switch back to the default Openjdk. This leaves the new functionality of java 7 needed for ProxMox intact, namely the embedded vncviewer functions. So after we are left with a mixed setup, but it works for now, and I can switch back and forth between java versions using the command given below.

switch back to the openjdk java

java -version

this verifies the oracle java 7 is installed (if not link to tutorial)

update-java-alternatives -l

this lists the installed alternatives

note the openjdk java listed

sudo update-java-alternatives -s [name of openjdk]

this switches back to primary java use of openjdk, but keeps links to Oracle Java 7 intact for functions not supported in openjdk

will show some errors because of the missing alternatives in openjdk

java -version

this should show the openjdk java

Various command options:

Check the java version installed

java -version

help on the update-java-alternatives

man update-java-alternatives

Remove the Oracle Java 7

sudo apt-get remove oracle-java7-installer

How this is setup on Linux Mint 14 XFCE and Cinnamon

update-java-alternatives: this is the program setup for

jinfo files: java info files are used to inform the update-java-alternatives program, which is the program that is used to change java alternatives

After burning the DVD, you can live boot another computer. The menu option for directly installing from disk was not working. Once the system is booted in live mode, you need to log off and log on as another user with admin privelages (auto boot set to boot into listo user with no privelages).

switch users to Maestra user

open home folder

double click on the Install shortcut

language and time zone choices are not important as the system installs the options in the remastered image instead of what is chosen here.

Reboot after installation, removing install disk when prompted

Log off and back on as Maestra (need privelaged user)

Install any updates

Remove the following broken programs

gltron

gplanarity

Add the following programs (last minute addition - games that work well on older computers)

slingshot

pyracerz (Py Racerz)

tomatoes (I have no tomatoes)

Copy Wikipedia image from other computer

I saved this on a particular computer in directory /home/username/share

Friday, June 29, 2012

Nino Mint Project Learn - Play - Do - Build - Grow

Linux for Install on Older Computers for Educational use in Central America and Carribian

(work in progress)
Based on the success of my last build (see this link) plus enhancements like locking down some settings (aka partial Kiosk mode) and including a reset script.

I decided for my current build to utilize Linux Mint Debian (LMDE) 32 bit with XFCE windows manager. This will hopefully allow me in months and years ahead to update the build without starting from scratch. XFCE will also allow some nice features like Kiosk Mode. I am planning to implement some of Kiosk mode features combined with a RESET script to restore desktop areas which I do not lock. Another idea is to setup a pre-configured server with PXE boot support and Clonezilla loaded with an original image, so they can completely reformat the computers when needed.

Without further ado, below are the steps I took to create a full featured, ready to use system for distribution on refurbished computers.

Programs InstalledThe easiest way to install these is in terminal using command "sudo apt-get install" followed by a list of the programs listed below separated by a space (first letter of program is not normally capitalized and capitalization matters).Accessories

Guake - nice f12 terminal application - I will use this if no one else (favorite)

Xournal - note taking program for mixing drawn and typed notes

Programs included with Linux Mint: (will hide or delete those in Red for listo user)

This list is too long to type here, so I will only include those we desire to hide or delete

Terminal de Root

Graphics

Darktable - professional quality photo program

Dia - Diagram editor

Inkscape - vector graphics program

ink-generator - to make pdfs and more

LibreCAD - CAD program

Picasa - Photo program

Pinta - simple, but flexible image editor

Gimp (Programa de maipulacion de imagenes de GNU)- powerfull and complicated image editor

gnome-system-tools (LM13 only was missing users and groups plus other apps)

Users and Groups

Setup the following users via system/users and groups/add user

maestra: Installed with this user, will be utilized by instructors

listo: User for general use by students

itadmin: Reserved for IT admins only

adelante: Rarely used by students or staff with laptops (change password for each separate machine)

Advanced User Settings

Under system/users and groups, then advanced settings/user privileges

All users should have all priveleges checked

EXCEPT listo user should NOT have "administer the system", "monitor system registries", or "configure printers" checked

Groups - Select Manage groups (from the users Settings app) and make the following changes

adm - select all users EXCEPT listo

admin - create and select select all users EXCEPT listo

sambashare - select all users EXCEPT listo

ssh - select itadmin only

staff - select maestra and itadmin only

sudo group - select all users EXCEPT listo

users group - select all users

vboxuser - select all users

must be done after installation of virtualbox

Directories for Shared Files

Make the following directories for shared file location

/share -- used to hold shared information via the following subdirectories

sudo mkdir /share

/share/basic

sudo mkdir /share/basic

/share/biblia

sudo mkdir /share/biblia

/share/foto

sudo mkdir /share/foto

/share/musica

sudo mkdir /share/musica

/share/wiki

sudo mkdir /share/wiki

/share/admin

sudo mkdir /share/admin

Now modify rights on these directories

/share rights - I want itadmin as owner with associated group as users (-R command makes it recursive to all subdirectories)

sudo chown -R itadmin.users /share

change rights so all users can read, write and execute files in these directories

sudo chmod -R a+rwx /share

Add sticky bit on these directories which disallows different users from renaming or deleting another users's files or directories. That way we can add content as itadmin or maestra that all users can access, but cannot delete or modify (e.g. bible and wiki files).

in web site click on Extensions sections, then type in Spanish and search

Download Spanish Dictionary from LibreOffice

Go back to Extension tool and add Dictionary from Descargas folder

Add the other Writer extensions in the same manner

Chromium preferences

select settings under the lined "customize and control" icon in upper right of browser app

Basics

Click on "Make Chromium My default browser"

Advanced settings

Passwords and forms

deselect "enable autofill"

deselect "offer to save passwords"

Privacy - Content settings

Cookies

select "keep local data only until I quit my browser"

Location

select "do not allow any site to track physical location"

Notifications

select "Do not allow any site to show desktop notifications"

Firefox preferences

Edit/Preferences/Privacy

Tracking

select "tell websites I do not want to be tracked"

History

Select "Use custom setting for History" then

deselect "remember search and form history"

Keep cookies until "I close Firefox"

select "clear history when Firefox closes"

Security

deselect "remember passwords for sites

System Tweaks (user specific)

Add "Places" to panel (start bar)

right click on bottom panel and open panel preferences

on items tab, click add a new item, then select "Places" and close

in item list move places up to right after first separator then close

Audio Controls - add those needed

click on speaker icon on lower right

Select audio card "Playback: internal audio.."

Click on "select controls" button and add master control

now un-mute audio... and can adjust level as needed

"share" directory Link

Open file manager and navigate to the root directory

drag the /share directory onto the bottom of the left side of the file manager to create a permanent link (could have used symlink, but this works well)

Application AutoStart - remove unwanted program auto starts

settings/session and startup/Application Autostart (each user except adelante - may be often used on laptops for college students)

deselect the following

Blueman Applet

Guake (keep on for ITadmin)

mintUPdate (keep on for ITadmin)

mintUPload

mintWelcome (keep on for ITadmin)

Number of desktops = 1 (multiple desktops is confusing to windows users, maybe this will change over time, but too often someone tells me; "all my stuff suddenly disappeared")

Settings/Workspaces

Set # down to 1 (2 for itadmin)

System Tweaks - Which only need to be done once

Auto log-in for principle user

system/login window/security

check "Enable automatic login"

select listo user

check "Enable Timed Login"

select listo user

select 15 second pause

No font changes for login window

system/login window/accessibility

deselect "allow users to change...."

Turn numbers lock on automatically (seems to be no way to select it in a menu, so install a little program to run at start) - only done once

in terminal

sudo apt-get install numlockx (or use software manager)

Remove Unnecessary Grub Boot Menu Options - after several kernel options propogate in the boot menu, it may get busy. The easiest way to clean this up is to remove the older, associated packages linux-header-[kernel version & architecture] and linux-image-[kernel version & arc.]. This removes the older kernels and grub, stops listing them as boot options.

open synaptic package manager

search for older linux-image and linux-header packages (3 for each kernel version)

mark for complete removal

Move or Hide Menu Items for Programs

Hide the following programs as shown below:

Hide these by copying the .desktop file into local directory, then changing this file so it doesn't show the program in the menu. This does not remove the program, just hides it. Alternately, the program can be disallowed.

Add Kiosk Mode and Reset Script Functionality
Add functionality so it is hard to modify desktop beyond point of usable... and ability to reset for listo user. Possibly make desktop reset automatic on start-up (would be very useful in classroom setting). Also hide some menu items for some users.

Regarding a startup script which would reset the panel and other desktop settings, there seem to be a couple good suggestions (see additional resources below). Namely Cron jobs and a special start-up script. Since Cron jobs are ubiquitous across just about all Linux distros, this seems like a good method. Also, one can create a script which can be potentially run at another time and from a directory that itadmin user has rights to making it easy for modifying or replacing the script or adding other maintenance scripts with different functionality.

Scripts desired

- desktopsave -- will be used to save desktop configuration for user listo

Will need to be run as itadmin user, otherwise will not be able to write to config backup directory

- desktopreset -- will be used to reset desktop configuration for user listo

Should be allowed to run as any user

Script Setup Steps

Create Directory (from terminal as itadmin user)

sudo mkdir /share/admin

cd /share

ls -l (to see what it looks like)

sudo chown itadmin:itadmin /share/admin

ls -l (gives output like this which is good)

drwxr-xr-x 2 itadmin itadmin 4096 date time admin

Create save to directory (as itadmin user)

cd /share/admin

mkdir homesave

Create desktopsave script file

cd /share/admin

touch desktopsave

ls -l

chmod u+x desktopsave

ls -l

this gives... -rwxr--r-- l itadmin itadmin date time desktopsave

file is writable and executable by itadmin user only but readable by all. This way other users cannot execute this program and save a bad configuration.

desktopsave script... edit in your favorite browser and add the following lines

#!/bin/bash

# desktop save script, used to save listo user configuration

this first line is standard for scritps, second line is a comment

cd /share/admin/homesave

# delete the previous backup

rm -r /share/admin/homesave/listobak

# make a copy of the current backup

cp -r /share/admin/homesave/listo /share/admin/homesave/listobak

# delete the current backup

rm -r /share/admin/homesave/listo

# copy listo home directory (.config and .local only for now)

mkdir /share/admin/homesave/listo

cp -r /home/listo/.config /share/admin/homesave/

cp -r /home/listo/.local /share/admin/homesave/

# make readable to all users

chmod -R a+r /share/admin/homesave/listo

this is not really necessary based on permissions on the homesave directory, but I include it in case these permissions get changed

Create desktopfix script file

cd /share/admin

touch desktopfix

chmod a+x desktopfix

ls -l

this shows file is readable and executable by anyone, but only itadmin can write to it, so any user has the rights to run this script to reset the listo user desktop

desktopfix script... edit in your favorite browser and add the following lines

#! /bin/bash

# desktop reset script

# just copy configuration and local directories (for now) other files can be manually copied if needed

rsync -r --delete /share/admin/homesave/listo/.config /home/listo/

rsync -r --delete /share/admin/homesave/listo/.local /home/listo/

# the following restarts the bottom panel if it was closed

#xfce4-panel commented out - doesn't work well in script

# the following only applies to older xfce 4.2, starts taskbar if stoppped

#xftaskbar4 commented out - for older xfce

# the following only for xfce 4.4 lus, reloads windows manager (if borders missing on programs)

xfdesktop

desktopfixlistomenu script... edit in your favorite browser and add the following lines

similar to the above script, except rsync lines are commented out and the xfce4-panel is not

Create Menu items for desktopfix and desktopsave scripts
The following menu items are desired:
For listo user - REPARAR DESKTOP

For itadmin user - REPARAR DESKTOP
- GUARDAR DESKTOP

Copy .desktop programs to appropriate users to use as templates and change ownership of files

Disappearing [start] panel, desktop or windows bordersBecause Xfce is modular, each of these can be inadvertently stopped, removed or crashed. Type the following command into terminal (Alt-F2), depending on the missing item. You may need to choose "Save session for furue logins when shutting down to make changes permanent.

Local update repository... for updating all computer without using Internet bandwidth. Probably should be added to the Zentyal server, maybe using virtual server

found this tip: install apt-proxy or approx on a server... maybe directly on Zentyal server, then can either configure each computer to point to Zentyal or maybe even configure the Zentyal server to send all update requests to it!

This caches all updates on the apt-proxy or approx server and keeps individual computers from downloading updates from the Internet.

Deployment/reinstall system

Clonezilla server.. side by side with Zentyal or as a VM under Zentyal (most secure)?

Clonezilla on DVD or USB boot?

remastersys? limited to 4GB, I believe

Configuration management program on server options include:

Puppet - or another auto configuration management program. Need to research and test first