LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-22-2006, 01:18 PM   #1
rfuller
LQ Newbie
 
Registered: Jan 2006
Location: 3rd Rock from sol.
Distribution: Mainley fedora core ... and whatever other distro helps reduce my work load at the moment.
Posts: 16

Rep: Reputation: 0
Question command line for switching xwindow focus


We are running a program from a bash script and that program launches several other programs in X. We would like the program launched from the bash script to remain on top with focus however the other programs take focus.

So is there a way from the cli to reset focus to the main app?
The reason for this is simple it is a kiosk style app with no user input whatsoever(no keyboard no mouse). So maybe a something that simulates keyboard input to <alt-tab> would work but I suspect there is something else to set focus with a pid or application name.

What are the options or is this a big dead end? I did some googleing but all I came up with was a setfocus from win32 api which obviously will not work in linux.
 
Old 02-22-2006, 01:49 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
It depends on your window manager. If you are running Metacity, take a look at Devil's Pie.
 
Old 02-23-2006, 08:02 PM   #3
rfuller
LQ Newbie
 
Registered: Jan 2006
Location: 3rd Rock from sol.
Distribution: Mainley fedora core ... and whatever other distro helps reduce my work load at the moment.
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks cool program and I suggest it for people using all major window managers as it is for X11 and very handy for many applications. We are using blackbox which this does work with devilspie but it never focuses the window...it gives an error:

(devilspie:16044): Wnck-Warning **: Recieved a timestamp of 0; window activation may not function properly.

All the above being the case(devils pie simply uses standard x11 calls) is it possible to force X11 to only ever have focus on a specific window regardless of timestamp?
 
Old 02-23-2006, 08:55 PM   #4
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
From looking at the comments, it looks like if wnck is older than 2.9.92 that devilspie will not pass timestamps. You can force the use of timestamps in the configure; that might resolve your problem.
 
Old 02-24-2006, 10:59 AM   #5
rfuller
LQ Newbie
 
Registered: Jan 2006
Location: 3rd Rock from sol.
Distribution: Mainley fedora core ... and whatever other distro helps reduce my work load at the moment.
Posts: 16

Original Poster
Rep: Reputation: 0
Sorry for being so dull but I have looked at several tutorials on devilspie. I have not seen a reference to force or timestamp. Care to clear this up for me? Maybe point me to an example? Many thanks!
 
Old 02-24-2006, 11:38 AM   #6
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
If your environment includes a version of libwnck that is older than 2.9.92, the configure scripts for devilspie disable the use of timestamps, which your error indicated. What I was suggesting is that you could modify the configure scripts to always assume that libwnck is newer than 2.9.92 by disabling the check and manually setting the result.

If that's not something you feel comfortable with, perhaps you could contact the devilspie author and see if he could include support for your environment.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Switching To GUI from command line dexton Linux - Software 3 05-04-2005 12:04 PM
switching from command line to gui mattfritze Linux - Newbie 6 12-06-2003 07:50 PM
switching from command line to gui on 9.2 mattfritze Mandriva 2 12-06-2003 07:43 PM
command-line way of switching virtual consoles? chrisgr Red Hat 1 10-31-2003 01:20 PM
switching from GUI to command line mariusz007 Linux - Newbie 2 10-13-2003 08:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration