I'm using Ubuntu 17.04, with the Unity UI. I created an icon for an app (LyX) in the launch bar. But when I click the icon, it doesn't just launch LyX, it opens up one of my (old) LyX files.
What I originally did: Originally, while I had LyX open, I right clicked on it's icon in the launch bar and selected "Lock to launcher". I suspect that I might have had the offending file open at the time.
What I tried in order to fix the problem: I right clicked on the LyX icon in the launch bar and selected "Unlock from launcher". Then I opened up LyX and made sure that no LyX documents were open. Following this, I again added the LyX icon to the launcher by right clicking and selecting "Lock to launcher". But the problem persists.
Additional things I tried:
I removed the LyX via
sudo apt-get remove lyx. Then I installed it again via
sudo apt-get install lyx. After this, I launched LyX from the command line and made sure that no LyX documents were open. Then I again selected "Lock to launcher". But the problem persists.
Additional issue: Just noticed that when I hold down Super (Windows key), search for LyX and then launch it, it again launches with that particular file open. I.e. the same problem occurs when using Dash.
This isn't a major problem, but I'm finding it really annoying.