[kde-linux] Re: Setting DISPLAY variable on quicklaunch entry not working

Duncan 1i5t5.duncan at cox.net
Wed May 11 06:32:41 UTC 2011


Allistar posted on Wed, 11 May 2011 16:25:46 +1200 as excerpted:

> I've just updated KDE to 4.6.2 on Gentoo Linux and to my surprise Plasma
> now works on my second screen (screen in the X sense, not in the
> physical monitor sense). Previously the only way to get am accelerated
> triple head setup was to run e16 on the 2nd screen.

Cool.  I'm running dual-monitor but single card and therefore single X 
screen.  But I had triple-monitor (dual X screen) years ago, and am 
familiar with all the howls of pain when kde4 originally wouldn't work 
with multiple screens and no xinerama (aka, in zaphod mode).

So it's good to see reports that it's working now.

Tho I didn't see you mention whether you're in zaphod or xinerama mode, 
but it appears given the separate instances comment below, that you mean 
zaphod mod.

> This means I now have two instances of KDE running, with 2 instances of
> the plasma desktop. All good so far. When I add a panel to the second
> plasma instahnce and in that panel I add the "Quick Launch" widget. To
> that I add an icon for Konsole. When clicking on that icon it always
> starts Konsole up on screen 0, not screen 1.
> 
>   Setting the icon command to be:
> 
> DISPLAY=":0.1" konsole
> 
> Doesn't work - it still starts it up on the wrong screen.

That's not surprising.  The environmental variable setting mechanism you 
used there is a shell concept.  AFAIK, the launcher doesn't launch a shell 
first, but instead, uses the existing environment.

> Oddly, when I start it up from the K menu on the second screen,
> it starts in the right place.

This would be due to kwin's configuration, not the DISPLAY environmental 
variable.  AFAIK it's a single kwin running over the whole thing (that was 
actually one of the original problems I believe, assumptions were made 
that there was only one screen or that xinerama mode was in use, that had 
to be corrected before things could work properly, that was part of the 
whole hubbub I read about...), with kwin controlling placement, so that's 
what you need to configure.

> How do I convince quicklaunch to honour the DISPLAY setting for the
> current screen?

Again, I'm not personally experimentally familiar with current zaphod mode 
and wasn't aware it was even working.  However, you don't mention trying 
the following and failing, and some of these settings apply at least to 
xinerama mode, with which I /am/ familiar, so perhaps they apply in the 
newly possible zaphod mode as well...

kcontrol (um... systemsettings, but they aren't systemsettings, they're 
user-specific kde settings, thus the kde3 kcontrol name remains more 
accurate and is what I still use), hardware, display and monitor, multiple 
monitors.

You may need USE=xinerama (despite zaphod not xinerama mode, you'd need it 
I believe for the kde-base/systemsettings package, tho it may take the 
same setting for something else as well to get it working properly) to get 
that kcontrol module, but I believe that's what you're looking for.  Some 
of those may not work with zaphod mode (or for all I know, you get 
different options, but assuming you have the options I get here), pay 
particular attention to the "enable multiple monitor window placement 
support" checkbox, and the show unmanaged windows on <dropdown>.  For the 
xinerama mode I have here, I have all the options checked and that dropdown 
set to "display containing the pointer".

You may also find the windows rules settings useful.  These are available 
either in kcontrol, under workspace appearance and behavior, window 
behavior, window rules, or in the windows rules section of the window 
behavior configuration available as an option from any window menu.

Normally, these are for exceptions to the general rules, but if you setup 
a rule without specifying a whole lot in the first couple tabs (window and 
window extra), it should apply more generally.  At one point I had a 
problem with a number of apps wanting to start maximized when I wanted 
them normalized, so I set a non-specific window rule that I titled 
"General initial no-max".  Then on the geometry tab, I checked the 
maximized vertically and horizontally options at the left, enabling them, 
set "apply initially" in the dropdown, and left the on/off toggle checkbox 
UNCHECKED, so matching windows (that is pretty much everything since I 
didn't filter much in the first couple tabs) would appear un-maximized by 
default.

It worked, and didn't interfere with more specific rules I set for 
specific apps or app-windows, either. =:^)

If you try this route, you'll probably want to experiment with the window 
placement option at the bottom of the geometry tab.  You can also try the 
position option, but I'm not sure that'll work as you described for a 
general rule, tho it might come in handy for specific windows if you 
always want them in the same place.

Do note that depending on how insistent the app is at placing itself, you 
may have to set (workarounds tab) strictly obey geometry FORCE OFF, and 
ingore requested geometry FORCE ON.  I've found that these work best of 
they're BOTH set at the same time, to OPPOSITE values.

I hope that helps.  Please do post your results as I'm interested in 
knowing how well they work for zaphod mode.  Also, let me know if you need 
USE=xinerama to get that kcontrol module or not, and if setting it for kde-
base/systemsettings was enough or if it needed set for something else too.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman




More information about the kde-linux mailing list