this is my script to embed terminal in my desktop, but how do I make it appear in the corner next to the unity launcher?

sleep 20 && gnome-terminal --window-with-profile=trans777 &

You have to use the --geometry argument with the gnome-terminal command.
Example: gnome-terminal --geometry 114x26+170+30 This will open up gnome terminal 114 columns wide by 26 rows deep and place it pretty close to the middle of the screen based on the 170+30. A pretty cool tip to get your exact geometry of where you want your terminal is to go ahead and open the gnome-terminal and place it exactly where you want it and then run the command xwininfo in the terminal. Click on the gnome-terminal with your mouse and it will display a whole list of things about that particular window. The geometry of the window is listed all the way at the bottom. Just copy the line and append it to your gnome-terminal command. Tah Dah!!!

| improve this answer | |
  • Thanks are not needed... its the sole purpose of this site to help the growing Ubuntu community resolve each others technical issues. – Scott Stookey Feb 22 '12 at 18:36
  • alright, which of the parameters controls the vertical placement? I have mine in the corner but its maybe a couple lines lower than the taskbar, and i'd like it to be right underneed, here's my code. #!/bin/bash sleep 20 && gnome-terminal --window-with-profile=trans777 --geometry 70x41+51-0 & – Wilfred Feb 22 '12 at 18:52
  • That would be the last one, but you need to have a + instead of a - in-between the 51 and 0. You want to leave it at 0 that is the upper most position. You code should look like this though. --geometry 70x41+51+0 – Scott Stookey Feb 22 '12 at 19:08
  • why does a + or - make a difference if the parameter is 0? And yeah that totally fixed it! – Wilfred Feb 22 '12 at 19:23
  • That I can't specifically answer, it's just how the geometry argument likes its seperators. I would assume it doesn't recognize the - sign so the default vertical position would be where it places it when the syntax isn't correct. – Scott Stookey Feb 22 '12 at 19:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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