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.

It know that it is possible to pass the --geometry=WxH arguments when using launcher, but how to set this option with the ~/.bashrc file.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

You need to install the wmctrl package. Then, add this to your ~/.bashrc file:

HORIZONTAL=600
VERTICAL=400
wmctrl -r ":ACTIVE:" -e 0,-1,-1,${HORIZONTAL},${VERTICAL}

It will resize your active window (should be the terminal), to the size specified by the ${HORIZONTAL} and ${VERTICAL} variables. Note that these are measured in pixels. You can set your terminal's geometry to what you want, then use the screenruler package to measure the dimensions in pixels.

Hope this helps :)

EDIT: Actually you can run this to show the size of all the gnome-terminal's that are open:

wmctrl -l -x -G | grep gnome-terminal.Gnome-terminal | awk '{ print "Horizontal: "$5" pixels; Vertical: "$6" pixels" }'
share|improve this answer
    
Thanks @Chen Xiao-Long –  sultan Jun 29 '11 at 15:33
    
You're welcome! –  Xiao-Long Chen Jun 29 '11 at 19:13
add comment

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.