Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Here is a quesion that has been bugging me. You know how you can set up a program to run on start up right? Well, how can i tell it to start minimized, like you would do in windows?

TeamViewer starts open, but I need it minimized, and Tray-it just doesn't seem as elegant of a way to do it.

share|improve this question

3 Answers

You can use a tool called Devilspie (in Maverick repo). This tool can take actions as soon as programs are started, like sending to workspaces, pinning, and also minimizing. A tutorial is here.

  • To install it run:

sudo apt-get install devilspie.

  • To configure it to minimize Teamviewer everytime it is executed:

    mkdir ~/.devilspie
    

Create a file called ~/.devilspie/teamviewer.ds and paste the following lines:

(if  
(is (application_name) "Teamviewer")  
(begin (minimize) )  
)  

If you'd like a gui for easier configuration you should take note of GDevilspie.

share|improve this answer
This works, but when I restore the minimised window it draws incorrectly - the background of the TeamViewer window becomes a copy of whatever is underneath it and some text is not visible, e.g. i.imgur.com/0p6yR.png (I've obscured text in the three text boxes). Other wine apps don't do this (Notepad++, Picasa). – misterben Feb 14 '11 at 18:50

Minimizing a program depends on the program if it supports that or not. It also depends if the program has an option in the gui or via command line. For example vlc has an option in preferences that gives the chance to start it minimized. But it also has an option in command line to start it minimized (like parameters). The option to minimize also changes depending of the program. Some programs might be program -min other might be program -systray, etc.. Verify that Teamviewer for example has an option for this in the gui options. If the program has a command line minimize parameter just add it to the start up manager.

share|improve this answer
Thanks a lot. :) – semi-newbie Jan 13 '11 at 23:05

I stumbled across this post with the very same issue of TeamViewer not starting minimized when set up for automatic launch during Ubuntu system startup.
The method described by @MJB on Jan 27 at 16:02 worked perfectly for me (I'm running Ubuntu 10.10 32bit, all updates installed up to this date, with teamviewer_linux_x32_v6.0.9224.deb).
I do not experience the glitches described by @misterben on Feb 14 at 18:50.
I installed GDevilspie via Ubuntu Software Center, ran it, created a new rule and set up GDevilspie to show the following code in the "Raw" tab:

( if 
( begin 
( is ( application_name ) "Teamviewer" )
( is ( window_name ) "TeamViewer" )
) 
( begin 
( minimize )
( println "match" )
)
)

The devilspie daemon is set to start up automatically during system start and teamviewer is set to start automatically via System --> Preferences --> Startup Applications (click Add, command: teamviewer).

It would be great if the developers of TeamViewer would integrate a start minimized switch for linux though...

Thanks MJB! :)

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.