Software

I have been unsuccessful in finding a permanent working solution for audio forwarding over NoMachine using an Arch Linux host. I had raised issues on both the Arch Linux Forums as well as the NoMachine Forums. A trouble report was created to track this issue.

I have found a temporary workaround which results in pulseaudio being successfully forwarded over NX, but it must be applied each time a NoMachine connection is established. It requires logging in as the superuser to be able to search through some NoMachine logins which are not viewable as the default user:

 ➜  su - 
Password: 
➜  
➜  cd /usr/NX/var/log
➜  grep -r -n 'native.socket' . 


./nxserver.log:1179:2016-08-18 11:40:53 805.980 14969 NXNODE   WARNING! Could not load module native with name: /usr/NX/var/run/nxdevice/D-1001-CCDE160BF6050EDC229A1FDD4CB7FD12/audio/native.socket.

You should see a bunch of entries similar to the one above. The expected audio module at the specified location does not exist, but you can quickly create a symlink at that location pointing to /run/user/1000/pulse/native assuming your default uid is 1000 using a command such as the follows:

ln -s /usr/NX/var/run/nxdevice/D-1001-CCDE160BF6050EDC229A1FDD4CB7FD12/audio/native.socket /run/user/1000/pulse/native

Check that your audio output isn’t muted or at low volume, and you should now be able to hear audio forwarded from the guest machine.

If anyone knows of a permanent solution, please share.

A while back I wrote a blog post about Mobizen — an app to access your Android device over USB or via a local or remote network connection. Another app that deserves attention in this space is Vysor, which has a similar feature set with a focus on screen mirroring/remote screen.

After (re-)trying it out a few weeks ago, AirDroid is now my current favorite app in this space as I believe it has the widest variety of features as well as highest-quality mirroring options. Like Mobizen, Airdroid has an app for Windows and OS X and a “Chrome App” can be created for use on Linux, or simply https://web.airdroid.com.

AirDroid screenshot - notifications

AirDroid screenshot - AirMirror using OSX app

Enjoy!

I compiled this map using addresses from Wave G’s building list by fetching the list of apartment buildings and their addresses with a mini-project that I have started work on:

https://github.com/nickmcummins/gpx-tools/tree/master/scrappers/wavegbuildings

I then geo-coded the addresses into GPS coordinates, compiled a GPX file containing each location as a waypoint, and then imported the GPX into Google My Maps. This is the first in some projections I plan to work on that retrieve address/GPS coordinate data from the internet and compile it into embedable maps.

I’ve been trying to find a good equivalent for the popular iTerm2 app which can be used in place of the default OS X terminal emulator. Konsole is a great option, but it’s split window functionality is pretty bad. While it does allow one to have two different terminal tabs open in the same window, it by default creates a clone view into the current terminal tab, without an easy way to eliminate this duplicate “pointer” (that is a reference to C/C++ pointers, yes). There was a bug filed for getting that behavior fixed back in 2009, and even a fork implementation of Konsole in progress, but as of 2016, that project has all but been abandoned. Locally compiling and running this forked version of Konsole on a non-KDE environment didn’t result in very much (it ran, but it had only very basic terminal emulator functionality, and no way to split windows, which was the entire point).

While reading the thread about that bug on Konsole’s split window behavior, I came across a worthy alternative: Terminator, which was originally known as Gnome Terminal but has now been genericized to be non-GNOME-specific. And it actually works!

Terminator app screenshot with split window

You can build it from the source code on launchpad or install via your distro’s package repositories. For Arch:

sudo pacman -S terminator

axel is a command-line utility, similar to curl and wget. In fact, axel can be substituted for wget for the most part, sans the additional options it provides (and vice-versa).

It can be installed on OS X through homebrew.

brew install axel

An anecdotal example seen in the screenshots below. axel downloads a 11.38 GB file at a rate of 56.46 MB/sec, compared to 27.3 MB/sec with wget. Of course, depending on numerous different factors, there may be little difference between the comparative download speeds, or even the opposite pattern.

axel download rate example

wget download rate example

It certainly does not hurt to have both tools in your toolkit! See also details of package axel on debian.org.

  1. Firstly, proceed with the following instructions at your own risk. I assume no responsibility for lost data or broken using experiences as a result of this workaround. In general, it is unlikely that any irrevisible changes will happen as a result of importing an extension that has not been tested for your installed version of Firefox/Thunderbird, as you will most likely be able to just uninstall it if it does not work as desired.
  2. Download the *.xpi file using a browser other than Firefox. This seemed to be the only way that I was able to actually “Download Anyway” an extension.
  3. Using an archive manager, open the downloaded *.xpi file. I used Engrampa which is part of the MATE desktop, but that by no means is exclusive. Inside this archive, you’ll want to modify a file named install.rdf:
    <?xml version="1.0"?>
    <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:em="http://www.mozilla.org/2004/em-rdf#">
    
    <Description about="urn:mozilla:install-manifest">
    <em:type>4</em:type>
    <em:id>{77d2ed30-4cd2-11e0-b8af-0800200c9a66}</em:id>
    <em:version>14.0</em:version>
    
    <!-- Target Application this extension can install into,
    with minimum and maximum supported versions. -->
    
    <em:targetApplication>
    <Description>
    <!-- Firefox's UUID // DO NOT CHANGE-->
    <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
    <!-- End Firefox's UUID // -->
    <em:minVersion>44.0a1</em:minVersion>
    <em:maxVersion>45.*</em:maxVersion>
    </Description>
    </em:targetApplication>
    <em:unpack>true</em:unpack>
    
    <!-- Front End MetaData -->
    <!-- My_Theme -->
    <em:name>FT DeepDark</em:name>
    <em:description>Smooth dark theme for Firefox</em:description>
    <em:creator>Stefano</em:creator>
    <em:contributor>Stefano</em:contributor>
    <em:homepageURL>http://www.stefrosselli.com</em:homepageURL>
    
    <em:internalName>ftdeepdark</em:internalName>
    </Description>
    
    </RDF>
    

    Bump up the version of em:maxVersion to be inclusive of the version of Firefox/Thunderbird you are using, save the file and update the archive with the updated version of that file, and now manually import the extension as a file.

    In many cases, such as themes, this has worked for me well with the Nightly channels of Firefox and Thunderbird (50.0a). Below is a screenshot of the elementary Thunderbird theme installed successfully on Daily (50.0a).

elementary Thunderbird theme on Daily

By default, JetBrains products (IntelliJ, WebStorm, etc) products default to a very small minimum (128 MB) and maximum (750 MB) Java Heap Space:

➜  ps aux | grep -i webstorm 
..
nick     22103  383  2.7 6838044 901056 .. /usr/lib/jvm/default/bin/java -agentlib:yjpagent-linux64=disablealloc,delay=10000,sessionname=WebStorm2016.2 -Xbootclasspath/a:/opt/webstorm-eap/bin/../lib/boot.jar -classpath /opt/webstorm-eap/bin/../lib/bootstrap.jar:/opt/webstorm-eap/bin/../lib/extensions.jar:/opt/webstorm-eap/bin/../lib/util.jar:/opt/webstorm-eap/bin/../lib/jdom.jar:/opt/webstorm-eap/bin/../lib/log4j.jar:/opt/webstorm-eap/bin/../lib/trove4j.jar:/opt/webstorm-eap/bin/../lib/jna.jar -Xms128m -Xmx750m -XX:ReservedCodeCacheSize=240m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -XX:MaxJavaStackTraceDepth=-1 -Dawt.useSystemAAFontSettings=lcd -Djb.vmOptionsFile=/opt/webstorm-eap/bin/webstorm64.vmoptions -XX:ErrorFile=/home/nick/java_error_in_WEBIDE_%p.log -XX:HeapDumpPath=/home/nick/java_error_in_WEBIDE.hprof -Djb.restart.code=88 -Didea.paths.selector=WebStorm2016.2 -Didea.platform.prefix=WebStorm com.intellij.idea.Main
..

Depending on the amount of memory (RAM) available on one’s machine, it may be desirable to bump up these values by simply modifying the appropriate *vmargs file. This will depend on one’s installation directory, which will vary by operating system. For me, running sudo vim /opt/webstorm-eap/bin/webstorm64.vmoptions and updating my JVM args as reflected below

-Xms8g
-Xmx24g
-XX:ReservedCodeCacheSize=1024m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-XX:MaxJavaStackTraceDepth=-1
-Dawt.useSystemAAFontSettings=lcd

My machine has 32 GB of RAM, so much higher values were appropriate. I also bumped up the value for ReservedCodeCacheSize which has a maximum allowed value of 1024m. I will need to re-start WebStorm after making this change to the webstorm64.vmoptions file, but I should now see these parameters reflected in the running webstorm process that I can check as shown above in the initial step.