Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: Display Fullscreen on Second Monitor

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2013
    Posts
    3

    Display Fullscreen on Second Monitor

    I'm hoping this is an easy question, but I could not find any info in my web searches, so here goes:

    I'm running Linux and my machine has two monitors. I can create OpenGL windows in FullScreen mode on the primary monitor. However, I can't figure out how to tell OpenGL (or glut, actually) to open the FullScreen window on the secondary monitor. Does anyone know how to do this?

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,216
    There are multiple ways to have an X server span multiple monitors, and which method is applicable to you depends on which you are using.

    If you have each monitor set up on its own X screen, then you should be able to force GLUT to put your window on the second monitor by putenv'ing DISPLAY=:0.1 before you call glutInit (haven't tried that myself though).

    To see if this is how you have it set up, bring up a shell window on each monitor and do an echo $DISPLAY. If you see :0.0 on one monitor, and :0.1 on the second monitor, then you have each monitor on its own X screen. Try xclock -display :0.1 or glxgears -display :0.1 -fullscreen

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2013
    Posts
    3
    Thanks for your replay.

    I tried 'glxgears -display :0.1 -fullscreen' amd it didn't work. It couldn't open display :0.1.

    I'm not sure how to create a shell window on the second display: they are always created on the first display.

    Do you know how I can configure the X server to work this way?

  4. #4
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,216
    Ultimately it boils down to cooking an /etc/X11/xorg.conf file. Read the docs on that for details. You want "multiple X screens" (websearch tht). If you're running an NVidia card, you can use nvidia-xconfig to do the config work pretty quickly for various common configs. See the --separate-x-screens option.

  5. #5
    Junior Member Newbie
    Join Date
    Feb 2013
    Posts
    3
    An xorg.conf file? I was hoping you wouldn't say that. This machine does not has an ATI card, so I can't use nvidia-settings. However, I do have access to an Nvidia machine and I tried it and it worked. So I saved that xorg.conf file and hopefully that will help me with on the ATI machine.

    Thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •