Plex, AppleTV, PlexConnect

I’m very happy with Plex. I love the interface, the media-scanners, the ability to watch and listen my media from all sorts of devices and best of all; the way they managed to get my Plex library available on my AppleTV. Though I did have some problems with that lately.. After we moved from Zwaag to Alkmaar I set up my home network, home-server with Plex Media Server and installed my Apple TV.. Started the PlexConnect-script and barf; the trailers-App (now designated as Plex-app) is not capable of connecting to the PMS.. The Trailers app is nothing more than a XML-parsing frontend and the real work is done (served) from PlexConnect which somehow failed to connect to the PMS.. The message I kept on getting was

PlexAPI: We failed to reach a server. Reason: [Errno 61] Connection refused

I’ve tried several options; removed all Plex Home users, restarted the PMS, restarted the jail in which PMS was running, signed out the server from, completely reinstalled PlexConnect.. nothing worked.. Until I configured enable_plexgdm to false in Settings.cfg;
enable_plexgdm = False

Dang! Plex on AppleTV is working again.. Now I have to install my speakers ;)

Allowing GIT in JailKit on ISPConfig

I have several Debian based webservers which use ISPConfig. ISPConfig has  a very nice feature which allows clients to log in with SSH using JailKit. They get a jail with basic linux commands and access to their full web-environment (and private directories). I’ve had one specific client that needed to pull code from git repo’s. Though git was available on the jail host the jail itself didn’t have access. It’s fairly simple to get the jail to use git;

Add GIT binaries;

Add GIT libraries;
Optional; add ssh-keygen to clone out bitbucket-ssh repo’s;
Last but not least, add uname to jail

Tailing syslog on iOS8 without ICU

You might have noticed that the logviewer in Apple’s own Iphone Configuration Utility (ICU) does not work anymore after you’ve update the device to iOS8.. Checking syslog is a very important part of iOS development, from XCode this works fine, but when you work with other platforms (ie. Titanium) it’s kind of overkill to run XCode6 just to view logs. To make matters worse; XCode does not do a good job at it as well. If you use the Device-feature from Xcode (Window->devices->View device logs) you do not get a realtime updated view of the syslog and the interface of the tool itself is pretty cumbersome to work with.

There is a pretty solution for this; DeviceConsole made by rpetrich

How does it work?

  • Download or git clone “deviceconsole” from rpetrich’s GitHub page … HERE ..  From commandline this would look like;
  • Now open the XCode project deviceconsole
  • Go to Product->Build for and select Running
  • Next; select Product->Archive 
  • The organizer should pop up and you should see deviceconsole in it, select it (if not already selected)
  • Press Export ,  select Save Built Products , click Next and select a location to save the binary
  • Get back to the terminal and cd to the location you selected in the previous step
  • mv the binary from deviceconsole/usr/local/bin/deviceconsole to a folder in your PATH (ie; /usr/local/bin ).. you might need sudo to get this done
  • Done!

To use deviceconsole, connect an iOS device and fire up a terminal and enter

You should get a LOT of output.. If you’d like to debug just one app it’s recommended to use grep, ie;


Horde – Error on sending email

I run Horde 5 on one of my servers as webmail/groupware client. I recently migrated that server to a new environment (Ubuntu 14 LTS) and reinstalled Horde5 using pear.. After installation everything seemed to work fine, except sending emails. The error my client saw was “Error communicating with server”.. After analysing the logs I found this error:

The solution was quite easy but hard to find; after an upgrade of Pear a version of Horde_Mime was installed that borked the sending of email.. Installing an old version with pear did the trick;


Sublime Text Tips & Tricks

Screen Shot 2014-10-26 at 11.07.29I’ve been using Sublime Text for a while now.. At first I really wondered why I should use it, what does it have extra when compared to Eclipse? I’m still wondering what but I do know I like Sublime better.. It just feels faster and more lightweight (which of course it is). I do use Ti Studio once in a while.. Ti Studio for building and deploying Titanium projects, I do the coding in Sublime.. I have a slightly modified version of the TiBuild plugin to be able to build Ti projects and test them on the iOS/Android simulator.. The current GitHub version of TiBuild was broken, so I debugged it and have it up & running in my dev environment. You can download it here. If you want a more RAPID Titanium development experience I’d really would like to recommend to take a look at TiShadow ..

I’m still searching for an easy to use SFTP client for Sublime which works from the folders-panel (so I can ditch Eclipse entirely)  and I’d really like a terminal panel somewhere (preferably at the bottom of Sublime) so I can keep an eye on the output of TiShadow server.. Any tips are welcome ;)


I’ll update this post with more tips & tricks when I encounter them.

TiShadow and Sublime.

If you don’t want TiShadow to push your app automatically when you save a file you can add a new build system in Sublime which will invoke a Tishadow run command and push your app to your devices..  In order to do this create a new build system from Tools->Build System->New Build system … and add :

Save the file and select this new build system from Tools->Build System->[your new build system].. In order to invoke the build process press Ctrl/Cmd-B et voila; your app should run on all devices connected to your TiShadow server. You can also use Ctrl/Cmd-P and enter update (to update running app) or clear (to clear the builds).

Credits go to Dunkelgeist for creating this snippet :


Awesome Titanium Tool; TiShadow

TiShadow startup screenshotI’ve been using TiShadow for quite a while now, it’s a pretty clever tool to greatly improve development time on titanium projects. What it essentially does is compile your project, push it to one or more devices and runs it, however; this is done without restarting the simulator or without having to manually install the app on the device(s), and best of all; you can use several devices at once! Imagine you have an iPad, iPhone, Android Phone and Android tablet in front of you and every time you modify and save a file in your titanium project the app refreshes, on all devices, AT ONCE! Yeah.. that’s TiShadow.

TiShadow is made up of 3 parts;

  • TiShadow server; which runs on your Mac/PC as a kind of backend
  • TiShadow App; which runs on your devices or simulators
  • TiShadow cmdline ; which you use to run/update your app and push it to the devices

What basically happens is that you open up the TiShadow app from a device or simulator and connect it to the backend. At this point nothing is happening. Next you open up a terminal and cd to the Titanium project on your Mac/PC and enter the command

TiShadow will now compile your project for all platforms and push the new app to the devices through the TiShadow Server.
Now; if you want TiShadow to automatically push the app to all devices you just enter

and TiShadow will monitor your project for any changes and push new code to all devices.

You can create your own “test” app and use the TiShadow app to have customers test new apps and push new releases instantly if you’d set up a TiShadow server on a public server. When devices connect their logs are sent to the server so if an apps has any problems while customers are testing you have you debuginformation right at your fingertips.

TiShadow is a great tool which IMHO leaves behind the Android/iOS-first approach which is discussed at great length in the Ti-community; with TiShadow you have both platforms right in front of you!

OSX Yosemite performance

Is performance of Yosemite acceptable on your Retina mac?

I use a Macbook Pro 15” with Retina display (late 2013 model).. It packs a Core I7-2ghz processor, Iris Pro graphics, 16Gb Ram and 256Gb SSD.. Should be more that sufficient to keep up with my computing-needs and running Mavericks it did keep up with me.. However, being a sucker for updates I updated my machine to Yosemite last weekend.. #WRONG!

The update itself went without a glitch, within 30 minutes I had Yosemite up & running. Only MacPorts (which I use to get apache/mysql/PHP running) was a bit of work. I needed to install Xcode 6.1 and the XCode commandline tools to be able to compile CMake (which in turn was needed to compile Mysql5.6, which is the replacement for Mysql5.1 which is not supported anymore.. just so you know :). Even Titanium and Ti Studio ran without any problems after the upgrade to Yosemite. All fine and dandy right?? I think NOT

Screen Shot 2014-10-22 at 14.25.12After a morning of regular development work the animation performance went from acceptable to frustrating slow. Animations are choppy, responsiveness is non-existing… all pretty frustrating. Minimising windows is still doable, but using mission control is pretty awful, and I love having multiple desktops and switching between them with mission control ..
Doing a quick search on the internets revealed I was not the only one having these problems; it seems all retina macs which don’t have a discrete graphics-card have these performance problems. I tried resetting PRAM, SMC, reset the keyboard-settings (why?), reduced transparency, followed instructions given in this post .. no avail..
I did some tests with different resolutions-settings.. If I’d set the resolution to the native settings of my mac (using RDM)  the graphics performance went back to acceptable, almost what I was used to getting running Mavericks.. Also if I’d disable HiDPI and use regular 1920×1200 the performance was fine and using my 29” Dell display at 2560×1080 (with my laptop-screen closed!) the graphics performance was better than what I was used to getting on Mavericks .. Sooo Apple;  it seems there’s some issues with drawing HiDPI animations .. If you ask me this is unacceptable for a €2500,- laptop and the high-end operating system they claim to distribute on it..

Some of the results I found searching online for this problem;

  • (the issues discussed seem to occur also on Mavericks)
  • (dutch forum)

So.. what now? Downgrading is not an option, I do have a TimeMachine backup but it would take ages before would have been restored. The answer is simple; disable animations!

I followed the instructions on this page (which talks about Mavericks, but most of it applies to Yosemite  as well), all you need to do in a terminal;

and kill the Dock;

If you need more performance; check out this page.

Update 26-10-2014

Since I have Apple Care I might as well call the tech support, which I did.. I usually don’t think highly of tech support in general but this guy really knew MacOS.. He suggested I’d install a clean version Yosemite in a new partition and to check if performance was still laggy.. So I did; and right from the start animations less choppy and graphics performance overall was a lot better.. So.. it seems the upgrade from Mavericks to Yosemite did mess up some of the drivers of preference files, the techy was not able to tell me which file or driver it could be. He suggested to reinstall Yosemite on top of my existing installation to see if this has any effect.. If it doesn’t I’d be looking at a complete fresh and new install of my MacBook, including al my data, applications, configuration and settings (which takes me about 3 days to get done). For now I don’t have time to do either so I’ll keep using Yosemite with choppy animations and poor graphics performance, but if I have time for this procedure I surely will try out both and report back here.