Controlling Windows from Command Line?????

I am trying to find out how I can move, activate, resize etc windows (managed by KDE on top of X) from the command line and am at a total loss.

I have looked at dcop, kdcop, KWin and wmctrl.  None seems to work (the main problem being that they do not see all of the open windows – even Firefox is not reported – and won’t act on what they can’t see).  I can find the window IDs well enough (xwininfo etc) but can’t find any way to either send them signals, or have X push them around – and Goggle (what’s that STFI, STFW or GTFW?) has not helped me.  Surely there is some mechanism in X to send these sort of signals to windows?



3 Responses to “Controlling Windows from Command Line?????”

  1. 1 TimC 20 September 2008 at 12:20 am

    Get a real window manager! ☺

    cat ~/bin/focus_fvwm

    # This program finds a specific
    # program to focus — it focusses a
    # window that contain the string
    # contained in $1

    if [ -n “$*” ] ; then
    echo “$search” > $HOME/.nextfocus
    search=`cat $HOME/.nextfocus`

    echo “`date`: $search” >> /tmp/fvwm_focus.log

    #FvwmCommand “Next (\”$search\”) Function \”flipFlopFocus\””
    FvwmCommand “WindowList (\”$search\”) c c CurrentDesk, NoGeometry, CurrentAtEnd, IconifiedAtEnd”

    You then bind cms-tab to focus_fvwm, to keep on cycling through the last windows you searched for:

    > grep -i focus ~/.fvwm/.fvwmrc
    Key Tab A CMS Exec exec fvwm_focus

  2. 2 brendanscott 22 September 2008 at 2:08 pm

    [choose fvwm as wm on login]

    shell:> FvwmCommand “WindowList”
    [wait for 5 seconds]
    No such file or directory FvwmCommand error in opening message fifo

  3. 3 brendanscott 22 September 2008 at 2:33 pm

    Hmmm… note to self:
    Apparently to get commands working from the console in fvwm involves a bit [a lot???] of configuration – in particular loading at least one module (FvwmCommandS)
    blocker – FVWM doesn’t always automatically place windows – no obvious google to sort this out.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog Stats

  • 248,463 hits

OSWALD Newsletter

If you would like to receive OSWALD, a weekly open source news digest please send an email to oswald (with the subject "subscribe") at

%d bloggers like this: