You are not logged in.

#1 2008-09-09 01:46:29

zephyrus17
Member
Registered: 2008-06-15
Posts: 323

Openbox: Open application in certain desktop

Is there a way to have, for example, Swiftdove to open only on Desktop 1, Emesene only on Desktop 2, etc? It would make bootups a lot more tidy

Offline

#2 2008-09-09 02:28:33

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Openbox: Open application in certain desktop

You can specify these settings in your ~/.config/openbox/rc.xml

Look to the end of the file and there you will find commented instructions on how to do this.
For example:

   

 <application name="APP1">
      <desktop>1</desktop>
    </application>

Also, check out - http://icculus.org/openbox/index.php/Help:Contents
You have everything you need there.


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#3 2008-09-09 02:34:44

zephyrus17
Member
Registered: 2008-06-15
Posts: 323

Re: Openbox: Open application in certain desktop

Ooo.. Cool. Thanks! Openbox is just so wonderful.. *sigh*

EDIT: how would I add this to Sessions?

EDIT2: It doesn't seem to be working

<application name="rhythmbox">
      <desktop>2</desktop>
    </application> 

<application name="emesene">
      <desktop>3</desktop>
    </application>

<application name="swiftdove">
      <desktop>4</desktop>
    </application>

is there anything wrong? I put this chunk between <applications> and </applications>

Last edited by zephyrus17 (2008-09-09 02:50:34)

Offline

#4 2008-09-09 02:52:02

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Openbox: Open application in certain desktop

It will be working when you configure it right. Please read the Openbox documentation, the very rc.xml you are editing should give plenty of explanations.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#5 2008-09-09 02:55:23

zephyrus17
Member
Registered: 2008-06-15
Posts: 323

Re: Openbox: Open application in certain desktop

I'll give it a shot. Following moljac024's tips, it should work.. hm...

Offline

#6 2008-09-09 03:16:51

tonyisnt
Member
Registered: 2008-03-18
Posts: 158

Re: Openbox: Open application in certain desktop

There is also devilspie, which allows one to do this and also many other things.

Offline

#7 2008-09-09 03:50:06

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Openbox: Open application in certain desktop

You have to make sure you have the right application names.
You can find these names out by running xprop in a terminal and clicking on the titlebar of the window you want info on.

If you don't want a lot of useless output just run xprop | grep WM_CLASS
Then you know what to put in the applications sections of your rc.xml.

Oh, and did you reconfigure openbox after editing that ?

openbox --reconfigure

The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#8 2008-09-09 09:21:13

zephyrus17
Member
Registered: 2008-06-15
Posts: 323

Re: Openbox: Open application in certain desktop

It didn't work. None of them did. This is what I changed them to

<application name="rhythmbox">
      <desktop>Desktop 2</desktop>
    </application> 

<application name="Controller.py">
      <desktop>Desktop 3</desktop>
    </application>

<application name="Swiftdove-bin">
      <desktop>Desktop 4</desktop>
    </application>

that "controller.py" just looks shady.

Do I have to enter the class and role of the applications as well?

Last edited by zephyrus17 (2008-09-09 09:21:57)

Offline

#9 2008-09-09 10:05:17

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: Openbox: Open application in certain desktop

zephyrus17 wrote:

It didn't work. None of them did. This is what I changed them to

<application name="rhythmbox">
      <desktop>Desktop 2</desktop>
    </application> 

<application name="Controller.py">
      <desktop>Desktop 3</desktop>
    </application>

<application name="Swiftdove-bin">
      <desktop>Desktop 4</desktop>
    </application>

that "controller.py" just looks shady.

Do I have to enter the class and role of the applications as well?

Do you have hotkeys to start those apps? I am asking, because in that case you already have a section for those...
Make sure there is no second "rhythmbox/etc" section in your rc.conf


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#10 2008-09-09 11:16:54

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Openbox: Open application in certain desktop

Welll there's your problem. You should just put a number in the <desktop> brackets. Not "Desktop 1" but "1"


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#11 2008-09-09 12:02:52

zephyrus17
Member
Registered: 2008-06-15
Posts: 323

Re: Openbox: Open application in certain desktop

Ahh.. I fixed that, but still, no go.

Offline

#12 2008-09-09 12:10:07

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Openbox: Open application in certain desktop

You probably have a problem in your configuration file somewhere. An easy way to find out where would be to run obconf and it will tell you what line number is problematic.

pacman -Sy obconf

The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#13 2008-09-09 12:19:57

zephyrus17
Member
Registered: 2008-06-15
Posts: 323

Re: Openbox: Open application in certain desktop

It didn't mention anything about inter-conflicts.

Offline

#14 2008-09-09 12:23:21

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Openbox: Open application in certain desktop

Ok, why don't you just post your whole rc.xml here ?


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#15 2008-09-09 12:25:43

zephyrus17
Member
Registered: 2008-06-15
Posts: 323

Re: Openbox: Open application in certain desktop

Ok.. You asked for it..

<?xml version="1.0" encoding="UTF-8"?>
<!-- Do not edit this file, it will be overwritten on install.
        Copy the file to $HOME/.config/openbox/ instead. -->
<openbox_config xmlns="http://openbox.org/3.4/rc">
  <resistance>
    <strength>20</strength>
    <screen_edge_strength>20</screen_edge_strength>
  </resistance>
  <focus>
    <focusNew>yes</focusNew>
    <!-- always try to focus new windows when they appear. other rules do
       apply -->
    <followMouse>no</followMouse>
    <!-- move focus to a window when you move the mouse into it -->
    <focusLast>yes</focusLast>
    <!-- focus the last used window when changing desktops, instead of the one
       under the mouse pointer. when followMouse is enabled -->
    <underMouse>no</underMouse>
    <!-- move focus under the mouse, even when the mouse is not moving -->
    <focusDelay>200</focusDelay>
    <!-- when followMouse is enabled, the mouse must be inside the window for
       this many milliseconds (1000 = 1 sec) before moving focus to it -->
    <raiseOnFocus>no</raiseOnFocus>
    <!-- when followMouse is enabled, and a window is given focus by moving the
       mouse into it, also raise the window -->
  </focus>
  <placement>
    <policy>Smart</policy>
    <!-- 'Smart' or 'UnderMouse' -->
    <center>no</center>
    <!-- whether to place windows in the center of the free area found or
       the top left corner -->
    <monitor>Any</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>
  <theme>
    <name>Natura</name>
    <titleLayout>NLIMC</titleLayout>
    <!--
      available characters are NDSLIMC, each can occur at most once.
      N: window icon
      L: window label (AKA title).
      I: iconify
      M: maximize
      C: close
      S: shade (roll up/down)
      D: omnipresent (on all desktops).
  -->
    <keepBorder>yes</keepBorder>
    <animateIconify>yes</animateIconify>
    <font place="ActiveWindow">
      <name>Sans</name>
      <size>7</size>
      <!-- font size in points -->
      <weight>Bold</weight>
      <!-- 'bold' or 'normal' -->
      <slant>Normal</slant>
      <!-- 'italic' or 'normal' -->
    </font>
    <font place="InactiveWindow">
      <name>Sans</name>
      <size>7</size>
      <!-- font size in points -->
      <weight>Bold</weight>
      <!-- 'bold' or 'normal' -->
      <slant>Normal</slant>
      <!-- 'italic' or 'normal' -->
    </font>
    <font place="MenuHeader">
      <name>Sans</name>
      <size>7</size>
      <!-- font size in points -->
      <weight>Normal</weight>
      <!-- 'bold' or 'normal' -->
      <slant>Normal</slant>
      <!-- 'italic' or 'normal' -->
    </font>
    <font place="MenuItem">
      <name>Sans</name>
      <size>7</size>
      <!-- font size in points -->
      <weight>Normal</weight>
      <!-- 'bold' or 'normal' -->
      <slant>Normal</slant>
      <!-- 'italic' or 'normal' -->
    </font>
    <font place="OnScreenDisplay">
      <name>Sans</name>
      <size>7</size>
      <!-- font size in points -->
      <weight>Bold</weight>
      <!-- 'bold' or 'normal' -->
      <slant>Normal</slant>
      <!-- 'italic' or 'normal' -->
    </font>
  </theme>
  <desktops>
    <!-- this stuff is only used at startup, pagers allow you to change them
       during a session

       these are default values to use when other ones are not already set
       by other applications, or saved in your session

       use obconf if you want to change these without having to log out
       and back in -->
    <number>4</number>
    <firstdesk>1</firstdesk>
    <names>
      <name>Desktop 1</name>
      <name>Desktop 2</name>
      <name>Desktop 3</name>
      <name>Desktop 4</name>
    </names>
    <popupTime>0</popupTime>
    <!-- The number of milliseconds to show the popup for when switching
       desktops.  Set this to 0 to disable the popup. -->
  </desktops>
  <resize>
    <drawContents>yes</drawContents>
    <popupShow>Nonpixel</popupShow>
    <!-- 'Always', 'Never', or 'Nonpixel' (xterms and such) -->
    <popupPosition>Center</popupPosition>
    <!-- 'Center', 'Top', or 'Fixed' -->
    <popupFixedPosition>
      <!-- these are used if popupPosition is set to 'Fixed' -->
      <x>10</x>
      <!-- positive number for distance from left edge, negative number for
         distance from right edge, or 'Center' -->
      <y>10</y>
      <!-- positive number for distance from top edge, negative number for
         distance from bottom edge, or 'Center' -->
    </popupFixedPosition>
  </resize>
  <!-- You can reserve a portion of your screen where windows will not cover when
     they are maximized, or when they are initially placed.
     Many programs reserve space automatically, but you can use this in other
     cases. -->
  <margins>
    <top>0</top>
    <bottom>0</bottom>
    <left>0</left>
    <right>0</right>
  </margins>
  <dock>
    <position>Bottom</position>
    <!-- (Top|Bottom)(Left|Right|)|Top|Bottom|Left|Right|Floating -->
    <floatingX>0</floatingX>
    <floatingY>0</floatingY>
    <noStrut>no</noStrut>
    <stacking>Above</stacking>
    <!-- 'Above', 'Normal', or 'Below' -->
    <direction>Vertical</direction>
    <!-- 'Vertical' or 'Horizontal' -->
    <autoHide>no</autoHide>
    <hideDelay>300</hideDelay>
    <!-- in milliseconds (1000 = 1 second) -->
    <showDelay>300</showDelay>
    <!-- in milliseconds (1000 = 1 second) -->
    <moveButton>Middle</moveButton>
    <!-- 'Left', 'Middle', 'Right' -->
  </dock>
  <keyboard>
    <chainQuitKey>C-g</chainQuitKey>
    <!-- Keybindings for desktop switching -->
    <keybind key="C-W-Left">
      <action name="DesktopLeft">
        <dialog>no</dialog>
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="C-W-Right">
      <action name="DesktopRight">
        <dialog>no</dialog>
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="C-W-Up">
      <action name="DesktopUp">
        <dialog>no</dialog>
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="C-W-Down">
      <action name="DesktopDown">
        <dialog>no</dialog>
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="S-W-Left">
      <action name="SendToDesktopLeft">
        <dialog>no</dialog>
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="S-W-Right">
      <action name="SendToDesktopRight">
        <dialog>no</dialog>
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="S-W-Up">
      <action name="SendToDesktopUp">
        <dialog>no</dialog>
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="S-W-Down">
      <action name="SendToDesktopDown">
        <dialog>no</dialog>
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="W-F1">
      <action name="Desktop">
        <desktop>1</desktop>
      </action>
    </keybind>
    <keybind key="W-F2">
      <action name="Desktop">
        <desktop>2</desktop>
      </action>
    </keybind>
    <keybind key="W-F3">
      <action name="Desktop">
        <desktop>3</desktop>
      </action>
    </keybind>
    <keybind key="W-F4">
      <action name="Desktop">
        <desktop>4</desktop>
      </action>
    </keybind>
    <keybind key="W-e">
      <action name="ToggleShowDesktop"/>
    </keybind>
    <!-- Keybindings for windows -->
    <keybind key="A-F4">
      <action name="Close"/>
    </keybind>
    <keybind key="A-Escape">
      <action name="Lower"/>
      <action name="FocusToBottom"/>
      <action name="Unfocus"/>
    </keybind>
    <keybind key="A-space">
      <action name="ShowMenu">
        <menu>client-menu</menu>
      </action>
    </keybind>
    <keybind key="Print">
      <action name="Execute">
        <execute>gnome-screenshot</execute>
      </action>
    </keybind>
    <keybind key="A-Print">
      <action name="Execute">
        <execute>gnome-screenshot -w</execute>
      </action>
    </keybind>
    <!-- Keybindings for window switching -->
    <keybind key="A-Tab">
      <action name="NextWindow">
        <allDesktops>yes</allDesktops>
      </action>
    </keybind>
    <keybind key="A-S-Tab">
      <action name="PreviousWindow">
        <allDesktops>yes</allDesktops>
      </action>
    </keybind>
    <keybind key="C-A-Tab">
      <action name="NextWindow">
        <panels>yes</panels>
        <desktop>yes</desktop>
      </action>
    </keybind>
    <!-- Keybindings for running applications -->
    <!--<keybind key="W-e">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>Nautilus</name>
        </startupnotify>
        <command>nautilus</command>
      </action>
    </keybind> -->
    <keybind key="A-F2">
      <action name="execute">
        <execute>gmrun</execute>
      </action>
    </keybind>
    <keybind key="A-F1">
      <action name="execute">
        <execute>root menu</execute>
      </action>
    </keybind>
  </keyboard>
  <mouse>
    <dragThreshold>1</dragThreshold>
    <!-- number of pixels the mouse must move before a drag begins -->
    <doubleClickTime>200</doubleClickTime>
    <!-- in milliseconds (1000 = 1 second) -->
    <screenEdgeWarpTime>0</screenEdgeWarpTime>
    <!-- Time before changing desktops when the pointer touches the edge of the
       screen while moving a window, in milliseconds (1000 = 1 second).
       Set this to 0 to disable warping -->
    <context name="Frame">
      <mousebind button="A-Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="A-Left" action="Click">
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="A-Left" action="Drag">
        <action name="Move"/>
      </mousebind>
      <mousebind button="A-Right" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="A-Right" action="Drag">
        <action name="Resize"/>
      </mousebind>
      <mousebind button="A-Middle" action="Press">
        <action name="Lower"/>
        <action name="FocusToBottom"/>
        <action name="Unfocus"/>
      </mousebind>
      <mousebind button="A-Up" action="Click">
        <action name="DesktopPrevious"/>
      </mousebind>
      <mousebind button="A-Down" action="Click">
        <action name="DesktopNext"/>
      </mousebind>
      <mousebind button="C-A-Up" action="Click">
        <action name="DesktopPrevious"/>
      </mousebind>
      <mousebind button="C-A-Down" action="Click">
        <action name="DesktopNext"/>
      </mousebind>
      <mousebind button="A-S-Up" action="Click">
        <action name="SendToDesktopPrevious"/>
      </mousebind>
      <mousebind button="A-S-Down" action="Click">
        <action name="SendToDesktopNext"/>
      </mousebind>
    </context>
    <context name="Titlebar">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Move"/>
      </mousebind>
      <mousebind button="Left" action="DoubleClick">
        <action name="ToggleShade"/>
      </mousebind>
      <mousebind button="Middle" action="Press">
        <action name="Lower"/>
        <action name="FocusToBottom"/>
        <action name="Unfocus"/>
      </mousebind>
      <mousebind button="Up" action="Click">
        <action name="Shade"/>
        <action name="FocusToBottom"/>
        <action name="Unfocus"/>
        <action name="Lower"/>
      </mousebind>
      <mousebind button="Down" action="Click">
        <action name="Unshade"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Right" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="ShowMenu">
          <menu>client-menu</menu>
        </action>
      </mousebind>
    </context>
    <context name="Top">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Resize">
          <edge>top</edge>
        </action>
      </mousebind>
    </context>
    <context name="Left">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Resize">
          <edge>left</edge>
        </action>
      </mousebind>
    </context>
    <context name="Right">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Resize">
          <edge>right</edge>
        </action>
      </mousebind>
    </context>
    <context name="Bottom">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Resize">
          <edge>bottom</edge>
        </action>
      </mousebind>
      <mousebind button="Middle" action="Press">
        <action name="Lower"/>
        <action name="FocusToBottom"/>
        <action name="Unfocus"/>
      </mousebind>
      <mousebind button="Right" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="ShowMenu">
          <menu>client-menu</menu>
        </action>
      </mousebind>
    </context>
    <context name="BLCorner">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Resize"/>
      </mousebind>
    </context>
    <context name="BRCorner">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Resize"/>
      </mousebind>
    </context>
    <context name="TLCorner">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Resize"/>
      </mousebind>
    </context>
    <context name="TRCorner">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Resize"/>
      </mousebind>
    </context>
    <context name="Client">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Middle" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Right" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
    </context>
    <context name="Icon">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
        <action name="ShowMenu">
          <menu>client-menu</menu>
        </action>
      </mousebind>
      <mousebind button="Right" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="ShowMenu">
          <menu>client-menu</menu>
        </action>
      </mousebind>
    </context>
    <context name="AllDesktops">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="Left" action="Click">
        <action name="ToggleOmnipresent"/>
      </mousebind>
    </context>
    <context name="Shade">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Left" action="Click">
        <action name="ToggleShade"/>
      </mousebind>
    </context>
    <context name="Iconify">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Left" action="Click">
        <action name="Iconify"/>
      </mousebind>
    </context>
    <context name="Maximize">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="Middle" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="Right" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="Left" action="Click">
        <action name="ToggleMaximizeFull"/>
      </mousebind>
      <mousebind button="Middle" action="Click">
        <action name="ToggleMaximizeVert"/>
      </mousebind>
      <mousebind button="Right" action="Click">
        <action name="ToggleMaximizeHorz"/>
      </mousebind>
    </context>
    <context name="Close">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="Left" action="Click">
        <action name="Close"/>
      </mousebind>
    </context>
    <context name="Desktop">
      <mousebind button="Up" action="Click">
        <action name="DesktopPrevious"/>
      </mousebind>
      <mousebind button="Down" action="Click">
        <action name="DesktopNext"/>
      </mousebind>
      <mousebind button="A-Up" action="Click">
        <action name="DesktopPrevious"/>
      </mousebind>
      <mousebind button="A-Down" action="Click">
        <action name="DesktopNext"/>
      </mousebind>
      <mousebind button="C-A-Up" action="Click">
        <action name="DesktopPrevious"/>
      </mousebind>
      <mousebind button="C-A-Down" action="Click">
        <action name="DesktopNext"/>
      </mousebind>
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Right" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
    </context>
    <context name="Root">
      <!-- Menus -->
      <mousebind button="Middle" action="Press">
        <action name="ShowMenu">
          <menu>client-list-combined-menu</menu>
        </action>
      </mousebind>
      <mousebind button="Right" action="Press">
        <action name="ShowMenu">
          <menu>root-menu</menu>
        </action>
      </mousebind>
    </context>
    <context name="MoveResize">
      <mousebind button="Up" action="Click">
        <action name="DesktopPrevious"/>
      </mousebind>
      <mousebind button="Down" action="Click">
        <action name="DesktopNext"/>
      </mousebind>
      <mousebind button="A-Up" action="Click">
        <action name="DesktopPrevious"/>
      </mousebind>
      <mousebind button="A-Down" action="Click">
        <action name="DesktopNext"/>
      </mousebind>
    </context>
  </mouse>
  <menu>
    <!-- You can specify more than one menu file in here and they are all loaded,
       just don't make menu ids clash or, well, it'll be kind of pointless -->
    <!-- default menu file (or custom one in $HOME/.config/openbox/) -->
    <!-- system menu files on Debian systems -->
    <hideDelay>200</hideDelay>
    <!-- if a press-release lasts longer than this setting (in milliseconds), the
       menu is hidden again -->
    <middle>no</middle>
    <!-- center submenus vertically about the parent entry -->
    <submenuShowDelay>100</submenuShowDelay>
    <!-- this one is easy, time to delay before showing a submenu after hovering
       over the parent entry -->
    <applicationIcons>yes</applicationIcons>
    <!-- controls if icons appear in the client-list-(combined-)menu -->
    <manageDesktops>yes</manageDesktops>
    <!-- show the manage desktops section in the client-list-(combined-)menu -->
  </menu>
  <applications>
    <!--
  # this is an example with comments through out. use these to make your
  # own rules, but without the comments of course.

  <application name="first element of window's WM_CLASS property (see xprop)"
              class="second element of window's WM_CLASS property (see xprop)"
               role="the window's WM_WINDOW_ROLE property (see xprop)">
  # the name or the class can be set, or both. this is used to match
  # windows when they appear. role can optionally be set as well, to
  # further restrict your matches.

  # the name, class, and role use simple wildcard matching such as those
  # used by a shell. you can use * to match any characters and ? to match
  # any single character.

  # when multiple rules match a window, they will all be applied, in the
  # order that they appear in this list


    # each element can be left out or set to 'default' to specify to not 
    # change that attribute of the window

    <decor>yes</decor>
    # enable or disable window decorations

    <shade>no</shade>
    # make the window shaded when it appears, or not

    <position>
      # the position is only used if both an x and y coordinate are provided
      # (and not set to 'default')
      <x>center</x>
      # a number like 50, or 'center' to center on screen. use a negative number
      # to start from the right (or bottom for <y>), ie -50 is 50 pixels from the
      # right edge (or bottom).
      <y>200</y>
      <monitor>1</monitor>
      # specifies the monitor in a xinerama setup.
      # 1 is the first head, or 'mouse' for wherever the mouse is
    </position>

    <focus>yes</focus>
    # if the window should try be given focus when it appears. if this is set
    # to yes it doesn't guarantee the window will be given focus. some
    # restrictions may apply, but Openbox will try to

    <desktop>1</desktop>
    # 1 is the first desktop, 'all' for all desktops

    <layer>normal</layer>
    # 'above', 'normal', or 'below'

    <iconic>no</iconic>
    # make the window iconified when it appears, or not

    <skip_pager>no</skip_pager>
    # asks to not be shown in pagers

    <skip_taskbar>no</skip_taskbar>
    # asks to not be shown in taskbars. window cycling actions will also
    # skip past such windows

    <fullscreen>yes</fullscreen>
    # make the window in fullscreen mode when it appears

    <maximized>true</maximized>
    # 'Horizontal', 'Vertical' or boolean (yes/no)
  </application>

  # end of the example
-->
    <application name="Rhythmbox">
      <desktop>2</desktop>
    </application>
    <application name="Emesene">
      <desktop>3</desktop>
    </application>
    <application name="Swiftdove">
      <desktop>4</desktop>
    </application>
  </applications>
</openbox_config>

Last edited by zephyrus17 (2008-09-09 12:26:21)

Offline

#16 2008-09-09 12:32:11

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Openbox: Open application in certain desktop

Try putting application class instead of name. It just worked for Rhythmbox here, should work for all the others


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#17 2008-09-09 12:48:32

zephyrus17
Member
Registered: 2008-06-15
Posts: 323

Re: Openbox: Open application in certain desktop

Well, when I try with Rhythmbox, it'll flash briefly at Desktop 2, then just jump to whatever desktop I'm in. It's like something's overriding it.

Last edited by zephyrus17 (2008-09-09 12:48:52)

Offline

#18 2008-09-09 19:41:22

heleos
Member
From: Maine, USA
Registered: 2007-04-24
Posts: 678

Re: Openbox: Open application in certain desktop

Try taking focus off of rhythmbox. Here's my entry for opera:

    <application name="opera">
      <desktop>2</desktop>
      <focus>no</focus>
    </application>

it also may have something to do with rhythmbox's urgency hint?

Last edited by heleos (2008-09-09 19:41:53)

Offline

#19 2008-09-10 01:46:54

zephyrus17
Member
Registered: 2008-06-15
Posts: 323

Re: Openbox: Open application in certain desktop

Nope still didn't work. It still flashed and went to the desktop I'm in. I wonder if it has anything to do with my obconf settings?

My desktop names are (very creatively), "desktop 1", "desktop 2", "desktop 3", "desktop 4". Does this affect anything?

Does it also matter than I'm running Openbox in Gnome?

Offline

#20 2008-09-10 04:40:30

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: Openbox: Open application in certain desktop

zephyrus17 wrote:

My desktop names are (very creatively), "desktop 1", "desktop 2", "desktop 3", "desktop 4". Does this affect anything?

The <desktop> declaration must be the number of the desktop:

<application name="rhythmbox">
      <desktop>2</desktop>
</application>

thayer williams ~ cinderwick.ca

Offline

#21 2008-09-10 04:44:18

zephyrus17
Member
Registered: 2008-06-15
Posts: 323

Re: Openbox: Open application in certain desktop

Yeah.. What's what I did. the desktop names I was mentioning was what I wrote in the graphical frontend obconf, under the tab of Desktop.

Offline

#22 2008-09-10 11:14:23

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Openbox: Open application in certain desktop

You didn't mention that you were running openbox in gnome. It shouldn't matter, but try logging in to a standalone Openbox session and see if it works then.


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#23 2008-09-11 12:20:31

zephyrus17
Member
Registered: 2008-06-15
Posts: 323

Re: Openbox: Open application in certain desktop

I tried that, and oddly (in both gnome/openbox and openbox only), when I have it as

name="rhythmbox"

the program itself will open in the window I'm in, but any pop-ups like music properties or when I try to import a file will appear in the desktop that I want it too. It also happened (and only happened) when I did

Class="Rhythmbox"

EDIT: I gave up on the openbox method and tried devilspie, like tonyisnt suggest, and it works. Though this isn't my prefered method as I would have prefered something more native, but I guess this will do fine for now.

One niggle I'm seeing now is that when the program opens, it flashes on the desktop I'm in and then moves to the intended one. Is there a way to prevent this? It's just annoying.

Also, devilspie won't work on my Swiftdove mail client.

Last edited by zephyrus17 (2008-09-11 12:58:13)

Offline

#24 2008-09-11 17:38:18

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Openbox: Open application in certain desktop

That's because of the way devilspie works. You won't be able to prevent it. Openbox creates the window at the desktop you're on and then devilspie kicks in and throws on the one you want it to be on. If openbox would just listen to what you say to it in rc.xml then that wouldn't happen. Perhaps openbox needs a good spankin' , teach it to dis-obey you! tongue

Last edited by moljac024 (2008-09-11 17:39:04)


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#25 2008-09-12 00:52:14

zephyrus17
Member
Registered: 2008-06-15
Posts: 323

Re: Openbox: Open application in certain desktop

Hey, whoa. You might be the Dark Lord and everything, but I'm not *that* much into S&M.

I guess I'll just have to make do with it.. Thanks for everyone's help along the way. big_smile

Offline

Board footer

Powered by FluxBB