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 - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-24-2011, 12:16 AM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
Open a program in a window with specified height and width.


kernel 2.6.21.5, slackware 12.0
KDE 2.0.0.4

Hi:
I'd like to open a program in a window whose dimensions, height and width are given by me. The program synopsis gives no other parameters than a filename. How could I do this, if at all possible? Thanks in advance.
 
Old 08-24-2011, 12:40 AM   #2
saulgoode
Member
 
Registered: May 2007
Distribution: Slackware
Posts: 288

Rep: Reputation: 155Reputation: 155
Many programs written for the X Window System support command line options for the window's geometry. If your program is such then, as an example, adding "-geometry 800x600+0+0" to the command line arguments would place a window 800 pixels wide by 600 pixels tall at the upper left of the screen.

Unfortunately, not all programs honor this convention.
 
Old 08-24-2011, 12:52 AM   #3
NoStressHQ
Member
 
Registered: Apr 2010
Location: Geneva - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware 14.2 - 32/64bit
Posts: 609

Rep: Reputation: 221Reputation: 221Reputation: 221
Unless you know exactly on which application you want to do this AND that particular application handle arguments to drive the 'window geometry' (as mentioned by saulgoode)... You should be able to do it programatically (Write a X program that communicate with the window)...

Or... look for some tool that would assist you in this task. Haven't tried any, but a quick google search point me to this one...

Code:
windowsize [options] [window] width height
Set the window size of the given window. If no window is given, %1 is the default. See WINDOW STACK and COMMAND CHAINING for more details.
 [...]
       xdotool windowsize I<window> 100% 50%
http://www.semicomplete.com/projects/xdotool/

Hope this will help.

Edit: Maybe this one too: http://tomas.styblo.name/wmctrl/

Last edited by NoStressHQ; 08-24-2011 at 12:53 AM.
 
Old 08-24-2011, 04:39 AM   #4
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Many thanks for all this information. Perhaps the case is not so desperate, as I think it must depend on the GUI. The first time I opened the program, I could freely resize the window. One day, though, the window couldn't be resized vertically. Instead it was occupying the whole height of the physical screen.

It must be noticed, however, that I have /etc/X11/xorg.conf customized to produce a virtual screen, that is, a screen that is larger than the physical one.
 
Old 08-24-2011, 06:16 AM   #5
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Sounds daft I know but you havn't got the window maximized have you? because you can't resize a maximized window ( at least under metacity )
 
Old 08-24-2011, 09:27 AM   #6
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Of course not.
 
  


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
[SOLVED] Get width/height of a terminal window in c++? rohedin Programming 9 10-24-2012 07:00 PM
Use awk and sed to extract height and width of file toben Programming 6 08-04-2010 06:16 AM
ffmpeg error: invalid width x height (0x320) MythN00b Linux - Software 1 12-27-2007 07:39 AM
Reduce width and height of gdmgreeter and Xfce desktop lothario Linux - Software 5 06-02-2006 02:27 PM
Laptop Screen Height and Width blueStatic Linux - Hardware 1 09-03-2003 12:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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