Board index FlightGear Support Graphics

Opening FG on a specific screen (Linux)  Topic is solved

Graphics issues like: bad framerates, weird colors, OpenGL errors etc. Bad graphics ar usually the result of bad graphics cards or drivers.
Forum rules
In order to help you, we need to know a lot of information. Make sure to include answers to at least the following questions in your initial post.

- what OS (Windows Xp/Vista, Mac etc.) are you running?
- what FlightGear version do you use?
- what graphics card do you have?
- does the problem occur with any aircraft, at any airport?
- is there any output printed to the console (black window)?
- copy&paste your commandline (tick the "Show commandline box on the last page of FGRun or the "Others" section on the Mac launcher).
- please upload a screenshot of the problem.

If you experience FlightGear crashes, please report a bug using the issue tracker (can be also used for feature requests).
To run FlightGear on old computers with bad OpenGL support, please take a look at this wiki article. If you are seeing corrupted/broken textures, please see this article.

Note: If you did not get a reponse, even after 7 days, you may want to check out the FlightGear mailing lists to ask your question there.

Opening FG on a specific screen (Linux)

Postby Bjoern » Sat Jan 18, 2020 4:54 pm

Does anybody have a working method for opening FG on a specific screen on Linux?

FG version is Next/Git (2019.2.0)
OS is Arch Linux with XFce 4.14, X-Server version is 1.20, proprietary Nvidia drivers.

My monitor setup has a main 22" monitor at 1680x1050 resolution defined a s display 0 and a small 17" monitor at 1280x1024 to the left of it defined as display 1.
Desktop space starts at 0,0 on display 1. The top left of the main monitor is therefor at 1280,0 in desktop space coordinates.

While the Launcher dutifully launches on the screen it is called from, the main FG (OSGviewer) window ALWAYS launches at 0,0, which means on my small monitor. It is automatically scaled down to 1280x1024, although I've defined 1680x1050 as a resolution in the Launcher.
Selecting "fullscreen" in the launcher produces a 2960 pixel wide and 1050 pixel tall window uglily stretched across both monitors.


Things I've tried:

1) Custom XML file with new camera and viewport definitions, lauched by "--config=..." flag. Here's a sample that produces a duplicate UI text and still launches on the wrong display:

Code: Select all
<PropertyList>
  <sim>
    <rendering>
      <camera-group>
        <camera>
          <window>
       <name type="string">main</name>
            <host-name type="string"></host-name>
            <display>0</display>
            <screen>0</screen>
            <fullscreen type = "bool">false</fullscreen>
          </window>
     <viewport>
            <x>1280</x>
            <y>0</y>
            <width>1680</width>
            <height>1050</height>
          </viewport>
        </camera>
        <gui>
          <window>
            <name type="string">main</name>
          </window>
        </gui>
      </camera-group>
    </rendering>
  </sim>
</PropertyList>



2) Devilspie and devilspie2, each with custom rules or scripts. No success either.


I'm starting to think that this is a bug. Has anybody experienced something similar?
Bjoern
 
Posts: 484
Joined: Fri Jan 06, 2012 11:00 pm
Location: TXL (RIP)
Version: Next
OS: ArchLinux

Re: Opening FG on a specific screen (Linux)

Postby Puffergas » Tue Jan 21, 2020 5:50 pm

I start FG in window mode then it can be slid to what ever display. From there it can be set to full screen.

Raspberry Pi4
Puffergas
 
Posts: 56
Joined: Thu Jan 02, 2020 2:09 am

Re: Opening FG on a specific screen (Linux)

Postby Bjoern » Tue Jan 21, 2020 9:43 pm

Puffergas wrote in Tue Jan 21, 2020 5:50 pm:I start FG in window mode then it can be slid to what ever display. From there it can be set to full screen.


Yes, that works and I have to do that, too. But my point is that I do not want to do it in the first place and rather have the FG window open on the correct screen when I start fgfs from the Launcher.
Bjoern
 
Posts: 484
Joined: Fri Jan 06, 2012 11:00 pm
Location: TXL (RIP)
Version: Next
OS: ArchLinux

Re: Opening FG on a specific screen (Linux)  

Postby Bjoern » Sat Jan 25, 2020 1:10 am

Fixed the issue with a new XML config file based on one posted by Torsten D.

Don't mind the framerate throttling and multithreading entries. I've left them in to play around with them.

Code: Select all
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<PropertyList>
<sim>
<!-- frame-rate-throttle-hz type="double">30</frame-rate-throttle-hz -->
<rendering>
   <!-- multithreading-mode>AutomaticSelection</multithreading-mode -->
   <!--multithreading-mode>SingleThreaded</multithreading-mode-->
   <!--multithreading-mode>DrawThreadPerContext</multithreading-mode -->
   <!--multithreading-mode>CullDrawThreadPerContext</multithreading-mode -->
   <!--multithreading-mode>CullThreadPerCameraDrawThreadPerContext</multithreading-mode-->

   <camera-group>

   <window>
     <name type="string">FlightGear (Next)</name>
     <host-name type="string"></host-name>
     <display>0</display>
     <screen>0</screen>
     <fullscreen type = "bool">false</fullscreen>
     <decoration type = "bool">true</decoration>
     <x>1280</x>
     <y>0</y>
     <width>1680</width>
     <height>1050</height>
   </window>

   <gui>
     <window>
      <name type="string">FlightGear (Next)</name>
     </window>
   </gui>

   <camera>
     <name type="string">Main View</name>
     <window>
      <name>FlightGear (Next)</name>
     </window>
   </camera>
   </camera-group>
</rendering>
</sim>
</PropertyList>



Save the code in an empty XML file and then launch it from the QT launcher or command line. See here for a how to:
http://wiki.flightgear.org/FlightGear_configuration_via_XML#Adding_your_own_settings
Bjoern
 
Posts: 484
Joined: Fri Jan 06, 2012 11:00 pm
Location: TXL (RIP)
Version: Next
OS: ArchLinux


Return to Graphics

Who is online

Users browsing this forum: No registered users and 4 guests