How to set full screen in Nano 2G? (using dusty-nv inference)

Hi,

When I use dusty-nv inference, I can set the full screen in nano 4G

But when I run the same code in 2G, there is still a window frame…
May I know how to change to full screen?
Thx

output = jetson.utils.glDisplay()
output.SetFullscreen(True)
...
while output.IsOpen():
  output.RenderOnce(img,img.width, img.height,x=0,y=0)

Full test video-viewer code

#!/usr/bin/env python3
#
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#

import sys
import argparse
import jetson.inference
import jetson.utils

from jetson_utils import videoSource, videoOutput, logUsage

# parse command line
parser = argparse.ArgumentParser(description="View various types of video streams", 
                                 formatter_class=argparse.RawTextHelpFormatter, 
                                 epilog=videoSource.Usage() + videoOutput.Usage() + logUsage())

parser.add_argument("input_URI", type=str, help="URI of the input stream")
parser.add_argument("output_URI", type=str, default="", nargs='?', help="URI of the output stream")

try:
	opt = parser.parse_known_args()[0]
except:
	print("")
	parser.print_help()
	sys.exit(0)

# create video sources & outputs
input = videoSource(opt.input_URI, argv=sys.argv)
#output = videoOutput(opt.output_URI, argv=sys.argv)
output = jetson.utils.glDisplay()
output.SetFullscreen(True)
# capture frames until user exits
#while output.IsStreaming():
while output.IsOpen():
	img = input.Capture()
	#print(image)
	output.RenderOnce(img,img.width, img.height,x=0,y=0)
#	output.Render(image)
#	output.SetStatus("Video Viewer | {:d}x{:d} | {:.1f} FPS".format(image.width, image.height, output.GetFrameRate()))
	



Hi,

Do you mean the output.SetFullscreen(True) is working on Nano 4GB but not working on Nano 2GB?
Thanks.

Yes, you can also try my sample code in 2G. Still have the window frame…

Thx

Hi @AK51, I think it is a difference of the Nano 4GB using GNOME while the Nano 2GB uses LXDE window manager to save memory. What I do to enable fullscreen is set the NET_WM_STATE_FULLSCREEN atom, but I’m not sure what’s different required in LXDE (or if LXDE even supports it). Regardless you can find the code here to play around with if you want:

Hi,

Seems complicated…

Plan B,
I hided the task bar below
In the window, I made the title font size to 1.

It is ok for me. :P

And something funny, if I run the code, there is a title bar.
But if I make the code to run at the start-up, it is a full-screen.

Anyway, that is what I want, “run full screen at start-up”.

Thank you AastaLL and Dusty

Cheers,

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.