Change:
A Visual Studio Code workspace file is currently recognised in Linux as a normal plain text file. This is because there isn't a MIME type for this file. Applications can provide additional MIME types as described here: Not having a MIME type has a couple of issues, for example the files are shown as plain text files in the GUI, which makes it hard to distinguish source code files from the workspace file. This slows down navigating to a workspace and opening it. Find the workspace in the following screenshot ! It's currently impossible to theme such a file because it's not seen as a different MIME type:
(Experimental duplicate detection) Thanks for submitting this issue. Please also check if it is already covered by an existing one, like: <!-- score: 0.461 --<!-- potentialduplicatescomment --
This also means that you can't make double clicking the workspace from a file browser open it in vscode, unless you're OK with all text files opening in vscode, which is probably not what most folks want.
This bug has been fixed in to the latest release of ! you can help us out by confirming things are working as expected in the latest Insiders release. If things look good, please leave a comment with the text to let us know. If not, please ensure you're on version of Insiders (today's or later - you can use in the command pallete to check), and leave a comment letting us know what isn't working as expected. Happy Coding!
Hi can you verify this issue? Check out the previous comment.
I tried to verify this but am not sure how to do this myself. I've not used desktop linux extensively; I tried reinstalling Insiders from the on Lubuntu to see if it associated files with VS Code, but that didn't happen.
Verified by installing insiders from on Ubuntu and was able to see mimetype and set a custom icon ! upon uninstalling it was removed.

Discussion:
.pipe(replace('@@LICENSE@@', product.licenseName)) .pipe(rename('usr/share/appdata/' + product.applicationName + '.appdata.xml')); <ins> const workspaceMime = gulp.src('resources/code-workspace.xml', { base: '.' }) .pipe(replace('@@NAME_LONG@@', product.nameLong)) .pipe(replace('@@NAME@@', product.applicationName)) .pipe(rename('usr/share/mime/packages/' + product.applicationName + '-workspace.xml')); </ins> const icon = gulp.src('resources/linux/code.png', { base: '.' }) .pipe(rename('usr/share/pixmaps/' + product.linuxIconName + '.png'));

.pipe(replace('@@UPDATEURL@@', product.updateUrl || '@@UPDATEURL@@')) .pipe(rename('DEBIAN/postinst')); <del> const all = es.merge(control, postinst, postrm, prerm, desktops, appdata, icon, bash_completion, zsh_completion, code); </del> <ins> const all = es.merge(control, postinst, postrm, prerm, desktops, appdata, workspaceMime, icon, bash_completion, zsh_completion, code); </ins> return all.pipe(vfs.dest(destination)); };

.pipe(replace('@@LICENSE@@', product.licenseName)) .pipe(rename('usr/share/appdata/' + product.applicationName + '.appdata.xml')); <ins> const workspaceMime = gulp.src('resources/code-workspace.xml', { base: '.' }) .pipe(replace('@@NAME_LONG@@', product.nameLong)) .pipe(replace('@@NAME@@', product.applicationName)) .pipe(rename('BUILD/usr/share/mime/packages/' + product.applicationName + '-workspace.xml')); </ins> const icon = gulp.src('resources/linux/code.png', { base: '.' }) .pipe(rename('BUILD/usr/share/pixmaps/' + product.linuxIconName + '.png'));

const specIcon = gulp.src('resources/linux/rpm/code.xpm', { base: '.' }) .pipe(rename('SOURCES/' + product.applicationName + '.xpm')); <del> const all = es.merge(code, desktops, appdata, icon, bash_completion, zsh_completion, spec, specIcon); </del> <ins> const all = es.merge(code, desktops, appdata, workspaceMime, icon, bash_completion, zsh_completion, spec, specIcon); </ins> return all.pipe(vfs.dest(getRpmBuildPath(rpmArch))); };

<ins> <?xml version="1.0" encoding="UTF-8"?> <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> <mime-type type="application/x-@@NAME@@-workspace"> <comment>@@NAME_LONG@@ Workspace</comment> <glob pattern="*.code-workspace"/> </mime-type> </mime-info> </ins>

StartupNotify=false StartupWMClass=@@NAME_SHORT@@ Categories=Utility;TextEditor;Development;IDE; <del> MimeType=text/plain;inode/directory; </del> <ins> MimeType=text/plain;inode/directory;application/x-@@NAME@@-workspace; </ins> Actions=new-empty-window; Keywords=vscode;

desktop-file-install /usr/share/applications/@@NAME@@-url-handler.desktop fi <ins> # Update mimetype database to pickup workspace mimetype if hash update-mime-database 2>/dev/null; then update-mime-database /usr/share/mime fi </ins> if [ "@@NAME@@" != "code-oss" ]; then # Remove the legacy bin command if this is the stable build if [ "@@NAME@@" = "code" ]; then

# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. <del> rm -f /usr/bin/@@NAME@@ </del>  No newline at end of file <ins> rm -f /usr/bin/@@NAME@@ # Update mimetype database for removed workspace mimetype if hash update-mime-database 2>/dev/null; then update-mime-database /usr/share/mime fi </ins>

cp -r usr/share/@@NAME@@/* %{buildroot}/usr/share/@@NAME@@ cp -r usr/share/applications/@@NAME@@.desktop %{buildroot}/usr/share/applications cp -r usr/share/applications/@@NAME@@-url-handler.desktop %{buildroot}/usr/share/applications <ins> cp -r usr/share/mime/packages/@@NAME@@-workspace.xml %{buildroot}/usr/share/mime/packages/@@NAME-workspace.xml </ins> cp -r usr/share/pixmaps/@@ICON@@.png %{buildroot}/usr/share/pixmaps cp usr/share/bash-completion/completions/@@NAME@@ %{buildroot}/usr/share/bash-completion/completions/@@NAME@@ cp usr/share/zsh/site-functions/_@@NAME@@ %{buildroot}/usr/share/zsh/site-functions/_@@NAME@@

#	fi #fi <ins> # Update mimetype database to pickup workspace mimetype update-mime-database /usr/share/mime &> /dev/null || : </ins> %postun if [ $1 = 0 ]; then rm -f /usr/bin/@@NAME@@ fi <ins> # Update mimetype database for removed workspace mimetype update-mime-database /usr/share/mime &> /dev/null || : </ins> %files %defattr(-,root,root) /usr/share/@@NAME@@/ /usr/share/applications/@@NAME@@.desktop /usr/share/applications/@@NAME@@-url-handler.desktop <ins> /usr/share/mime/packages/@@NAME-workspace.xml </ins> /usr/share/pixmaps/@@ICON@@.png /usr/share/bash-completion/completions/@@NAME@@ /usr/share/zsh/site-functions/_@@NAME@@