Hide the top status bar

I developed a desktop software on TX2.I’d like to it display full screen.So I want to hide the top status bar.
My system version is ubuntu 16.04,JetPack-L4T-3.1

Changing the desktop would be an Ubuntu mechanism and not specific to a Jetson. On the other hand, are you wanting just your application to ever be visible, e.g., like a kiosk? A more specific description of what you want to accomplish might provide a better answer.

Yes,I want my application to ever be visible.
So,I need to hide the topbar.

Do you need a desktop environment, e.g., support for multiple GUI apps the user can select from? Is it just your app and no other visible app will ever show?

What I am getting at is that X11 is a single GUI program support environment. By itself, X does not support desktop themes, multiple applications to switch among, stacking one on top of the other, so on…this is all via the window manager. When the system starts X runs and either selects a login manager program or a desktop manager program. Before login, the login manager is the only thing X runs. After login, the login manager overwrites itself and it respawns as running the window manager instead (suid of the user passed on by the login manager). If you do not need the full desktop environment, and if this is to be dedicated to only your single program, then you can substitute your program for a window manager.

If you look at various flavors of Linux you will find they mostly all have X11, but might have different options for which window manager is used. You can treat your program as if it is a window manager if you understand how to customize the select of a window manager. Is this what you want? And if this is what you want, will this program always run as one particular user, or will the user need to log in?

Thank @linuxdev for the suggestion.

If you are using Qt for your GUI toolkit, you can call QMainWindow::showFullScreen and/or set frameless window mode, see here: https://stackoverflow.com/a/25270030

Other GUI toolkits may offer a similar option for fullscreen or frameless window.
You can also create a fullscreen OpenGL window through GLX.

Hi,
I set it QT ,but when I clcik my button on my GUI application it will become visible.
I want to hide the top bar(wifi、En、time),so that the screen area will expand as the attachment.

The top bar interaction is likely that your Qt widget is not full screen even if the base application is full screen. If you do not want an interactive desktop, and if you want just this application or its widgets to be visible, then you would perhaps have to run without a window manager and just run your application in its place.

systemctl disable lightdm.service

do not work.
Besides,I try to uninstall unity and install gnome ,but there is not

sudo /usr/lib/lightdm/lightdm-set-defaults -s gnome-shell

to set the default login desktop environment.

It isn’t the display manager you would need to change…it is the window manager. The display manager (lightdm) essentially sets up the environment (and authentication), and then it starts a session…the session is the window manager which is loaded by lightdm. You could change the display manager if you wanted alternate authentication, or to always have the application run as a particular user without login, but it might be easier to demo something to show what I’m getting at.

Go to a text console, e.g., with CTRL-ALT-F2, and then login as user “nvidia” (or a different user if your application runs under someone else), there’s a simple demo. Now type these commands:

export DISPLAY=:1
startx xterm

What this does is specify a new X server instance (not a window manager, not a display manager), and run as its sole target “xterm” (won’t work very well if you didn’t install xterm, but you could also run something like “lxterm”). Now, if you run this from the xterm, the X server will stop (you won’t be able to see a black cursor on black desktop, but it will be there…just keep moving the mouse to the upper left):

exit

There are also options for setting initial size, color depth, so on.

Any commands you enter in that xterm will run as whoever the user is that ran “startx”. So there is a subtle point: You could add a configuration to the display manager (which handles logins) and offer a different window manager. Or you could replace the current window manager with an alternate window manager. Or you could remove both the display manager and window manager and run a startx instance with only your application. Some applications might require dbus, in which case you can study how startx or the lightdm setup does this (startx is a human readable, and the files for configuring display and window managers in “/etc/” are also human readable even if the application itself is binary).

Can you run your application with the “export” and “startx” option?