Fullscreen application in Ubuntu



  • I am having troubles with getting rid of the Ubuntu desktop environment.

    Eventually I tried

    MainWindow::showFullScreen();
    

    which did the thing but! As soon as I open a different window like my keyboard or settings menu. The desktop comes back. And I don't want my keyboard to be fullscreen.

    Is there a way to prevent the desktop from popping up?


  • Qt Champions 2016

    Hi
    It depends on what windows manager you are using.
    Some will allow , some will not.
    Unity did not work for me in this regards.

    What is the use case ?



  • Ehm the default environment of 16.04 LTS. Which should I download?

    EDIT:
    With the Raspberry PI (Raspbian) I never had this problem because... there was no window manager. It had as disadvantage that I had to give sub menus different colors so they would not 'merge' with the mainwindow but the advantages were great, you could not move the sub-menus (a pro for my device).

    I don't know how these window managers work or how I can remove/turn it of?


  • Qt Champions 2016

    @bask185

    Hi
    What you seems to want is kiosk mode.
    Then only your app runs. nothing else.

    https://askubuntu.com/questions/132262/booting-in-kiosk-mode

    If this is not what you want, please take the time to explain what your app does
    and why you want to run it in full screen and block menu etc.

    regarding the window manager
    https://en.wikipedia.org/wiki/Window_manager



  • @mrjj
    My app wil be used on a touch panel PC. This PC will serve as a Human Machine Interface and will communicate with certain machines over it's serial port.

    The kiosk mode seems a rather difficult solution. The machine must boot automatically to the app but from what I see of that kiosk mode you cannot even acces the CLI. And I would need an extra user account to keep root acces. And I am not seeing guarantees that I won't be seeing the grey bar on top of the screen. If that one would be removed, can I than even log out??

    I'd prefer a different solution like disabling the window manager or installing a different desktop environment. And I don't know if Qt happens to have a simple solution similar.

    alt text
    alt text
    http://i394.photobucket.com/albums/pp24/Sebastiaan_Knippels/less_fullscreen_zpsere3jclw.png?t=1499763809

    EDIT: I've solved the problem with thanks to the ubuntu forum. I got directed at this link:
    Start ubuntu without a desktop environment but start an X application

    Anyways tnx for your help mrjj


  • Qt Champions 2016

    @bask185
    ok super.
    that is similar to kiosk mode but less restricted.

    ps. all your images shows as
    alt text



  • @mrjj

    Meh, I ran into 2 new problems :-(

    The first problem is that I cannot set up a serial connection. I know that this is because the serial ports (atleast the USb port) have no permissions. As I launch the app via a shellscript I added a line of code before the app starts. I added

    sudo chmod 777 /dev/tty*
    

    If I boot to the normal desktop and run this shellscript I need to enter my password and it works. Than I can log out and log into the GUI desktop and then it can set up a connection. But if booting to the GUI desktop is the first thing of the day, it won't set up a serial connection. So that is a problem. I just have to fill in the damned password before I can connect.

    The second problem is that I have no longer an output on the CLI. If I run into a bug I need to be able to see the last transfer on the CLI to find the bug. I also need to be able to close the app and restart it via SSH so I can have the debug texts on my work PC. But this also cannot be done.

    And I don't know why these images won't get shown. I used photobucket like I always do. I see that I left a URL below the 2nd image, perhaps can you click that one?



  • @bask185
    Hi,
    as for serial port access it is rather system problem than Qt. I personally detest *buntu distros for many reasons but from top of my head:

    1. if you have modemmanager installed - that may cause problems with unrestricted access;
    2. user account that tries to access serial ports has to be a member of appropriate group, as far as I remember on Ubuntu it was dialout.

    Secondly - to gain the output properly have you thought about dumping all the output to dedicated log file?
    As for shutdown and similar - there is a console tool named htop which is a very handy process manager. For the sake of management I would suggest rather writing a simple console control program that would communicate with the main one to request restart/shutdown etc.

    But again - that is just from the top of my head and may not be accurate since I do not know your exact use case and system config.

    Cheers


  • Moderators

    @bask185 Actually there should be a user group having access to serial port. Can you post the output of

    ls -lh /dev/tty*
    

    ?
    If there is such a group than just add your user to it (see /etc/group). Then there is no need for chmod.



  • @artwaw said in Fullscreen application in Ubuntu:

    @bask185
    Hi,
    as for serial port access it is rather system problem than Qt. I personally detest *buntu distros for many reasons but from top of my head:

    1. if you have modemmanager installed - that may cause problems with unrestricted access;
    2. user account that tries to access serial ports has to be a member of appropriate group, as far as I remember on Ubuntu it was dialout.

    Secondly - to gain the output properly have you thought about dumping all the output to dedicated log file?
    As for shutdown and similar - there is a console tool named htop which is a very handy process manager. For the sake of management I would suggest rather writing a simple console control program that would communicate with the main one to request restart/shutdown etc.

    But again - that is just from the top of my head and may not be accurate since I do not know your exact use case and system config.

    Cheers

    @jsulm said in Fullscreen application in Ubuntu:

    @bask185 Actually there should be a user group having access to serial port. Can you post the output of

    ls -lh /dev/tty*
    

    ?
    If there is such a group than just add your user to it (see /etc/group). Then there is no need for chmod.

    I added myself to 'dialout' and it actually works :D I will do the same on my work PC as well. I added the chmod to .basrc so every time I open up the terminal I must enter my passwd or Ctrl C out it :D

    As for the other part, I suppose I have to use a log file. I mean I still get to scp it to my work PC and acces it on the panel PC as well. And his has as bonus effect that the 'history' is longer than the CLI's :D

    Gents, I call this day a win!



  • @bask185 I am happy you got it working the way you wished for! Good luck!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.