How to hide the menubar in Mac OS X (Mavericks) Yosemite while using (OpenNX) X2Go- Tip of the Week

NOTE: I’ve updated the below post after recently upgrading my MBP to Yosemite.
I’ve moved away from using OpenNX to X2Go. This because I found X2Goclient better at handling full screen mode than OpenNX. In X2Goclient, click on the maximise (green ‘+’) button and the X window just fills all the space on the Thunderbolt display.

This also means no more NXserver on the Ubuntu side, especially after upgrading to Ubuntu v14.04.1 – X2Goserver provides all you need on the server side

Follow the instructions here to show you how to add the apt repo to your Ubuntu box

The following combination works for me:

– The latest release of x2Goserver on Ubuntu
X-Quartz-2.7.6 – I found the later version 2.7.7 incapable of allowing X2Goclient to use the maximise button, and was very frustrating with the X window going off screen and becoming inaccessible
x2goclient for Mac OS X, latest release Oct 19

NOTE: When starting up X2Go client and the X window appears, move the window away from the screen edges before maximising – otherwise there is still a chance of maximising into inaccessible space!

The rest of the instructions below about hiding the menu bar still apply to X-Quartz of course

Happy X’ing!!

===

I use a Thunderbolt display attached to my Macbook Pro, and I love the extra screen real estate it gives me.  I was very keen to upgrade to Mavericks so I could use the “Displays have separate Spaces” feature (System Preferences -> Mission Control), which gives each display control over its own Spaces, without mirroring / tying them together.

Along with separate Spaces comes the addition of a separate Dock and Menubar to the second display, which is great – that is, unless your apps or programs can’t hide the menubar in fullscreen mode.  Some apps can, such as Oracle’s VirtualBox, but others can’t.

One such app is XQuartz, which provides the X11 backend to programs like OpenNX and other X aware products.

Prior to the Mavericks upgrade, I could remotely connect to my Linux desktop over OpenNX and having that in fullscreen mode on the Thunderbolt display – it looked just great, and presented in true fullscreen mode – no menubar, and no Dock.  Now however in Mavericks, the menubar is present and stops me from accessing the top bar of my Linux desktop, which is a pain.  No problem with the Dock, however, which you can autohide on the Thunderbolt display (Apple Icon -> Dock -> Dock Preferences)

Blasted menubar, I thought!  No option to hide it!  I did some Googling on this, and it turns out that setting the value of this parameter:

LSUIPresentationMode

… to 4 in the app or program’s Info.plist would hide the menubar.

I tried it, and it works just fine within XQuartz – here’s how to do it from within a terminal session on your Mac:

sudo defaults write /Applications/Utilities/XQuartz.app/Contents/Info.plist LSUIPresentationMode -int 4

sudo chmod 644 /Applications/Utilities/XQuartz.app/Contents/Info.plist

Now I’m back to gorgeous fullscreen mode within OpenNX on my Thunderbolt display, without that pesky menubar

If you want to return to default behaviour, then do:

sudo defaults delete /Applications/Utilities/XQuartz.app/Contents/Info.plist LSUIPresentationMode

sudo chmod 644 /Applications/Utilities/XQuartz.app/Contents/Info.plist

Happy full screening!

About Michael Abboud

Linux / Unix Technical Specialist
This entry was posted in Mac OS X and tagged , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

12 Responses to How to hide the menubar in Mac OS X (Mavericks) Yosemite while using (OpenNX) X2Go- Tip of the Week

  1. …hmmm – just upgraded to XQuartz 2.7.5_rc4 (xorg-server 1.14.4) – broke this workaround!

  2. chatski says:

    Do you know how to force OS X avoid reserving Dock space and make the app fullscreen even if you have Dock visible in other apps?

    • Thanks chatski – apparently, it isn’t possible without also removing other features as well, such as mission control and other functionality. The only workarounds I’ve seen involve moving the Dock to the top of your screen, and making it very, very small in size, and then adding a long autohide delay. But as I say, this is only a workaround.

      • chatski says:

        Thanks anyway. I wonder why Apple made the space reserved: it used to work seamlessly in Snow Leopard.
        Btw, if you mentioned it, can you tell how to place the Dock on the top?) Never seen or tried it.

    • No worries – as for the Dock on top, try this and let me know how you go. From within your terminal app:

      defaults write com.apple.Dock orientation top

      …and to restore to default:

      defaults delete com.apple.Dock orientation

  3. clesenne says:

    Is your keyboard mapping working alright with OpenNX? I never got it to run on OS X – it’s a known issue (http://sourceforge.net/p/opennx/bugs/31/)

    • Hey clesenne – yes, it’s working fine for me, although I definitely experienced keyboard mapping issues previously. I have no problems with that now. I use OpenNX client Version 0.16.0.725 (RELEASE) for Mac OS X, version XQuartz 2.7.5_rc4 , and I run NoMachine 3.5.0-11 server package on my target Linux desktop, running Ubuntu 12.04.3 LTS 64-bit. Hope this helps…

  4. SMcKDaddy says:

    Lovely blog Mr Abboud! ( And we must catch up for coffee sometime soon! ) Thanks for this little nugget. I have a slightly different issue as my mac moves with me – sometimes with an external display, sometimes with the built in retina. So I shall experiment with these one-liners and FastScripts and/or ControlPlane and let you know how it goes.

Leave a comment