Correcting Anypoint Studio Display Scaling (Windows)

On a recent reinstall of Anypoint Studio I found the IDE really doesn’t scale well on some external monitors, but luckily there is a simple fix…

Recently I had to reinstall the MuleSoft IDE, Anypoint Studio (v7.12.1), on a clean Windows build and I noticed when I started Studio that it looked very “big” on my external monitors compared to my laptops screen. The icons were big, the text was big and all that extra space they take up means you just cant’ see as much at once. Either you have to make your palette, explorer, properties (etc.) panes so much bigger that they encroach on your flow design pane or you just accept that they get truncated.

With default scaling, the text and icons are massive, meaning you either expand the palette, explorer and properties panes to show the content, reducing the space left for your actual design work, or you have a LOT of scrolling to do any time you want to find something in those panes.

For context, the laptop was a Surface Laptop 3 which had just been “migrated” back from Windows 11 to Windows 10. According to wiki, that means the 13.5″ internal screen has a resolution of 2256 x 1504, at 201 PPI. Since my external monitors were 22″ with an HD (1920 x 1080) resolution, I assume this is caused by Eclipse (which is the base of Anypoint Studio) not adjusting correctly when I move Studio from my main, internal display to the external monitor.

How to fix the scaling issues in Anypoint Studio

There is a fix to this, although it’s not perfect. The display seems to be much better if you override the “High DPI Scaling” behaviour for Studio. To do this:

  1. Find the AnypointStudio.exe file in your Studio home directory, right-click and open Properties.
  2. In the Compatability tab, under the Settings section click “Change high DPI settings”
  3. In the dialogue that pops up, tick the “Override high DPI scaling behaviour” box and select “System (Enhanced)”.
Using the System (Enhanced) High DPI scaling option gives you much more sensibly sized text and icons, enabling you to see more at any one time and have that vital extra real estate for your flows. In this image the flow pane is a little bigger where I’ve reduced the size of the other panes around the edge, but you can also fit much more in those edge panes. If I were to reduce the size of those panes to show the same content as before you’d have even more room in your main design pane, but this seems like a good compromise.

Et voila. It does produce this interesting tiling in the splash image when you’re loading up Studio, which is not inconsistent with MuleSoft’s general approach to testing Studio on Windows I suppose, but that is significantly preferable to the default “giant text and icons” on the external monitor.

Anypoint Studio splash screen, tiled in a 2x2 layout.
This fix/workaround does solve the display issues in Anypoint Studio but this ‘bug’ in the splash screen does rankle a bit!

If you’ve found another way to resolve this issue please let me know in the comments.

Local Home Network DNS – how hard can it be?

So I wanted to do something I thought would be fairly straightforward.  I have a home network with a PlusNet-provided Technicolor Gateway router and behind that I currently have my (Windows 7) laptop and my HP Proliant Microserver running Lubuntu.

In addition to a media server I want to use my Lubuntu box as a development environment for multiple websites, but I want to be able to access each website from the laptop.

Running multiple sites is easy enough with Apache’s Virtual Hosts feature, and I can configure the /etc/hosts file on my server to let me access them locally.  However I want to be able to do the actual work /testing on my laptop (for starters) and have an easy to remember name for each of the virtual hosts.

So here’s what (I think) I need to do:

  1. Install Apache (and PHP/MySQL) and configure the virtual hosts – check.
  2. Set up a DNS server on my server
  3. Configure the laptop to query that server for DNS (preferably through the router config so it applies to the whole network…) let’s come to that later.

Piece of cake, right?  Read on for completion of step 2.

Continue reading “Local Home Network DNS – how hard can it be?”

Android Studio Debugging with Nexus 4 Google Driver

Recently I’ve been thinking of dipping my toe back into the world of Android app development and discovered that there is a new IDE on the block in the form of the Android Studio.

I installed this on my (Windows) machine, which isn’t a speed demon by any stretch of the imagination, and tried to run a “Hello World!” program on the emulator but it was taking 10 minutes for the emulator to start and it was still just showing the android boot screen, so I decided to try it out on my Nexus 4.

I followed the standard advised steps, enabling USB debugging and setting the USB mode to PTP, but the phone didn’t appear when I connected it and went to Run the package from Android Studio.  Further, the drivers wouldn’t install properly.  Advice seemed to be to go to Device Manager and install from <sdk>\extras\google\usb_driver\ – but there was no usb_driver folder there.  However you can  install this from the “SDK Manager” from the Android Studio toolbar.

Screenshot of Android Studio toolbar highlighting SDK Manager button
SDK Manager button on Android Studio toolbar

This will open the SDK Manager which seems to contain optional components that you can install alongside the Android Studio.  In this case I was looking for the Google USB Driver which is listed under “Extras”.

Continue reading “Android Studio Debugging with Nexus 4 Google Driver”

Updating Subversion on Lubuntu 12.04

I’m trying to get reacquainted with Subversion having not used it since my student days and was happy to find it was already installed on my Lubuntu 12.04 (either by default or because I’d previously installed it).

What I didn’t immediately realise was that the version installed was neither the latest (1.8) or the latest stable (1.7) version, but 1.6.  (You can check the version of the installed SVN server using the command svnadmin --version

Since I have automatic updates on I thought that was a bit strange so got to Googling and came across Kovstantin Kovshenin’s post Subversion 1.7 on Ubuntu 12.04 which helped.

Essentially I needed to add a couple of lines to my /etc/apt/sources.list file to reference a PPA from launchpad.

deb http://ppa.launchpad.net/svn/ppa/ubuntu precise main
deb-src http://ppa.launchpad.net/svn/ppa/ubuntu precise main

and then update subversion using apt-get at the command line:


sudo apt-get update
sudo apt-get install subversion

This is the point in the instructions where I hit a problem, getting the error message:

W: GPG error: http://ppa.launchpad.net jaunty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY XXXXXXXXXXXXXXXX

Where XXXXXXXXXXXXXXXXX is a string of hex characters. The solution, as described here, was to update the list of GPG keys stored by Lubuntu using the command


sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys XXXXXXXXXXXXXXXX

Doing this and repeating the update commands above solved my problem, and rerunning the version check presented me with:

svnadmin --version
svnadmin, version 1.7.9 (r1462340)
compiled Apr 6 2013, 21:23:46

Swap UK Keymap for US on Lubuntu using XRDP

OK so my home server is up and running at my new place and I have been tinkering, installing Ruby etc. and as I started writing a bit of code I realised I couldn’t tolerate the getting a US keymap any more.

I hasten to add that this problem only occurred when I logged in over Remote Desktop so I figured it was something to do with XRDP – and I was right.  Thanks to a very useful post at Component Parts, I was able to update it in just a few minutes.

Just download the keymap file (km-0809.ini) into the XRDP keymaps directory – /etc/xrdp/ – and then run:

sudo chown xrdp.xrdp /etc/xrdp/km-0809.ini
sudo chmod 644 /etc/xrdp/km-0809.ini
sudo service xrdp restart

I suspect you’ll want to log out of Remote Desktop and use a shell client like PuTTY for that last part – I assume if you restart the xrdp service while you’re connected to the server, you’re gunna have a bad time!

Lubuntu Update Manager Won’t Install Updates – Doesn’t Ask For Password

My Lubuntu is annoying me. Again. When I login to Lubuntu over remote desktop from my laptop, I often find Update Manager popping up to tell me there are updates, so being the security-conscious person I am I click on “Install Updates” – at which point the system thinks about doing something but then decides to do nothing at all instead.  The Update Manager window stays open and there is no error message but it’s clear nothing is happening.

Screenshot of Update Manager at login showing updates to be installed
Lubuntu 12.04 Update Manager

What should happen is it should ask for my Admin password to install the updates but it won’t.  It seems there is a similar known issue with “muon” (the update manager) in Ubuntu 11.10, but I’m on 12.04 and this was supposedly resolved.  Also the other reports seem to refer to error messages which I’m not getting.

A mystery for now but I’ve posted a query on Ubuntu Forums to see if I can get any help there.

Adding DNS Server to Lubuntu 12.04 with Webmin

I’m trying to set up my Lubuntu box as a test server for some web development (PHP) work and have decided this means running a DNS server so I can set up my own domain names (site1.local, site2.local etc).

A quick Google suggests installing and configuring a DNS server manually could be painful, and it looks as though the simplest way to do this would be to use Webmin*, a web based interface for administering Unix-like systems.

Unfortunately when I followed the Webmin install instructions I got an error telling me that:

W: Failed to fetch http://webmin.mirror.somersettechsolutions.co.uk/repository/dists/sarge/Release Unable to find expected entry ‘contrib/source/Sources’ in Release file (Wrong sources.list entry or malformed file)

W: Failed to fetch http://download.webmin.com/download/repository/dists/sarge/Release Unable to find expected entry ‘contrib/source/Sources’ in Release file (Wrong sources.list entry or malformed file)

Looking at the messages you can see it is failing to find some files called “sources”, which explains why the solution I found at SuperUser worked.  Just tell apt-get to stop looking for sources!  When you add the repositories in the install instructions, it looks like Linux is adding the corresponding source repositories, when all we really want are the binaries to run the program.  So you can either manually edit /etc/apt/sources.lst and comment out the offending lines (which should be at the end of the file and prefixed with deb-src) – or you can use Ubuntu’s “Software Sources” utility and just remove them.

Now you can run apt-get install webmin again and it should be fine.

* Actually, the simplest way is probably to just edit the HOSTS file on my laptop(s) as I’ve done previously, but I’m trying to do this in some way ‘right’.

PowerPoint Tip – Rename Objects Using Selection Pane

I’m putting together a PowerPoint 2007  slide at the moment and wanted to add some custom animation to ensure objects in a diagram appear one at a time.  Simple enough, but there are 20 odd pictures on the slide and having them all with generic names like “Picture 1”, “Picture 2”, “Picture 3” etc. was annoying me.

I know that if I ever want to change the order for whatever reason it will just be irritating, so I wanted to change the names but couldn’t see an obvious way to do this (in other words, right-clicking didn’t work!  Worse, there was nothing in the context-speicfic “Format” panel of the ribbon).  What to do.

It took some slightly less than intuitive Googling but I found Ellen Finkelstein’s post on her PowerPoint Tips blog: “The wonderful Selection pane lets you easily hide objects, select them and even rename them” – which did exactly what I wanted.  Cheers Ellen.

You just need to go to the Home tab -> Editing panel and choose Selection -> Selection Pane.  Then you can just edit the names of any objects on the slide. Easy.

PowerPoint 2007 screen shot illustrating the location of Selection Pane under Selection in the Edit pane of the Home tab
The Selection Pane under Selection in the Edit pane of the Home tab in PowerPoint 2007 (click to enlarge)

PS – I haven’t got PowerPoint 2010 to verify this yet so let me know if something similar works there.

Setup HP Proliant Microserver with Lubuntu & Remote Desktop (RDP)

I had had a few goes at installing Linux on my HP Proliant Microserver N40L fairly recently and thanks to a recent cockup involving an OS corruption, I’ve been presented with an opportunity to start from scratch again and document exactly what I want to do and why.

First, my rationale for purchasing the server.  Well aside from the fact that it only cost me in the region of £130 after cashback, I did actually believe I had uses for a low-powered, energy-efficient server, namely:

  • Sharing files across the home network (2-3 Windows laptops, 1 Windows PC and a couple of android mobile phones and an Android tablet)
  • Remote access to said files via SFTP
  • Streaming media to a PlayStation 3
  • Potential future ventures such as coding, developing/hosting websites, running a DNS server and other assorted geekery.

First thing’s first – get the OS installed!

After some experimenting I eventually settled on Lubuntu as my Linux distribution.  Fedora had refused to work with Wake on LAN and Lubuntu is a cut-down, light-weight variant of the Linux distribution I know best, Ubuntu, which replaces the rather ‘heavy’ GUI with something more light-weight – LXDE.
Installing Lubuntu itself is pretty straightforward, just download it from Lubuntu.net, use Live USB Creator to create a bootable SD (since the N40L has no optical drive) and run the installer.

Remote Working

Now since I don’t have a dedicated monitor for the server, the first thing I want to do is get it set up for Remote Desktop.  You obviously need some sort of RDP server like xrdp to do this.  Easy, either install it from the Synaptic Package Manager or hit up the terminal with:

sudo apt-get install xrdp

Now, this allowed me to connect to the server but when I try to login I get a message that just said “Error – problem connecting”.  Eventually I tried to connect from PuTTy and realised that I hadn’t installed an SSH (secure shell) server this time.

Connection Log <br />connecting to sesman ip 127.0.0.1 port 3350 <br />sesman connect ok <br />sending login info to sesman <br />xrdp_mm_process_login_resposne: login successful for displa[truncated] <br />started connecting <br />connecting to 127.0.0.1 5910 <br />tcp connected <br />error - problem connecting
Error received trying to connect to Lubuntu server from Remote Desktop Connection in Windows 7
At this point I wish I could tell you how I fixed the problem, but the  sad truth is I’ve no idea. I installed an SSH server (sudo apt-get install openssh-server) and this seemed to allow me to connect, but displayed a blank screen with an X-shaped cursor.  I resolved this by some editing the configuration XRDP uses to kick off a new session, but then when I uninstalled the SSH server everything still worked.

The answer to the desktop was to edit the file /etc/xrdp/startwm.sh – replacing the last line (a call to /etc/X11/Xsession) with:

exec /usr/bin/lxsession -s Lubuntu -e LXDE

Et viola le desktop.

Lubuntu Desktop through Remote Desktop Connection
Lubuntu’s LXDE window manager showing through Remote Desktop Connect.

Massive thanks to celem at UbuntuForums.

PS3 Media Server As A Linux Service

In a previous blog I detailed how I’d managed to get PlayStation 3 Media Server (PMS) up and running on my Lubuntu box, and had it starting automatically.  At this stage there were 2 problems with the setup:

  1. PMS was running as root, which is a self-evidently Bad Thing TM
  2. It was serving every folder from “/” downwards – when all I really wanted was a TV and a Film folder, both mounted under /media

So my goal for today was to complete the following steps to rectify this and have my PMS running on startup, and only showing the correct folders.  My plan was:

  1. Create a user (‘pms’) to be responsible for running the PlayStation 3 Media Server program (reference)
  2. Give the user (minimal) permissions needed to do this (reference 1, reference 2)
  3. Change my startup routine to make sure the PMS started as the right user
  4. Sort out the configuration so only the right folders are shown to the clients

So let’s get started

Continue reading “PS3 Media Server As A Linux Service”