Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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:

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


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.