Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DISPLAY env variable does not include the Screen number #141

Open
MWASoftware opened this issue Jun 28, 2017 · 1 comment
Open

DISPLAY env variable does not include the Screen number #141

MWASoftware opened this issue Jun 28, 2017 · 1 comment

Comments

@MWASoftware
Copy link

MWASoftware commented Jun 28, 2017

This is a problem I found after upgrading from Mint 17.3 to Mint 18 (both Sarah and Serena) and seems to prevent normal operation of a dual screen X server. It applies to Mate 1.16.1.

I have a three monitor/two video card setup using Nvidia cards and the Nvidia 375 driver. "Screen 0" is configured with two monitors connected to the same video card, while "Screen 1" is a single monitor connected to the other video card.

After upgrade all monitors are working and appear to be working correctly. Screen 0/Monitor 1 has both a top and bottom panel with an active menu as does Screen 1. Screen 0/Monitor 2 just displays the desktop background. So far, all the same as with Mint 17.3. The screen 0 menus and desktop icons work normally. However, the Screen 1 menu while appearing to work normally: the programs it runs appear not on Screen 1, but on Screen 0! The only way that I can get a program to appear on Screen 1 from the menu system is to add a "Custom Application Launcher" to a panel and select the program I want to run.

Digging further from a mate-terminal session run on Screen 0, I find that the DISPLAY environment variable is set to ":0" instead of the expected ":0.0". If I enter a command such as:

DISPLAY=:0.1 mate-terminal&

the terminal does appear correctly on screen 1 (albeit with the warning message "(mate-terminal:6455): Gdk-CRITICAL **: gdk_display_get_screen: assertion 'screen_num == 0' failed" in the original terminal session.

I can now work around the problem by setting up application launchers on the Screen 1 top panel using command lines that set the DISPLAY variable to :0.1. For example:

sh -c "DISPLAY=:0.1 thunderbird %u"

My conclusion is that the problem is somewhere in mate-session. It is correctly detecting the dual screen setup and creating a dual screen desktop environment, but is not adding the screen number to the DISPLAY environment variable. The result is that X clients always connect to Screen 0 regardless of which menu they are launched from


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@sc0w
Copy link
Member

sc0w commented Jul 20, 2017

gtk version before (it works) and after (it doesn't work) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants