You are not logged in.

#1 2008-03-23 12:25:38

ebergottheit
Member
Registered: 2008-03-23
Posts: 2

OpenBox, Twinview-Laptop, Screen Removal for mobile use

(Hi all, since this is my first post here!)

I am running arch linux on a laptop with nvidia graphics and twinview, using Openbox as my main windowmanager.
At home, i have a second screen with a bigger resolution.
Outside, i don't have this screen attached of course smile

The problem occurs when i use apps that remember their last position: If it was on the additional screen and that screen is not attached, there is no way to use this application.

The best solution would be if X could somehow recognize that there is no second screen, but i don't know if this is even physically possible for the hardware...

What i tried as another possibility is to just not care if there is a second screen, but to force all windows to be initially summoned on the main screen  (Or, as i did it: Under the mouse, which happens to be in the main screen). This seems not  to work or to be overridden for example by amarok.
I tried it this way in the rc.conf:

<placement>
  <policy>UnderMouse</policy>
  <!-- 'Smart' or 'UnderMouse' -->
  <center>yes</center>
  <!-- whether to place windows in the center of the free area found or
       the top left corner -->
  <monitor>Mouse</monitor>
  <!-- with Smart placement on a multi-monitor system, try to place new windows
       on: 'Any' - any monitor, 'Mouse' - where the mouse is, 'Active' - where
       the active window is -->
</placement>

What i thought about was using screenpager, with which i could, as i believe, summon the lost windows to the mainwindow no matter where they are initially placed (just like under windows).
But screenpager seems not to be supported at all, not in aur, not in abs, not in pacman.
I could learn how to make a package and create one for me, but i don't like installing software outside of the normal package management (No automatical updates, etc etc).

The last and most unelegant idea would be to have two XF86Config files and two scripts which copy one of the files in place of the actual XF86Config and then do startx, so that i can call "startxhome" or "startxmobile" depending on where i am. The silly thing about that is especially, that i am using gdm at the moment (any alternative would be okay for me too, it is just what worked best so far) and you do not run startx manually there.

Please help me with suggestions about which of these options is possible, feasible and how it can be done.


PS: I tried fluxbox too, it has the same problem.
Under ratpoison it is no problem becuase i can change to "frame 1", which fills my main screen, and then summon the apps there, ignoring the other frame. But i installed ratpoison only for special applications like coding and find it too minimalist and ugly to be my main desktop.

Last edited by ebergottheit (2008-03-23 12:28:36)

Offline

#2 2008-03-23 18:38:38

ebergottheit
Member
Registered: 2008-03-23
Posts: 2

Re: OpenBox, Twinview-Laptop, Screen Removal for mobile use

I found a part-solution...
I played with the nvidia-settings software and tried two seperate screens and two separate openbox instances.
This works because apps that are started by the openbox in my laptop screen do not even know of the other screen and are not spawned in it either.
It means i can't move windows between the two instances atm but i do not need to do that anyway..
It also fixes ugly "background image stretching".

One problem is left: When i do "Exit" in one of the screens X terminates and restarts and i get back to gdm login.
When i do exit in the other screen, only the openbox is killed, but X stays open, with a "dead" half-desktop on the screen.
I tried all kinds of combinations with and without "exec", with and without "&" .... of the following script which is called from my openbox.desktop:

#!/bin/bash

# run openbox on the second screen (they start from 0)
DISPLAY=:0.0 exec openbox-session &
# by default openbox will run on the first screen (screen number 0)
DISPLAY=:0.1 exec openbox-session

(the comments are "wrong", i modified a file from some howto which did not work)

Offline

Board footer

Powered by FluxBB