Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 936915 - app-editors/vscode: Problem with default desktop arguments
Summary: app-editors/vscode: Problem with default desktop arguments
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor
Assignee: Adel KARA SLIMANE
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-29 22:36 UTC by norbert
Modified: 2024-12-28 08:33 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description norbert 2024-07-29 22:36:11 UTC
I installed VSCode as the only text editor and whenever I tried to open a file, it opened a new empty window.

I realized that the "code.desktop" file has an argument called "--unity-launch" and it didn't make sense to be there. Since I removed it, my problem has been resolved.
Comment 1 Kostadin Shishmanov 2024-11-21 19:01:22 UTC
This can still be reproduced because of the `--enable-wayland-ime` launch argument. Removing it makes VSCode open whatever file you tried to open instead of opening a new empty "session". 

Using Plasma/Wayland 6.2.3 if that matters.

See also: https://www.reddit.com/r/kde/comments/1fyvtb8/vscode_doesnt_open_files_instead_it_just_starts/
Comment 2 John-Henry Lim 2024-12-13 16:51:49 UTC
The cause mentioned in the Reddit thread isn't the sole cause.

The .desktop file should add `--` right before `%U` to tell VSCode that argument parsing is complete, see: https://github.com/microsoft/vscode/issues/234479

Alternatively, Nix fixed it by replacing `--enable-wayland-ime` with `--enable-wayland-ime=true` to specify the argument for the flag, see: https://github.com/NixOS/nixpkgs/pull/361341
Comment 3 Adel KARA SLIMANE 2024-12-13 17:15:06 UTC
Hey,

This issue will be solved with https://github.com/gentoo/gentoo/pull/38689

If you can please confirm it's indeed the case.

Thanks !
Comment 4 Larry the Git Cow gentoo-dev 2024-12-28 08:33:15 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63a6681d4a31af0199594ab932b1be4f0da9a583

commit 63a6681d4a31af0199594ab932b1be4f0da9a583
Author:     Adel KARA SLIMANE <adel.ks@zegrapher.com>
AuthorDate: 2024-09-22 14:46:02 +0000
Commit:     Arthur Zamarin <arthurzam@gentoo.org>
CommitDate: 2024-12-28 08:32:34 +0000

    app-editors/vscode: desktop file fixups
    
    Closes: https://bugs.gentoo.org/936915
    
    Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>
    Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>

 app-editors/vscode/files/code-url-handler.desktop |  3 ++-
 app-editors/vscode/files/code.desktop             | 13 +++++++++++--
 2 files changed, 13 insertions(+), 3 deletions(-)