Bliss & Music Management

Another one of the great things about using a Synology is having access to all the great packages that both Synology and the community create.  You find out about so many different apps you may not have been familiar with.  Turns out Bliss was one of those (grab the app from Patters).

I have a fairly large music library I’ve composed over the years, and while I was picky about folder structure, all the other stuff was lacking: tags, images, etc.  Back in July of 2012 I gave it a first run and liked what it did.  However, I didn’t keep it installed (didn’t think I would need it continually).

Fast forward to last week, and I reinstalled it to help clean things up again – I had to restore lots of my music which meant the tags, folder structure, etc. were all messed up again.  I’m loving it all over again for it’s ease of use and continual running in the background.

Turns out in the current release they’ve added some new case rules which I love, but was having a few issues with it.  Shot of an email with some of the details, and got an immediate response saying it was being fixed in the next release that was in beta.  I asked if they wanted any help with testing, and sure enough Dan (creator) gave me links to the beta which I promptly installed (replaced the bliss-bundle folder after you extract the Linux jar file).

Can’t say enough about the customer service, plus it’s fixing all my music issues in the background.  Yay!

Published
Categorized as synology

Synology L2TP/IPSec VPN

In the last few releases, Synology has added L2TP/IPSec as an option for a VPN.  I’ve never been able to get it to work on a Windows client until today.

Ports Required:

  • IPSec – UPD 500
  • IPSec NAT Traversal – UDP 4500
  • L2TP – UDP 1701

Fix on Windows clients – http://support.microsoft.com/kb/926179

  • For Win7 and Win8 Machines
    • HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesPolicyAgent
    • New DWORD (32-bit) – AssumeUDPEncapsulationContextOnSendRule
    • Set the Value Data to 2

Update:

Using OpenVPN with port 443, for easier access: http://forum.synology.com/enu/viewtopic.php?t=45545#p215354

Published
Categorized as synology

Bash Pass Variables Between Scripts

I have an app that can call a single script, sending it some variables.  Unfortunately, I needed to run multiple scripts, but both utilizing the same variables.  With bash, there is an easy way to do that, just append “$@” to the script.

For example, the application calls ‘combined_scripts.sh’ with variables $1 through $7.  The contents of ‘combined_scripts.sh’ is below and the variables are passed through to script1 and script2.

#!/bin/sh
./script1.sh "$@"
python ./script2.py "$@"
Published
Categorized as synology

mkvtoolnix on Synology

I’ve been fighting this for awhile as the mkvtoolnix package doesn’t have the correct dependencies when you install it.  Well, after doing a bit more digging I’ve found the answer to get mkvmerge to work!

Packages required:

  • mkvtoolnix
  • bzip2
  • boost-filesystem
  • boost-system

Then, you need to set an environment variable of LANG=C.  This can be done from the command line.

Tada, works!

http://forum.synology.com/enu/viewtopic.php?f=40&t=36845&start=15

*UPDATE – Jan 1 2016*

In addition to the LANG=C environment variable being set, I’ve also had to add in LC_ALL=C.  For me, I run a script that calls mkvmerge, so I just set both of these in the script.

Published
Categorized as synology

Windows 8 RTM, Realtek NIC, and WOL

At home I have my NAS setup with VPN so that I can pretty much always get back on my home network if required.  This comes in handy for running virtual machines.  However, since I moved to the NAS I run my virtual machines from my desktop.

The whole point of the NAS was for less power and noise though, so I don’t want the desktop on all the time.  My solution was wake-on-lan (WOL) and in Windows 7 it worked great.  However, over the past couple of days, I’ve upgraded to Windows 8 RTM and I couldn’t get WOL working when the machine was powered off.  It worked great when the machine was asleep, but not completely off (most of the time).

Turns out the default realtek NIC drivers in Windows 8 aren’t really the best, but downloading the Windows 8 drivers from the realtek website fixed the issues.

P.S. Being able to run Hyper-V instead of Virtualbox is nice, plus you don’t loose hibernation!

Proxy Other Ports to Port 80 on Synology

Ok, so you want to be able to access services running on a random port on your Synology NAS over standard ports (80 and 443).  To do that, you need to do the following items:

  1. Enable the web station from the web services icon in control panel.  This gives you Apache
  2. Add the following lines to the end of /usr/syno/apache/conf/httpd.conf-user (you must re-do this after doing a DSM update).  Replace <accessPath> with a name, and <port> with the port it is running on.  For example, http://localhost:8080/party.
    LoadModule proxy_module modules/mod_proxy.so
    LoadModule proxy_http_module modules/mod_proxy_http.so
    ProxyRequests Off
    ProxyPreserveHost On
    
    <Location /<accessPath>>
    ProxyPass http://localhost:<port>/<accessPath>
    ProxyPassReverse http://localhost:<port>/<accessPath>
    </Location>
    
  3. Restart apache with “/usr/syno/etc.defaults/rc.d/S97apache-user.sh restart”

Just make sure whatever service you are doing this with has a base url of <accessPath>.

UPDATE:  Just updated to DSM 5.0 and a few things have changed:

  1. /usr/syno/apache/ has moved to /etc/httpd/
  2. /usr/syno/etc/rc.d/S97apache-user.sh is gone, so just use ‘httpd -k stop|start|restart’
  3. You may need to create the folder /var/services/web/internal for httpd to restart
Published
Categorized as synology

Find PID of Application Using a Port

Best way to do it is to run the command

netstat -lnptu | grep :<port#>

This will give you the PID of the service, and then you can run

kill <PID>

or

kill -9 <PID>

if just a regular kill doesn’t work.

Published
Categorized as synology

Synology DS1511+ and Crontab

I’ve added an rsync job to my crontab file in order to backup all my websites I have being served from Dreamhost (including this one).  The specific job is set to run every night at midnight starting last night.  Unfortunately, it didn’t run.

This is because the crontab service needs to be recycled in order to grab the new jobs (also, don’t update your DSM, because that seems to blow it away).  As this is a non-standard linux distro, you need to restart crontab the following way:

/usr/syno/etc.defaults/rc.d/S04crond.sh stop
/usr/syno/etc.defaults/rc.d/S04crond.sh start

Published
Categorized as synology

Synology Plex Media Server and Samsung Smart TV Client

This one wasn’t completely obvious, but I think I’ve managed to figure it out.  It at least appears to be working correctly, assuming it continues to work a bit better after the media scan is complete.

Steps for the Server:

  1. Grab the spk from http://www.plexapp.com/linux/linux-pms-download.php.
  2. Log into DSM and in Package Installer, install the downloaded spk.
  3. After it is installed, visit the website at http://<nas-server>:32400.  It doesn’t look like the shortcut that is created works.
  4. Add in the locations to your media.

The steps for the Client on a Samsung TV with SmartHub is broken up into two options: installer hosted on your own server, or on someone elses.  It doesn’t matter where you get the installer from, as you can specify the Plex Server after the application is installed.

Hosted on your NAS:

  1. In Control Panel, enable web station under web services
  2. Copy the installer (link) to the web share that was created in step 1
  3. Copy the widgetlist.xml (link) to the web share that was created in step 1
  4. Edit the widgetlist.xml to contain the IP of your NAS (or the URL where the installer is located)
  5. On the TV, open the Smart Hub
  6. Log in as a different user (A/red button)
    • User: develop
    • Password: 123456
  7. Click the Settings button (D/blue button)
  8. Select Development
  9. Set the Server IP to that of your NAS
  10. Select User Application Synchronisation
  11. Once the installation is finished, restart your TV
  12. Visit SmartHub and Plex is installed.
  13. Point Plex at your Plex Media server.

Hosted by someone else:

  1. On the TV, open the Smart Hub
  2. Log in as a different user (A/red button)
    • User: develop
    • Password: 123456
  3. Click the Settings button (D/blue button)
  4. Select Development
  5. Set the Server IP to 92.50.72.58
  6. Select User Application Synchronisation
  7. Once the installation is finished, restart your TV
  8. Visit SmartHub and Plex is installed.
  9. Point Plex at your Plex Media server.

These install instructions were taken from the Plex forums.

Update 1/6/2012: The crawler has completed, and it does actually work!  I also found out that it only supports TV shows right now, and not music or photos.  Looking into it, it’s just a webpage with a lot of javascript.  If I have time, I may look to add music in, as having one solution for everything is a lot better than both this and DLNA!

Update 8/19/2012: Instead of going through all of this, just grab the Plex app from the Samsung App Store!

Published
Categorized as synology