Sample Header Ad - 728x90

Is $PATH environment variable of a desktop environment different from that in a shell?

1 vote
2 answers
2189 views
I am trying to find the .desktop file for qtcreator, so I write this: $ for p in ${XDG_DATA_DIRS//:/ }; do grep -rni 'qtcreator' $p; done And here is the most relevant lines: /usr/share/app-install/desktop/qtcreator-plugin-ubuntu:ubuntusdk.desktop:2:X-AppInstall-Package=qtcreator-plugin-ubuntu /usr/share/app-install/desktop/qtcreator-plugin-ubuntu:ubuntusdk.desktop:6:Exec=qtcreator %F /usr/share/app-install/desktop/qtcreator-plugin-ubuntu:ubuntusdk.desktop:7:Icon=ubuntu-qtcreator /usr/share/app-install/desktop/qtcreator:qtcreator.desktop:2:X-AppInstall-Package=qtcreator /usr/share/app-install/desktop/qtcreator:qtcreator.desktop:6:Exec=qtcreator %F /usr/share/app-install/desktop/qtcreator:qtcreator.desktop:7:Icon=QtProject-qtcreator /usr/share/app-install/desktop/qhimdtransfer:qhimdtransfer.desktop:12:#Icon=qtcreator_logo_32 I think the qtcreator:qtcreator.desktop is the desktop entry for QtCreator, so I open it and find out: [Desktop Entry] X-AppInstall-Package=qtcreator X-AppInstall-Popcon=292 X-AppInstall-Section=universe Exec=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=9 X-Ubuntu-Gettext-Domain=app-install-data **qtcreator is not in the variable $PATH of the shell**. But I can still launch QtCreator in gnome unity. From the [freedesktop-exec-variables](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables) I noticed > If no full path is provided the executable is looked up in the $PATH environment variable used by the desktop environment. ### Question Is $PATH environment variable of a desktop environment different from that is a shell? If so, where is the config file containing the $PATH variable for desktop environment? I install a newer version of QtCreator then launch QtCreator in desktop and find out it references to the newer version without changing the qtcreator:qtcreator.desktop file. I think there is something to with the path of qt? Desktop environment: gnome OS: ubuntu16.04 **Edit** The actual problem I encountered was not about $PATH(see my answer blow). Gilles' answer is actually the answer to `Is $PATH environment variable of a desktop environment different from that in a shell?' so I accepted it in case that someone has the same doubt as me.
Asked by z.h. (1084 rep)
Jul 1, 2018, 12:36 AM
Last activity: Jul 1, 2018, 10:33 AM