I have two versions of qtcreator: first is installed by apt and binary is located in /usr/bin/. Second is installed in a custom location (I used a bundle from qt website). I run second version from terminal and then I choose option Lock to Launcher for qt icon. When I close qtcreator and launch again using that icon I get qtcreator from /usr/bin. Why ? How to fix it ?
Asked
Active
Viewed 4,330 times
1
Sylvain Pineau
- 61,564
- 18
- 149
- 183
Irbis
- 507
- 3
- 7
- 16
-
possible duplicate of [Creating a .desktop file for a new application](http://askubuntu.com/questions/281293/creating-a-desktop-file-for-a-new-application) – muru Oct 23 '14 at 07:54
1 Answers
1
To force the qtcreator launcher to point to the right location you can copy the .desktop file of the version installed by apt-get in your $XDG_DATA_HOME folder (default is ~/.local/share)
Open a terminal and copy the
/usr/share/applications/qtcreator.desktopfile to~/.local/share/applications:cp /usr/share/applications/qtcreator.desktop ~/.local/share/applicationsEdit the
Exec=command to use your custom location:[Desktop Entry] Exec=<path_to_your_custom_location>/qtcreator %F Icon=QtProject-qtcreator Type=Application Terminal=false Name=Qt Creator GenericName=Integrated Development Environment MimeType=text/x-c++src;text/x-c++hdr;text/x-xsrc;application/x-designer;application/vnd.nokia.qt.qmakeprofile;application/vnd.nokia.xml.qt.resource; Categories=Qt;Development;IDE; InitialPreference=9Now if you lock this new
.desktopfile in your Unity Launcher it should start the right version.
Reference: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
Sylvain Pineau
- 61,564
- 18
- 149
- 183
-
It works only if I modify a file which is located in /usr/share/applications – Irbis Oct 23 '14 at 08:33
-
1@Irbis: you have to unlock qtcreator from the launcher and start the custom `.dekstop` one from nautilus. Ensure that the custom one has the +x permission. Lock it to the launcher and it should always use the custom location – Sylvain Pineau Oct 23 '14 at 08:54
-
1@Irbis: Or simpler, open it with the Dash. it should use the right version – Sylvain Pineau Oct 23 '14 at 08:56