Infrastructure Handbook

Troubleshooting

Olivier Saugeon


Table of Contents

1. Hardware
Apple Hardware
Condor Phone
Unlocking the device
Installing recovery using fastboot
Installing CyanogenMod from recovery
2. Software
Debian Tools
Dpkg
Pbuilder
Wodim
Ubuntu
Android Tools
GooglePlayDownloader
CyanogenMod
Gnome Settings
Multisystems
OCS Inventory / FusionInventory
Synergy
PortableApps.com
Java
OpenJDK availability in Debian and Ubuntu
Eclipse
Eclipse Mylyn
Eclipse CDT
Docbook Tools
Unicode
Adobe Source Pro Fonts
Glyphicons
SVG image integration
TTF in SVG in Docbook font integration
XML Resume integration
Xsltproc
Publican
Javascript
Bootstrap
jQuery

Chapter 1. Hardware

Apple Hardware

iBook G4 12" Wifi card

The driver for the Wifi card can be installed with the Debian firmware-b43-installer package.

Emulate Right mouse button

Example 1.1.  /etc/default/mouseemu

#Left Apple Key (LEFTMETA) + click
RIGHT_CLICK="-right 125 272"
			

Keyboard 3rd Level Selector

In order to enable the AltGr equivalent on an Apple keyboard, you need to modify the Keyboard Preferences: SystemPreferencesKeyboard

In the Keyboard Preferences dialog, you choose the "Windows key" as third-level chooser for the keyboard layouts that are concerned: Keyboard PreferencesLayoutsOptions...Third-level chooser = Any Windows key

Then the Apple Command key behaves like an Alt Gr key

Condor Phone

Motorola Moto E

Important

The following tips have been used on an XT1022 (dual SIM) model.

Developer options

Enable Developer options screen: SettingsAbout phone and tap 7 times Build number .

USB Debugging

Enable USB Debugging on the device: SettingsDeveloper optionsUSB Debugging

Fastboot mode

Power off, then press Power & Volume Down simultaneously. On the next screen use Volume Down to scroll and Volume Up to select.

ClockworkMod Recovery

Use Volume Up and Volume Down to scroll and Power to select.

Unlocking the device

Note

Unlocking the bootloader on a Motorola device will automatically wipe all device data.

  1. Make sure your computer has working fastboot and adb .

  2. Enable USB debugging on the device.

  3. Reboot the device into fastboot mode.

  4. Connect the device to the computer through USB.

  5. Once the device is in fastboot mode, verify your PC sees the device by typing (as root) fastboot devices

  6. From the same terminal, type the following command to obtain your bootloader unlock code: fastboot oem get_unlock_data

    					[...]
    					(bootloader)
    					XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    					(bootloader)
    					XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    					(bootloader)
    					XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    					(bootloader)
    					XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    					(bootloader)
    					XXXXXXX
    					OKAY [ 0.254s]
    					finished. total time: 0.254s
    				
  7. Visit the Unlocking the Bootloader website and follow the instructions there to obtain your unlock key.

  8. From the same terminal, type the following command to unlock your device: fastboot oem unlock XXXXXXXXXXXXXXXXXXXX

    					[...]
    					(bootloader) Unlock code =
    					XXXXXXXXXXXXXXXXXXXX
    
    					(bootloader) Unlock completed! Wait to reboot
    
    					FAILED (status read failed (No such device))
    					finished. total time: 24.335s
    				
  9. If the device doesn't automatically reboot, reboot it from the menu. It should now be unlocked.

Installing recovery using fastboot

  1. Make sure your computer has working fastboot and adb .

  2. Download recovery: visit [RECOVERY][Condor] CWM 6.0.4.9 .

  3. Enable USB debugging on the device.

  4. Reboot the device into fastboot mode.

  5. Connect the device to the computer through USB.

  6. Once the device is in fastboot mode, verify your PC sees the device by typing (as root) fastboot devices

  7. Flash recovery onto your device by entering the following command: fastboot flash recovery recovery.img .

  8. Once the flash completes successfully, Reboot the device into fastboot mode, then select recovery to verify the installation.

Installing CyanogenMod from recovery

  1. Make sure your computer has working adb .

  2. Download the CyanogenMod package: CyanogenMod Builds for Moto E .

  3. Boot to recovery mode, and connect the phone to your computer through USB.

  4. Optional (Recommended): Select backup and restore to create a backup of your current ROM.

  5. Select wipe data/factory reset .

  6. Select mounts and storagemount USB storage to copy the installation package to your device.

  7. Go back to the main menu and select install zip . Choose to install from the same directory where you pushed the package(s). If you are installing multiple packages, install CyanogenMod first and then install any subsequent packages on top of it.

  8. Once installation has finished, return to the main menu and select reboot system now . The device will now boot into CyanogenMod.

Chapter 2. Software

Debian Tools

Dpkg

Debian package management system

List selected packages

dpkg --get-selections

Pbuilder

personal package builder for Debian packages

Tip

The debs are created in /var/cache/pbuilder/result .

Wodim

command line CD/DVD writing tool

Example 2.1.  wodim -force blank=all speed=0 dev=/dev/cdrom


Example 2.2.  wodim -dao speed=0 dev=/dev/cdrom example.iso


Ubuntu

Get a Classic Desktop in Ubuntu 14.04 with GNOME Flashback Session

apt-get install gnome-session-flashback

Android Tools

GooglePlayDownloader

GooglePlayDownloader is a graphical software to download APKs from the Google Play store.

CyanogenMod

CyanogenMod is an after-market firmware for a number of cell phones based on the open-source Android operating system. It offers features not found in the official Android based firmwares of vendors.

Gnome Settings

Network Time

If you want your system clock to be synchronised with Network Time, you need to install NTP (Network Time Protocol) and modify the Date & Time Preferences: SystemPreferencesDate & Time

In the Date & Time Preferences dialog, you activate the network time: Date & TimeNetwork Time = On

Multisystems

OCS Inventory / FusionInventory

Hardware and software inventory tool

Example 2.3.  /etc/fusioninventory/agent.cfg


Server installation

Install the MySQL server ( mysql-server package), then the ocsinventory-server , ocsinventory-reports , fusioninventory-agent packages.

Clients installation

Install the fusioninventory-agent package.

Synergy

Share mouse, keyboard and clipboard over the network

Tip

You should take care of using compatible versions on all the systems between which you want to share the mouse and keyboard.

PortableApps.com

Disable Process Hacker update checker

The update checker of Process Hacker is enabled by default and cannot be disabled from the user interface. You need to edit the [...] /PortableApps/ProcessHackerPortable/Data/ProcessHacker.exe.settings.xml file:

<setting name="ProcessHacker.Updater.PromptStart">0</setting> 

Eclipse

Specific JRE

If you want to use a specific JRE to run your Eclipse environment, you shall set the -vm option in eclipse.ini file

[...]
-vm
C:/Path/to/Java/bin
[...]
		

Show workspace path in window title

If you want to show the path to the current workspace you are working in, you shall set the -showlocation option in eclipse.ini file

[...]
-showlocation
[...]
		

Convert Eclipse project type from General to Java

Edit the project's .project file and set the following nature :

<natures>
	<nature>org.eclipse.jdt.core.javanature</nature>
</natures> 

TCP/IP Monitor

This Eclipse tool can be easily used as a proxy to spy a communication between a client and a server. The fastest way to do so is to only change the server listening post, and make the TCP/IP Monitor forward the clients requests between the original port and the new one. For example, if your server was originally listening on port 80, change this to port 90 and make the TCP/IP Monitor listen to port 80 and forward requests to localhost:90.

Tomcat debug in Eclipse

In order to make it possible to debug an application running in Tomcat, you must install the Core 32-bit/64-bit Windows Service Installer package. The Core zip package can not be debugged in Eclipse.

Tomcat 7 server

There is a bug recent Eclipse versions which prevents from creating a new Tomcat 7 server. To make it possible to create a Tomcat 7 server, when eclipse is not running, in your workspace directory, remove the following files:

  • .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.server.core.prefs

  • .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jst.server.tomcat.core.prefs

Eclipse Mylyn

Local Tasks repository

By default, the local tasks are stored in workspace /.metadata/.mylyn/

Eclipse CDT

Eclipse IDE for C/C++ Developers

Java dependency

CDT only works with recent version of Java: for example, CDT 8.6 only works with Java ≥ 1.7

MinGW dependency

It will be a lot easier for a newcomer to install MinGW before installing CDT and starting a new C/C++ project: by doing so, MinGW libraries will be automatically detected in CDT.

Static binary

When learning C/C++, it will be easier for the newcomer to produce a binary with statically linked libraries. To do so, you must add the -static flag in project PropertiesC/C++ BuildSettingsTool SettingsMinGW C++ LinkerMiscellaneousLinker Flags

Empty Eclipse Console

When running your binary, if you see nothing in the Eclipse Console, you shall add the MinGW bin directory to the path of your binary.

create a New Environment Variable from project PropertiesRun/Debug Settings binary EditEnvironmentNew with

Name:

PATH

Value:

C:\MinGW\bin

Docbook Tools

Unicode

Code Name Comment
U+002A * ASTERISK = star (on phone keypads)
U+00A0   NO-BREAK SPACE prevents an automatic line break
U+00B3 ³ SUPERSCRIPT THREE = cubed
U+204E LOW ASTERISK
U+2055 FLOWER PUNCTUATION MARK • used as a punctuation mark with Syloti Nagri, Bengali and other Indic scripts
U+2190 LEFTWARDS ARROW
U+2192 RIGHTWARDS ARROW = z notation total function
U+2194 LEFT RIGHT ARROW = z notation relation
U+219D RIGHTWARDS WAVE ARROW
U+21C4 RIGHTWARDS ARROW OVER LEFTWARDS ARROW
U+21C9 RIGHTWARDS PAIRED ARROWS
U+21DC LEFTWARDS SQUIGGLE ARROW
U+21DD RIGHTWARDS SQUIGGLE ARROW
U+21E2 RIGHTWARDS DASHED ARROW
U+2217 ASTERISK OPERATOR
U+2264 LESS-THAN OR EQUAL TO
U+2265 GREATER-THAN OR EQUAL TO
U+2315 TELEPHONE RECORDER
U+2318 PLACE OF INTEREST SIGN
U+23FA BLACK CIRCLE FOR RECORD = record
U+2605 BLACK STAR
U+2606 WHITE STAR
U+263A WHITE SMILING FACE
U+2668 HOT SPRINGS
U+2687 WHITE CIRCLE WITH TWO DOTS
U+2693 ANCHOR = nautical term, harbor (on maps)
U+26AB MEDIUM BLACK CIRCLE • UI symbol for record function
U+2709 ENVELOPE
U+270B RAISED HAND = paper in Rock, Paper, Scissors game
U+2731 HEAVY ASTERISK
U+2732 OPEN CENTRE ASTERISK
U+273B TEARDROP-SPOKED ASTERISK
U+273D HEAVY TEARDROP-SPOKED ASTERISK
U+2749 BALLOON-SPOKED ASTERISK = jack
U+274B HEAVY EIGHT TEARDROP-SPOKED PROPELLER ASTERISK = turbofan
U+2751 LOWER RIGHT SHADOWED WHITE SQUARE
U+2756 BLACK DIAMOND MINUS WHITE X
U+2795 HEAVY PLUS SIGN
U+27F5 LONG LEFTWARDS ARROW
U+27F6 LONG RIGHTWARDS ARROW
U+27F7 LONG LEFT RIGHT ARROW
U+27FF LONG RIGHTWARDS SQUIGGLE ARROW
U+2B33 LONG LEFTWARDS SQUIGGLE ARROW
U+2B60 LEFTWARDS TRIANGLE-HEADED ARROW
U+2B62 RIGHTWARDS TRIANGLE-HEADED ARROW
U+2B6C RIGHTWARDS TRIANGLE-HEADED DASHED ARROW
U+2B82 RIGHTWARDS TRIANGLE-HEADED ARROW OVER LEFTWARDS TRIANGLE-HEADED ARROW
U+2B86 RIGHTWARDS TRIANGLE-HEADED PAIRED ARROWS
U+FEFF  ZERO WIDTH NO-BREAK SPACE
U+1F347 🍇 GRAPES
U+1F374 🍴 FORK AND KNIFE = restaurant, meal
U+1F4E4 📤 OUTBOX TRAY
U+1F4E5 📥 INBOX TRAY
U+1F4E8 📨 INCOMING ENVELOPE
U+1F4E9 📩 ENVELOPE WITH DOWNWARDS ARROW ABOVE • sending mail
U+1F4F1 📱 MOBILE PHONE
U+1F4F2 📲 MOBILE PHONE WITH RIGHTWARDS ARROW AT LEFT • making a phone call
U+1F60A 😊 SMILING FACE WITH SMILING EYES
U+1F60B 😋 FACE SAVOURING DELICIOUS FOOD
U+1F60C 😌 RELIEVED FACE
U+1F810 🠐 LEFTWARDS ARROW WITH SMALL EQUILATERAL ARROWHEAD
U+1F812 🠒 RIGHTWARDS ARROW WITH SMALL EQUILATERAL ARROWHEAD

Adobe Source Pro Fonts

This is not strictly Docbook related, but this can be very usefull to use this kind of non-standard font in this context.

Glyphicons

This is not strictly Docbook related, but this can be very usefull to use this kind of icons in this context.

SVG image integration

SVG XML can be directly integrated in Docbook XML, you can put an svg element directly inside an imageobject [2] element.

TTF in SVG in Docbook font integration

If you want to integrate a dedicated TTF font inside an SVG image which is included in a Docbook document, you have to proceed through the following two steps.

  1. Make the TTF font accessible to the original SVG image. For example, you can use the following CSS configuration [3] :

    <style type="text/css">
    	@font-face {
    		font-family: 'Font Name';
    		font-style: style;
    		font-weight: weight;
    		src: url('path/to/font-file.ttf');
    	}
    </style>
    						

    This will ensure that, when viewing the SVG image, the SVG viewer will find the TTF file.

  2. Make the TTF font accessible to the published document. For example, you can add the following FOP configuration [4] :

    <fop>
    	<renderers>
    		<renderer mime="application/pdf">
    			<fonts>
    				<font embed-url="path/to/font-file.ttf">
    					<font-triplet name="Font Name" style="style" weight="weight" />
    				</font>
    			</fonts>
    		</renderer>
    	</renderers>
    </fop> 

    This will ensure that, when processing the Docbook document, the Docbook processor will find the TTF file.

XML Resume integration

The purpose of this hack is to include a resume at the end of a docbook.

The easiest way to do this is by manipulating the *.fo files of both documents (docbook, resume).

  1. Insert the fo:page-sequence from the resume to the docbook fo:root .

  2. Insert the fo:layout-master-set childs from the resume to the docbook fo:layout-master-set . Take care to only include the page masters that do not already exists (The master-name attribute is a unique ID)!

Xsltproc

XSLT 1.0 command line processor

Use this tool to publish Docbook documents, instead of Ant xslt task.

Windows portable installation

If you want to install Xsltproc as a portable program under windows, you should merge the bin directories of the following libraries:

libxslt
libxml
iconv
zlib

The Windows port is maintained here: http://www.zlatkovic.com/libxml.en.html

Publican

Tool for publishing material authored in DocBook XML

Javascript

Bootstrap

HTML, CSS and JS framework

jQuery

JavaScript library for dynamic web applications