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 have an Ubuntu 12.04 LTS CloneZilla image in which I have to install TeamViewer 9. My first approach was to install TeamViewer on the OS and then save a copy of the image. After cloning this image on other machines TeamViewer has got duplicated ID. This is expected because it is a whole copy of the hard disk. To avoid this duplication of TeamViewer ID I am trying to install it on first system boot-up. For this I have written a bash script that does the job but I am unable to find a place to put the invocation of this bash script. Since my desktop manager is lightDM I tried to place that call in /etc/init/lightdm.conf but then Ubuntu never starts X server for some reason. What options below should I use to get this working?

  1. If I'm to continue with the above approach where should I put my TeamViewer installation script? IMO it should be on a Upstart script that runs before window manager (In my case it is OpenBox)
  2. Is this a good approach to install application on Ubuntu startup?
  3. If I can remove TeamViewer configuration just before creating the image, what specific files should I remove to allow TeamViewer to pick up new ID. I am very specific to TeamViewer 9 (NOT 8 or 7)? This can be the easiest way to do this so that I don't have to run installation script on Ubuntu startup level. I have already done this for TeamViewer 7 where I delete "wine" folder of current user's home just before cloning. That way when I restore the image on a new machine it picks up a new ID. TeamViewer 9 may have changed this behaviour and it does not work now.
share|improve this question
    
rc.local? You could put the command to install it in there - but this will repeat during the next boot ups, unless you set another script to remove it... you need to make rc.local executable by the way - chmod +x rc.local. –  Wilf Dec 31 '13 at 10:13
    
Yes, I already have few scripts running in rc.local but it does not seem to work only for the first time. Soon after a machine is restored with cloned image, it does not work but all subsequent bootups work as expected. –  Bunti Dec 31 '13 at 11:02
    
Just to be clear I added TeamViewer installation script to rc.local . Part of this installation script adds another entry to rc.local to start TeamViewer daemon. In every other system boots, installation script will also run but it checks for TeamViewer installation and exits automatically to avoid installing TeamViewer over and over. Newly added entry that start TeamViewer daemon will be run. –  Bunti Dec 31 '13 at 11:14
    
It should work... it may just need to wait for the hardware to be setup, as it has no internet connection or something, or the place where the script is located has not been mounted yet (for that, you could just place the command directly within the rc.local file) - few possibilities here. rc.local is useless when it comes to errors, there are a few possible solutions here –  Wilf Dec 31 '13 at 11:16
    
Ok. I ll give it a try. But my method too works with one major problem. After few X server restarts, TeamViewer UI does not start but searching through the process list I can see TeamViewer UI, wine server and TeamViewer daemon is running. –  Bunti Jan 2 at 6:28

1 Answer 1

up vote 0 down vote accepted

Ok, Answering my own question, I got it working by invoking the TeamViewer installation script as a post script script. Embedding the TeamViewer installation script call in rc.local did not install it correctly.

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.