Selecting desktop from script

Hi !

I’m running this old machine, which serves only one purpose: displaying a
monitoring web page. I would like to display a second page and alternate
between them every 30 sec or so.

The machine is running an openSUSE 10.x release, I think, with KDE 3.x. I’m
having to change it soon, so using a more recent openSUSE with KDE 4.x is no
problem.

My idea was to open a Firefox with one page on desktop 1, and another
with the second page on desktop 2. And I’d like to find a way to run a bash
script to alternate between them.

Is there a command line instruction for changing to a certain desktop?


Any time things appear to be going better, you have overlooked
something.

Need a dbus call…

qdbus org.kde.kwin /KWin org.kde.KWin.nextDesktop 

As for the other bit guess you looking at a while loop/daemon but seems a little hackish. I’d perhaps try to arrange it via inotify and watch a folder for changes if it could be applicable.

Home - inotify-tools - GitHub

Rikishi,

If you have control over the HTML output by the pages, you could imbed a “Refresh” header in them to swap to the other one every n seconds.

On 2010-05-25, FeatherMonkey <FeatherMonkey@no-mx.forums.opensuse.org> wrote:

> Need a dbus call…
>
>
> Code:
> --------------------
> qdbus org.kde.kwin /KWin org.kde.KWin.nextDesktop
> --------------------

That works perfectly, thanks a lot!

> As for the other bit guess you looking at a while loop/daemon but seems
> a little hackish. I’d perhaps try to arrange it via inotify and watch a
> folder for changes if it could be applicable.

The loop is not a problem, just an infinite bash loop with a sleep in it.

Thanks again!


Any time things appear to be going better, you have overlooked
something.

On 2010-05-26, antttikutoja <antttikutoja@no-mx.forums.opensuse.org> wrote:
> If you have control over the HTML output by the pages, you could imbed
> a “Refresh” header in them to swap to the other one every n seconds.

Nope, no control over them. They evencome from 2 different servers, and one
of the pages requires authentication.

But I’ve pretty much got things going. Even made it look cute, by activating
the cube animation for the desktop switch. :slight_smile:


Any time things appear to be going better, you have overlooked
something.