Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm setting up Ubuntu for my grandfather, and he really likes Solitaire. I'm using Pysolfc because of its Vegas-style scoring, which other Linux solitaire apps don't have.

However, whenever I resize the window, and then close and start it again, it doesn't keep the dimensions I previously set.

Is there any way to set the dimensions through a command, or by doing some fancy X stuff?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

wmctrl is such a package which will resize windows that are open.

The following is a quick - but not really elegant - way to launch and resize an application.

Create a file using your favourite text editor and add the following contents:

#!/bin/bash
easytag &
sleep 5
wmctrl -r :ACTIVE: -e 0,-1,-1,1200,800

Obviously change "easytag" for your application you which to launch and change "1200,800" for the width and height of your application.

The script launches the application then sleeps for 5 seconds to allow enough time for the application to open. Then wmctrl resizes the active window - which should be the newly opened application.

Add an execute permission on the file

chmod +x

you can now run the new executable from - for example - a launcher on the desktop.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.