LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 05: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, 06:03 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
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, 12: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, 12:58 AM   #4
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
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, 01: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, 01:21 AM   #6
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
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, 11:47 AM   #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 02:21 PM.
 
Old 06-09-2009, 12: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, 12: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-14-2009, 11:13 PM   #10
mike11
Member
 
Registered: Apr 2009
Posts: 222

Rep: Reputation: 17
check xdotool.
 
  


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:50 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