Run 4 Ignition Desktops on 4k Diplay

Hi All,

Looking for a little guidance on opening 4 desktops at 1080P resolution in a 2 by 2 matrix on a single 4k display. I have tried using the system.gui.openDesktop in the client event script which works but each desktop including the main that are opened are all full screen and fill the entire display. I don’t think I want to launch windowed mode and I do not want the box around the view client. Is there a hack in the settings I can use to make this work?



Could you do 4 x 1920x1080 windows instead? Then you can have the client launch in full screen but get your 2x2.

Not a bad idea but the app has already been developed out and it isn’t setup in that fashion.

Open the desktops in windowed mode instead of fullscreen mode, setting the size and location of each appropriately to get your 2x2 tiled display.

If you’d like to eliminate the window title bars and frames, run something like this in each desktop (works from a button, you probably want to adapt it to a window opened event, or something similar–conditioned on which computer it is opened on if this is opened on other clients that won’t want this layout):

from javax.swing import JFrame
# Get parent window of button.
window = system.gui.getParentWindow(event)
# Get parent JFrame.
while not isinstance(window, JFrame):
	window = window.getParent()
# Hide JFrame so we can change its decorated state.
# Remove frame and title bar.
# Display JFrame.

I tried this but each window can be moved around and i am afraid they would have them all closed in no time.

Did you try setUndecorated on each desktop’s JFrame with code something like above after opening, sizing, and positioning via system.gui.openDesktop?

If the above code ran on each desktop’s JFrame, you should see no title bar (so no min/max/close buttons) and no window frame/box around each desktop/window making them a little more difficult to move or close. This won’t prevent access to the taskbar–though neither does fullscreen mode if a keyboard with Windows key is available (assuming this is on Windows).

I expect this would give you the 2x2 tile of apparent fullscreen mode that you’re looking for, except that they won’t cover the Windows taskbar.


Could I roll this extra scripting into the client startup script that is conditioned for specific hosts only? Or does it have to exist on every window in the project?

I haven’t tried this in a client startup script, but system.gui.openDesktop returns a reference to the new desktop’s JFrame, so I expect you could integrate the removal of frames’ decoration something like this:

hostNames = ["HostNameThisAppliesTo","AnotherHostNameThisAppliesTo"]
if in hostNames:
	# Open and setup top left desktop.
	windows = ["Main Windows/Main Window", "Navigation"]
	desktop = system.gui.openDesktop(width=1920,height=1080,x=0,y=0,windows=windows)
	# Add additional desktops with desired windows, size, and location...

I can definitely give this a shot. Would I also need to perform this scripting on the original JFrame opened by opening the vision client in addition to these “extra” desktops I am opening?

That’s right; you’ll want to strip the title bar and window borders from your original window too. You’ll probably need something closer to the first code I posted above for that, referencing the window you open in your client startup script:

from javax.swing import JFrame

hostNames = ["HostNameThisAppliesTo","AnotherHostNameThisAppliesTo"]
if in hostNames:
	# Setup initial desktop.
	desktop = system.nav.openWindow("PathToWindow")
	while not isinstance(desktop, JFrame):
		desktop = desktop.getParent()
	# Open and setup top right desktop.
	windows = ["Main Windows/Main Window", "Navigation"]
	desktop = system.gui.openDesktop(width=1920,height=1080,x=1920,y=0,windows=windows)
	# Add additional desktops with desired windows, size, and location...

@witman this worked a treat! Many thanks!!!

1 Like

I know the solution is already given. But we’ve also had a case where we had to support 4K screens, and they expected more content on the 4K screen than on the regular screens.

Our solution was to simply develop each screen as a template. For the small screens, use those templates directly into a window. And for the big screen, show 4 of those templates.

Even if the application is already developed, it’s usually not that hard to copy-paste all content from a window to a template.