LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-26-2006, 02:17 PM   #1
rednuht
Member
 
Registered: Aug 2005
Posts: 239
Blog Entries: 1

Rep: Reputation: 31
how can I resize an X app from xterm


I have a GTK app that does not accept the
Code:
-geometry XxY+L+T
parameter that I need to move and resize once the app is running (or a way of doing one off runs with specific settings).
I am pretty sure
Code:
xprop
will do what I want as it lists
Code:
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                program specified size: 164 by 164
                window gravity: NorthWest
when pointed at the app.
I can do
Code:
xprop -set WM_NAME "somenewname"
but I can not see what values are need to set the size and window location.
Code:
xprop -set WM_SIZE_HINTS.Geometry  640x480+10+10
would seem to be along the right lines but it does not work.
(error is the same as when I pass nonsense as a parameter)
any ideas ?
 
Old 01-25-2009, 06:36 AM   #2
nobody25145147
LQ Newbie
 
Registered: Jan 2009
Posts: 4

Rep: Reputation: 2
set window size / geometry from a script

Thanks for your posting, I had the same problem. I solved it with the following program:

wmctrl

See h t t p : / / w w w.sweb.cz/tripie/utils/wmctrl/#download

Here is an example-Script: h t t p : / / my.opera.com/raphman/blog/show.dml/302528



You cannot post URLs to other sites until you have made at least 1 other post. Why not introduce yourself in the Member Intro forum? We've implemented this rule to help combat spam and apologize for the inconvenience.

--> Fuck all of you spam-guys!
 
1 members found this post helpful.
Old 01-25-2009, 06:46 AM   #3
nobody25145147
LQ Newbie
 
Registered: Jan 2009
Posts: 4

Rep: Reputation: 2
I wrote this very small script, too:

http://www.abmh.de/en/papers/linux/s...om-script.html
Code:
#!/bin/bash

# This script sets the windows geometry off all windows which name conatins $1 to
# geometry $2. Notice the format of $2: x,y,w,h
#       x,y is the position of the top left corner of the window, and w,h  is  the
#       width  and  height of the window, with the exception that the value of
#       -1 in any position is interpreted to mean that  the  current  geometry
#       value should not be modified.

# GPL, (c) Andreas Hofmeier http://www.abmh.de/

wmctrl -l | grep -i $1 | while true; do
  read LINE
  if [ "$LINE" == "" ]; then
    break;
  fi
##  WMNAMW=${LINE:22}
##  wmctrl -r "$WMNAMW" -e 0,$2
  wmctrl -i -r $(echo $LINE | awk '{print $1}') -e 0,$2
done

#example:
# $0 kontact 1299,70,700,520
# $0 firefox 0,0,1272,1000
And the URLs with the second post ;-)

http://www.sweb.cz/tripie/utils/wmctrl/#download
http://my.opera.com/raphman/blog/show.dml/302528

Last edited by nobody25145147; 01-25-2009 at 07:27 AM.
 
1 members found this post helpful.
  


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
xterm - howto lauch an xterm into a specific directory jobano Linux - Software 11 01-30-2023 04:45 AM
copy from Xterm to other app rdrs Linux - Software 8 07-31-2006 01:57 AM
Is there any app which can resize ntfs & which can work without Linux install? kornerr Linux - General 7 05-13-2005 01:49 AM
Can't resize ext3 partition (using "parted"). Help or advise another app, plz kornerr Linux - General 2 04-28-2005 10:01 AM
how is black xterm background in IceWM when issue a xterm command? BRAHmS Linux - Software 1 02-14-2005 03:51 AM

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

All times are GMT -5. The time now is 01:59 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
Open Source Consulting | Domain Registration