- Download TinyPM war for tomcat 6.x from here
- Install tomcat 6.x and mysql-server (5.x)
sudo apt-get install tomcat6 mysql-server
- Download mysql connector / j from mysql website (5.x)
- Go to /usr/share/tomcat6/lib copy the files in the dependency folder of the tinypm zip file downloaded in step 1. Copy the MySQL connector jar file here.
- Create a database using the following commands
CREATE DATABASE tinypmdb CHARACTER SET = 'utf8' COLLATE = 'utf8_general_ci';
- Create a user with SELECT, UPDATE, INSERT, LOCK TABLES and DELETE rights:
GRANT SELECT, UPDATE, INSERT, LOCK TABLES, DELETE ON tinypmdb.* TO 'username'@'localhost' IDENTIFIED BY 'password'; FLUSH PRIVILEGES;
- Run scripts to create the tinyPM database schema and data (instructions provided here are for MySQL console application):
u tinypmdb . %PATH_TO_INSTALL_FOLDER%/sql/mysql/create_schema-2.x.sql . %PATH_TO_INSTALL_FOLDER%/sql/mysql/create_data-2.x.sql
- Create search index using commands
sudo mkdir /var/search_index /var/search_index/tinypm sudo chown -R tomcat6:tomcat6 /var/search_index/tinypm
- Create /var/lib/tomcat6/webapps/tinypm, extract the contents of the war file into this folder.
- Edit /var/lib/tomcat6/webapps/tinypm/WEB-INF/classes/hibernate.properties and enter the MySQL db details. uncomment the last line
#hibernate.search.default.indexBase = /var/search_index/tinypm
- Restart tomcat with sudo service tomcat6 restart, visit http://localhost:8080/tinypm (default credentials are admin/admin)
Linux
How to install FreeNX server and client on Ubuntu
- Add the FreeNX team repo
sudo add-apt-repository ppa:freenx-team
- Install FreeNX
sudo apt-get update && sudo apt-get install freenx
- Apply Patch
wget https://bugs.launchpad.net/freenx-server/+bug/576359/+attachment/1378450/+files/nxsetup.tar.gz && tar xvf nxsetup.tar.gz && sudo cp nxsetup /usr/lib/nx
- Setup NoMachine keys
sudo /usr/lib/nx/nxsetup --install --setup-nomachine-key
- Import public key for server
sudo cp /usr/NX/etc/keys/node.localhost.id_dsa.pub /tmp/node.localhost.id_pub.save sudo /usr/NX/bin/nxnode --keyadd /tmp/node.localhost.id_pub.save sudo nx:root /usr/NX/bin/nxserver --keygen sudo chown nx:root /usr/NX/home/nx/.ssh/authorized_keys2 sudo chmod 0644 /usr/NX/home/nx/.ssh/authorized_keys2 sudo mv /usr/NX/home/nx/.ssh/authorized_keys2 /usr/NX/home/nx/.ssh/autohriazed_keys --
- Add new user using useradd, then add this username to /etc/ssh/sshd_config under AllowedUsers (multiple usernames can be specified with spaces separating the names)
- check if the user is ableto login to NXServer bu uisng command
sudo /usr/NX/bin/nxserver --usercheck
- Add the following shell script to /usr/NX/bin/nxwrapper
#!/bin/bash nxnode=${ps -o ppid= -p $PPID} nxagent=${pgrep -p $nxnode -u $USER -x nxagent} ${1+"$@"} exec kill $nxagent
- Import the key in /usr/NX/keys/rsa_id.pub.key on to client. use custom for desktop manager specify path to nxwrapper and specify startfluxbox
Fix for "Cannot shutdown using power button" on Ubuntu
After my recent upgrade to ubuntu, pressing the power button to shut down stopped working. I had to remap the script mapped to the power button by
- Editing /etc/acpi/events/powerbtn using the command
sudo gedit /etc/acpi/events/powerbtn - Commenting line shown below by adding a # to the beginning of the line
action=/etc/acpi/powerbtn.sh - adding a new line
action=/sbin/poweroff - Saved and exited Gedit. Tested to make sure the functionality is restored by pressing the power button to shut down
Joining multiple videos segments on Ubuntu
- Install mencoder sudo apt-get install mencoder
- Use the command
mencoder -oac mp3lame -ovc copy -o '../combined.avi' `find -name '*.AVI'` to convert files
Setting Hardware clock to not use UTC in Ubuntu
I installed Ubuntu on my Desktop but during the install I selected the option “Hardware clock set to UTC”, This messed up the time on the computer as the hardware clock was in fact set to EST. to fix this I had to
- edit the /etc/default/rcS file with the command
sudo gedit /etc/default/rcS
- Change UTC=yes to UTC=no and restart computer
Installing LIRC & Irxevent
- sudo apt-get install lirclirc-x mythbuntu-lirc-generator
- Select stream zap PC remote when asked.
- Do not select any IRblaster
- start lircd
- start irw and see if it detects any key presses
- Copy the attached Lircmap.xml file into ~/.xbmc
- startxbmc and check if the remote works
- run mythbuntu-lirc-generator
- edit .lircrc and append ~/.lirc/common to the end of the file
- paste the attached common file in ~/.lirc/
Mapping marble mouse buttons in ubuntu (custom configuration)
I recently purchased a marble mouse but soon found out that the mouse buttons do not function as expected on Ubuntu. This was soon remedied with the following tweaks to the Edit the locate xorg.conf.d directory using command
locate xorg.conf.d | grep d$
edit the 50-marblemouse.conf in the xorg.conf.d, replace the inputClass with the section below
### START FILE SNIPPET ###
Section "InputClass" Identifier "Marble Mouse" MatchProduct "Logitech USB Trackball" MatchIsPointer "on" MatchDevicePath "/dev/input/event*" Driver "evdev" Option "ButtonMapping" "1 8 3 4 5 6 7 2 9" Option "EmulateWheel" "true" Option "EmulateWheelButton" "9" Option "ZAxisMapping" "4 5" Option "XAxisMapping" "6 7" Option "Emulate3Buttons" "false" EndSection
### END FILE SNIPPET ###
Button numbers
1 – Large left button
8- Small left button
3 – Large right button
9 – Small left button
Setting up mediatomb using ffpstick on a Zyxcel NSA210
- Download FFPStick 0.5 from here
- Format a USB stick with FAT16, extract the contents of the FFPStick Archive you downloaded on the the root of the USB stick.
- Shutdown the NSA210, Plug in the USB stick and reboot
- wait for 2 minutes and then login to the box via telnet
- change root password, delete account called “user”
- start ssh with
chmod a+x /ffp/start/sshd.sh /ffp/start/sshd.sh start
- logout from telnet and log back in via ssh, login as root with the newly changed password.
- stop telnet and then disable telnet service using commands
chmod -x /ff/start/telnetd.sh /ffp/start/telnet.sh stop
- Start mediatomb to create the initial config file by using the command
chmod -x /ff/start/mediatomb.sh /ffp/start/mediatomb.sh start
- Wait for 30 seconds and then issue the stop command to stop mediatomb
/ffp/start/mediatomb.sh stop
- Customize the /ffp/var/mediatomb/config.xml file
- Start mediatomb again, navigate to http://cerberos:49152 and begin adding media to database.
- To remove the listing for PC directory add the following line under <server>
<pc-directory upnp-hide=”yes”/> - Verify that the upnp server is reachable using the client on a droid or using enna or moovida.
Fixing sound in fluxbox (alsactl restore)
- Login to the box, sudo -i and enter password
- open alsamixer, set desired levels then type “alsactl store”
- ctrl+d to logout of root shell.
- gedit ~/.fluxbox/startup, add alsactl restore & to the startup
- reboot or logout and log back in into fluxbox
Mounting a drive in fstab so that it gets auto mounted on boot
- In a terminal type blkid, this shows the drive name to UUID mapping. note down the UUID of the drive you want mounted at boot.
- As root create a folder called Local Backup in /media
- change ownership of the folder created in the step above to the user that logs in (IRIS9)
- edit /etc/fstab and paste the line below after modifying the appropriate UUID and paths to the folders
UUID=xxxxxxxxxxxxxxxxxxxxxx /media/Local40Backup ntfs defaults 0 2
- space in path top folders can be escaped by using 40
- save the file and then type sudo mount -a. check if the drive is mounted.