[Tutorial] Complete Tutorial on Installing libresonic/subsonic Standalone on Raspberry Pi

Why Choose Libresonic over Subsonic?

libresonic is essentially subsonic but with the license feature removed. Subsonic allows mobile streaming for 30 days whereas it is disabled unless you donate.

The main reason as to why I decided to deploy libresonic as Standalone rather than a tomcat WAR (Web Archive) package is because tomcat8 will hang when deploying libresonic.war package for somewhat unknown reason, so I resorted to compile a debian package manually using the following method.

Prerequisites

Download the following packages using debian apt-get package manager:


sudo apt-get install openjdk-8-jdk maven lintian

* lintian is needed when compiling debian package
* jdk8 is needed to compile booter and debian package

Add the JDK8 to your environment variable JAVA_HOME. Make sure to quit the terminal session if you're logging using SSH or simply open up a new terminal after making the changes.


sudo nano ~/.bashrc_profile
export JAVA_HOME=/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/


Downloading and Compile libresonic Source Code

mkdir ~/libresonic
cd ~/libresonic
git clone git://github.com/Libresonic/libresonic.git
cd libresonic
git checkout develop
mvn package
mvn -P full -pl libresonic-booter -am install
mvn -P full -pl libresonic-installer-debian/ -am install
sudo dpkg -i ./libresonic-installer-debian/target/libresonic-*.deb


Modifying libresonic Service File

After installing the .deb package, open /etc/default/libresonic which is the service unit file for libresonic that is started everytime Raspberry Pi is booted. Modify the LIBRESONIC_ARGS to use the port that you want.

The following arguments will run libresonic on port 4041. Make sure to do port forwarding on your router to allow external access to your libresonic music server.

LIBRESONIC_ARGS="--max-memory=150 --port=4041 --context-path=/libresonic"

Running libresonic Service

After making the changes above, try restarting the libresonic service and make sure it is up and running correctly.

sudo systemctl restart libresonic
systemctl status libresonic 

You should see the following output if the service is up and running successfully.


libresonic.service - LSB: Libresonic daemon
   Loaded: loaded (/etc/init.d/libresonic)
   Active: active (running) since Sat 2016-10-29 19:43:07 UTC; 11h ago
  Process: 1650 ExecStop=/etc/init.d/libresonic stop (code=exited, status=0/SUCCESS)
  Process: 1664 ExecStart=/etc/init.d/libresonic start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/libresonic.service
           └─1679 java -Xmx150m -Dlibresonic.home=/var/libresonic -Dlibresonic.host=0.0.0.0 -Dlibresonic.port=40...

Oct 29 19:43:07 raspberrypi libresonic[1664]: Started Libresonic [PID 1679, /var/libresonic/libresonic_sh.log]
Oct 29 19:43:07 raspberrypi systemd[1]: Started LSB: Libresonic daemon.


There are two log files related to libresonic that you can inspect libresonic program status. You will have to switch to root superuser account to view these logs files since /var/libresonic ownership is assigned to root.

sudo su
tail -f /var/libresonic/libresonic.log
tail -f /var/libresonic/libresonic_sh.log

In my case I'm seeing a lot of Garbage Collection messages on libresonic_sh.log such as the following. Not sure whether it is important but I simply ignore them for now. You will have to wait for a couple of minutes before the libresonic

[GC (Allocation Failure)  13424K->11214K(16128K), 0.0494979 secs]
[GC (Allocation Failure)  15822K->13954K(18688K), 0.0664496 secs]
[Full GC (Allocation Failure)  13954K->11839K(18688K), 0.2304968 secs]
[GC (Allocation Failure)  20031K->16776K(28824K), 0.0817065 secs]
[GC (Allocation Failure)  24968K->21643K(29848K), 0.1128707 secs]
[Full GC (Allocation Failure)  21643K->21643K(29848K), 0.3198130 secs]
[GC (Allocation Failure)  34840K->29741K(50344K), 0.2037173 secs]
[GC (Allocation Failure)  43821K->38098K(52264K), 0.2103557 secs]
[Full GC (Allocation Failure)  38098K->23955K(52264K), 0.4711993 secs]
[GC (Allocation Failure)  40211K->33697K(58104K), 0.1532793 secs]
[GC (Allocation Failure)  49953K->37336K(58104K), 0.1197363 secs]
[GC (Allocation Failure)  53592K->39362K(58104K), 0.0555118 secs]

Wait until you see the following message on libresonic_sh.log before launching libresonic Web User Interface.


Libresonic running on: http://localhost:4041/libresonic
41571 [main] INFO org.springframework.remoting.rmi.RmiServiceExporter - Looking for RMI registry at port '9412'
41659 [main] INFO org.springframework.remoting.rmi.RmiServiceExporter - Could not detect RMI registry - creating new one
41813 [main] INFO org.springframework.remoting.rmi.RmiServiceExporter - Binding service 'LibresonicDeployerService' to RMI registry: RegistryImpl[UnicastServerRef [liveRef: [endpoint:[127.0.1.1:9412](local),objID:[0:0:0, 0]]]]

Opening libresonic Web User Interface

Now that the libresonic service is up and running, it's time to launch your web browser and navigate to http://<YOUR-RASPBERRY-PI-IP-ADDRESS>:4041/libresonic. Everything should resemble the Subsonic UI except the logo :-)



Misc.

By default, you can find the libresonic program files on /var/libresonic. Following are the directory output after libresonic is successfully running.

root@raspberrypi:/var/libresonic# ls -alh
total 56K
drwxr-x---  8 root tomcat8 4.0K Oct 30 06:58 .
drwxr-xr-x 13 root root    4.0K Oct 29 18:17 ..
drwxr-xr-x  2 root root    4.0K Oct 30 06:58 db
drwxr-xr-x  3 root root    4.0K Oct 29 19:38 jetty
drwxr-xr-x  2 root root    4.0K Oct 30 05:37 lastfmcache
-rw-r--r--  1 root root     828 Oct 30 06:59 libresonic.log
-rw-r--r--  1 root root     928 Oct 30 06:58 libresonic.properties
-rw-r--r--  1 root root     13K Oct 30 06:59 libresonic_sh.log
drwxr-xr-x  7 root root    4.0K Oct 29 19:39 lucene2
drwxr-xr-x  9 root root    4.0K Oct 30 05:37 thumbs
drwxr-xr-x  2 root root    4.0K Oct 29 19:26 transcode



References

https://github.com/Libresonic/libresonic/blob/develop/INSTALL.md

https://www.itsfullofstars.de/2016/05/

Advantage of Gateway 3DS Flash Cart over Free arm9loaderhax/Luma3DS/ReiNAND/Cake/Rei

Since the announcement and tutorials (honorable mention of Plailect's guide here) of arm9loaderhax (a9lh) and Luma3DS (also known as ReiNAND previously), players are now able to run their 3DS roms and homebrew directly from the microSD card for Free. So how will these affects 3DS flash cart manufacturers such as Gateway which sell their flash cart for profit? Is there still any reasons to buy a dedicated flash cart to play the 3DS roms if you can play it for free?

Note: For those that followed my tutorial on installing BrowserHax and Downgrading to v9.2 here, you can simply start from Part 3 from Plailect's guide to setup RedNAND and downgrade to v2.1 for arm9loaderhax for your 3DS console. Although it is a long winded instructions, your effort will be rewarded in the long run. Just be sure to follow each and every instructions carefully during the process.

From there onwards you can always update your arm9loaderhax patched sysNAND to the latest version without ever worrying about bricking your 3DS console! That is only valid if you use CFW such as Luma3DS which will have write protection against FIRM0 and FIRM1 file on your sysNAND. Gateway mode does not ensure this! So never attempt to update your software when you're booting into Gateway mode via a9lh.

[Guide] A Detailed and Beginner Friendly Walkthrough Guide for Installing BrowserHax, MenuHax, and Downgrade New 3DS LL/XL from Firmware 9.9J to 9.2J


Prelude 

Why I Upgrade from Original 3DS to New 3DS LL

tldr; Skip to the next section <Guide Start> to jump straight into my ordeal of downgrading my 3DS LL v9.9J firmware into v9.2 and booting into Gateway Mode

Having played on the Original 3DS (yes the small clamshell one that Nintendo first released back in 2011) for quite some time now, I finally decided to purchase a New 3DS LL (also known as New Nintendo 3DS XL outside Japan). As opposed to what others had complained about the LL/XL for its huge size, bulkiness and unportability, I actually found it to be pleasing to my play style. Main reason that I purchased it is its large 4.88 inch screen size. If the number seems meaningless to you, think of it being almost the same size as the PS Vita. Sure you wouldn't see much crisp image like the O3DS or the New 3DS regular edition due to its larger PPI, but frankly, for me that is negligible and it's the 3D immersion that really benefits from such a big screen. Not that 3DS console is known for its HD like image for gaming on-the-go.

Mind you that I had an average sized hands as well and holding it definitely helps to prolong my play time until I start to feel hand cramp.

Another reason for choosing the New 3DSLL over the regular size one is I think the 20% screen estate increase from my O3DS wouldn't be that much noticeable after all.

So there you have it.


Finally, A Page that Tell the Tales About D.Sync (Well... Partially...)

I've always wanted to have an About Me page that describe myself and share my experience with the netizens, and I've finally done it!

At long last, I've publish my About Me page which you can now find at the top menu bar. It is now in text written format and hopefully I'll have the opportunities to upload some real life pictures of my life + stuffs that I had owned with you guys!

The newly added 'WHO IS D.SYNC?' about me page that describe myself :-D

Frankly speaking, I'm now very overwhelmed with my real life and had to often juggling between my job, hobby and family. Still I'm very content with all that I had learned and will be continuing updating my blog!

Enjoy!

My First RC and First Crawler - The Axial SCX10 (First Unbox) [Part 1]

My first RC crawler, first Axial product :-)

Decided to plunge my $$$ on this one to get myself know more about RC (Radio Control) vehicle. I never thought that I'll be spending even more $$ after this purchase for more upgrades in the weeks to come. Aluminium upgrades, lighting kits, more transmitter/receiver channels, and even FPV, there are just so many parts and $$$ that one could spend to modding this rig!

Stay tuned for more pictures about which upgrades that I had done to this awesome RC truck!

Understanding a Pinball Cabinet System (Part 1)

* This is a Part 1 writeup that gives a quick general overview about pinball cabinet systems, pinball emulator/simulator and pinball front end when I'm setting up my Pinball arcade system on my Desktop setup *

** Stay tuned for Part 2 if you would like to know how I setup each Pinball emulator/simulator such as PinMAME, Visual Pinball, Future Pinball, Pinball FX2 and Pinball Front-end using PinballX **

Pictures will be added in the future...

After 3 months of work I'm proud to say that my HyperSpin setup is now complete! Featuring 130 systems and perhaps more since HyperList is updated very frequently now. I've completed almost all the major systems since the 90's :-)

With this setup I decided to try setting up a Pinball systems. And alas, this has opened up a brand new can of worms! Never have I thought setting up a Pinball front end would be this daunting. So this post is basically summarising what I've learnt and done to setup my Pinball arcade experience using a common Desktop setup. I've got a 30" Dell U3011 but unfortunately it doesn't support rotation, so no chance to flip it over and lay on a flat table.

My Complete Illustrated Experience to Mod X-Arcade TankStick (Part 2)

This is the SECOND of the THREE part posts that I wrote to share my experience to mod my X-Arcade TankStick.

The X-Arcade TankStick came with a very sturdy cabinet and offers a lot of room for modding. Search on Google and you'll find numerous mods that people had done with it over the years.

I decided to write this post to share my experience in modding the TankStick with little DIY background :-) I made sure to took pictures of every steps that I did not only to share the progress with you, but also as a flashback moment for me during the mod. The whole mod took around 3 days as I tried different joysticks every time I mounted a new one before finally deciding on one.

Modding the TankStick actually requires no woodwork AT ALL if you're only seeking to replace the push buttons and installing a spinner. Woodwork is only needed in case you want to mount a universal mounting plate such as the Kowal, which you'll then install it on the Japanese or Korean joysticks. This is mainly because the default mounting space is not tall enough to fit it vertically. The width fits perfectly though.

Please see the following post to find out which arcade parts I purchased for this mod project.

Note: This post contains a lot of high resolution images. Please view it only if you have sufficient Internet bandwidth.

In essence, I mod the TankStick in the following ways:
  • Replaced the stock X-Arcade push buttons with Euro iL Short Stem Convex Push Buttons (multi-colored)
  • Installed Ultimarc SpinTrak, a high resolution rotary device that provides analog X-Axis (left/right) inputs. It would shows up as a Mouse device on Windows.
  • Did some woodwork to expand the default joystick mounting place in order to install the Kowal Universal Mounting Plate.
  • Mounted Kowal Universal Mounting Plate on various joysticks, i.e. Sanwa JLW and Seimitsu LS-32. 
  • I also tried to mount the Eurostick iL Joystick without the Kowal plate since it is an exact fit. It's basically a drop-in replacement.
  • Connecting the other end of the JLF-5H 5-Pin wiring harness to the Quick Disconnect. I did it because I don't want to cut the quick disconnect as I might want to use the non-PCB joystick on some fine day :)

Purchasing Arcade Parts to Mod My X-Arcade TankStick (Part 1)

This is the FIRST of the THREE part posts that I wrote to share my experience to mod my X-Arcade TankStick.


See Part Two - My Complete Illustrated Experience to Mod X-Arcade TankStick to see a complete pictures showing you my progress of mounting/installing these parts inside the TankStick.

The first step is of course purchasing the arcade parts. Following are the arcade parts which I purchased from various sites:

FocusAttack
  • Euro iL Short Stem Convex 28mm Push Buttons
  • Cherry DX44 Microswitches with 0.187" terminal size
  • Kowal Universal Joystick Mounting Plate (to fit with American/European and Japanese joystick)








AkiShop
  • Seimitsu LS-32
  • Seimitsu LS-32-02 (same as LS-32 but with PCB mounted)
  • Sanwa JLF
  • Shaft cover and dust washer for Sanwa and Seimitsu Joysticks
  • JLF-5H 5-Pin wire harness (to connect with the PCB on the Joystick)
  • Restrictor Gates




ArcadeWorldUK
I decided to split my order into two separate shipments with declared value of ~USD150 each in order to avoid having to pay for custom duty. I'm just glad I made the decision!



First Box
  • Eurostick iL Arcade Joystick (White)
  • SpinTrak Steering wheel
  • Sanwa GT-0 Round Restrictor Gate
  • Sanwa JLW-TM-8 Joystick with Fine Mesh Ball Top (Green)





Second Box 
  • Euro iL Convex Arcade Start Button (Player 1 & 2)
  • SpinTrak Arcade Spinner with red/silver handle and Large flyweight





More about the parts
Ultimarc SpinTrak

Ultimarc SpinTrak with Large Flyweight, Red Knob, and PCB
Steering wheel
Euro iL Joystick (White)
Sanwa JLW Joystick and GT-O Circle Restrictor Gate

See Part Two - My Complete Illustrated Experience to Mod X-Arcade TankStick to view my progress on modding the TankStick using these arcade parts.


Turning Mouse/Spinner Into Steering Analog Input for MAME, Arcade and Other Games

It is possible to turn your mouse or spinner such as the Ultimarc SpinTrak into a virtual analog device detected by various emulator (arcade) as well as PC games.

Only two softwares are needed:
  • vJoy - Create virtual joystick on your PC. You'll need a feeder application to provide input to the virtual joystick.
  • FreePIE - Emulate a virtual joystick and send the key buttons to vJoy.

Setting Up Playstation 3 Controller and Qanba Q4 RAF Arcade Stick on RetroPie

Although RetroPie support some of the hotkeys for joypads right out of the box, I decided to modify it to include the commonly used hotkeys. Also I found that the default joypad configuration for the Qanba maps the button incorrect.