LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-16-2009, 06:33 PM   #1
tlinux17
LQ Newbie
 
Registered: Feb 2009
Location: Italy
Distribution: Mandriva - Suse - Fedora - (PcBsd)
Posts: 9

Rep: Reputation: 0
what command in shell script for move a window to another desktop


Hi, I am searching the commands for move a window program, like konqueror to another destop by script. May you help me?
 
Old 05-16-2009, 07:03 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,935

Rep: Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692
Quote:
Originally Posted by tlinux17 View Post
Hi, I am searching the commands for move a window program, like konqueror to another destop by script. May you help me?
Investigate the dbus functionality under KDE....lots of info on Google, that can tell you how to do all sorts of things with it..
 
Old 05-17-2009, 01:53 AM   #3
tlinux17
LQ Newbie
 
Registered: Feb 2009
Location: Italy
Distribution: Mandriva - Suse - Fedora - (PcBsd)
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks TBone, I am searching / learning about dbus.
 
Old 05-17-2009, 01:58 AM   #4
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
Mind that's for kde4. If you still use 3.x the thing to look into is dcop.

This is valid only for the kde native wm, which is kwin. If you use compiz or any other wm (or you simply are not using kde) then this will not help. Other wm's might (only maybe) have a way to do this, or not at all. In gnome people use devilspie which is a standlone program to do advanced stuff with the windows since their wm can't do much.
 
Old 05-17-2009, 02:14 AM   #5
tlinux17
LQ Newbie
 
Registered: Feb 2009
Location: Italy
Distribution: Mandriva - Suse - Fedora - (PcBsd)
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks i92guboj, I am using yet kde 3.x, I shall search also for dcop.
 
Old 05-17-2009, 02:21 AM   #6
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
Then it's dcop. I haven't kwin installed so I can't test for you. I am not sure either that it will provide the necessary calls to move a window from command line. But if there's a way it must be dcop.
 
Old 05-25-2009, 12:47 PM   #7
tlinux17
LQ Newbie
 
Registered: Feb 2009
Location: Italy
Distribution: Mandriva - Suse - Fedora - (PcBsd)
Posts: 9

Original Poster
Rep: Reputation: 0
ok. I have found one solution for my problem.

I have found solution using the tool wmctrl.

I have installed it in fedora 8.10, with "yum install wmctrl"

This small example code move konqueror' window from the desktop number 1 to desktop number 4.

wmctrl -l | grep Konqueror | grep "0 localhost.localdomain" | wmctrl -t 3 -i -r $(cut -d " " -f1)

Thanks at all.
tlinux17

Last edited by tlinux17; 05-25-2009 at 03:21 PM.
 
Old 06-09-2009, 01:13 PM   #8
tlinux17
LQ Newbie
 
Registered: Feb 2009
Location: Italy
Distribution: Mandriva - Suse - Fedora - (PcBsd)
Posts: 9

Original Poster
Rep: Reputation: 0
I have found the second solution with dcop and kwin, this is the example:
dcop kwin KWinInterface setCurrentDesktop 3
3 is the choose desktop.

Thanks at all
 
Old 06-14-2009, 01:11 PM   #9
tlinux17
LQ Newbie
 
Registered: Feb 2009
Location: Italy
Distribution: Mandriva - Suse - Fedora - (PcBsd)
Posts: 9

Original Poster
Rep: Reputation: 0
I have found the solution, what I searched with kstart command. for example:
kstart --desktop 2 konqueror
the command run konqueror in the virtual box number two.

Good bye
 
Old 06-15-2009, 12:13 AM   #10
mike11
Member
 
Registered: Apr 2009
Posts: 222

Rep: Reputation: 17
check xdotool.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Controlling Desktop window via the Shell NEELIX_USR Linux - Desktop 3 02-11-2009 12:54 PM
script to move desktop icon to desktop/escritorio, how to know language? permalac Linux - Newbie 3 01-10-2009 09:49 AM
Very simple shell script - move files to different directories beley Programming 7 11-02-2006 06:24 AM
move mouse pointer from shell script malo_umoran Slackware 1 11-06-2004 09:31 AM
[SHELL SCRIPT] Write at the right of the shell window Creak Linux - General 2 04-02-2004 04:00 PM


All times are GMT -5. The time now is 12:18 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration