When to tell current employer that I want to quit and switch to a different PhD I am currently employed as a scientific employee at a research institute, which means I get a salary but am not currently working on a PhD. Originally I planned to begin my PhD at this institute within the first year of my employment (beginning right away was not possible). 

However, since I began this position I realized more and more that I did not enjoy the work and therefore I do not want to start do my PhD at this institute and instead look for different PhD positions in a related field at the same university. 

However, I do not want to quit on the spot and look for a new position because


Finding a new PhD position might take a long time because there aren't a lot of open positions and it is not easy (for me at least) to even be considered and I am not sure if I can find a position at all. This means if I quit on the spot I would have to live without a salary for 2-6 months (after this time I would most likely just cave in and look for a job in industry which I assume will be a lot easier).
The people at my current job have been nothing but nice to me and I don't want to upset them by quitting before I can at least finish some of my open projects and give them some time to find somebody to replace me.


Another alternative would be to not quit on the spot but instead to look for a new position "secretly". I am not sure how I feel about this option because it feels very insincere and I would be afraid that someone could find out about it (since I am looking for positions at the same university)

For these reasons, I assumed that telling my current supervisor about me wanting to quit at some point in the future but offering to stay for the intermediate period is in both our best interests. 

The problem I have is that I have a feeling that in the period after telling them, the work environment will be very awkward because they will be aware that I do not like the job and am just doing it for the salary.
Also, I am currently assuming that I wouldn't immediately be "fired" after telling them that I am looking for something else. If this assumption isn't true then not telling them would be the much smarter move.

Is there anyone who could give advice and confirm my suspicion that telling them openly that I will look for new positions is indeed the best move or tell me why it isn't?
I wonder if the choice is as stark as you think. It ought to be possible to begin a search for a new opportunity without advising anyone of your search. You can do this informally, of course, with other professors at other institutions, but also formally. 

The time that it will be necessary to make your desires know can be fairly late, say when the new place requires letters of recommendation and letters from other sources won't do. 

In some labs it is required to release employees at the first hint they might want to leave. 

But if you can line something up that is pretty firm, subject to letters, you can finesse the decision even then. "I just got a fantastic opportunity and wish to follow it up", rather than "I've been looking for something else for a while now...". 

But even if you make a commitment to leave, don't neglect your current work. Good work will make those letters better and easier to obtain. 

But, you won't really know how employable you are until you start to look and see what feedback you get. 

It might be necessary for you, in the short term, to let prospective supervisors know that your search is still confidential. I think most people would respect that if you give them a reason.