Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file can not opened with mouse right click #212061

Closed
ziyouchutuwenwu opened this issue May 6, 2024 · 4 comments
Closed

file can not opened with mouse right click #212061

ziyouchutuwenwu opened this issue May 6, 2024 · 4 comments
Assignees

Comments

@ziyouchutuwenwu
Copy link

ziyouchutuwenwu commented May 6, 2024

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version:
Version: 1.89.0
Commit: b58957e67ee1e712cebf466b995adf4c5307b2bd
Date: 2024-05-01T02:08:25.066Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Linux x64 6.6.26-1-MANJARO
  • OS Version:
$ neofetch
██████████████████  ████████   mmc@manjaro 
██████████████████  ████████   ----------- 
██████████████████  ████████   OS: Manjaro Linux x86_64 
██████████████████  ████████   Host: HP ProDesk 480 G6 MT 
████████            ████████   Kernel: 6.6.26-1-MANJARO 
████████  ████████  ████████   Uptime: 45 mins 
████████  ████████  ████████   Packages: 1332 (pacman) 
████████  ████████  ████████   Shell: zsh 5.9 
████████  ████████  ████████   Resolution: 1920x1080 
████████  ████████  ████████   DE: Xfce 4.18 
████████  ████████  ████████   WM: Xfwm4 
████████  ████████  ████████   WM Theme: JacWin10 
████████  ████████  ████████   Theme: Windows10 [GTK2/3] 
████████  ████████  ████████   Icons: Faenza [GTK2/3] 
                               Terminal: terminator 
                               CPU: Intel i5-9500 (6) @ 4.400GHz 
                               GPU: Intel CoffeeLake-S GT2 [UHD Graphics 630] 
                               Memory: 5964MiB / 31941MiB

Steps to Reproduce:

1. open file with right click, choose "open with vscode"
2. file should be opened by vscode, and content should be displayed, but only vscode opened with new blank file.
3. previous versions works fine. I use vscode everyday.
@cs96and
Copy link

cs96and commented May 6, 2024

I am seeing this behaviour too on Debian 12. It also prevents opening a whole directory with vscode from working too.

@cs96and
Copy link

cs96and commented May 6, 2024

BTW, I am using KDE on Debian 12. I found that by editing .local/share/applications/code.desktop, I can get the right click functionality to work again

Original:

[Desktop Action new-empty-window]
Exec=/usr/share/code/code --no-sandbox --new-window %F
Icon=com.visualstudio.code
Name=New Empty Window

[Desktop Entry]
Actions=new-empty-window;
Categories=Utility;TextEditor;Development;IDE;
Comment[en_GB]=Code Editing. Redefined.
Comment=Code Editing. Redefined.
Exec=/usr/share/code/code --no-sandbox --unity-launch %F
GenericName[en_GB]=Text Editor
GenericName=Text Editor
Icon=com.visualstudio.code
Keywords=vscode;
MimeType=text/plain;inode/directory;
Name[en_GB]=Visual Studio Code
Name=Visual Studio Code
Path=
StartupNotify=false
StartupWMClass=Code
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-Desktop-File-Install-Version=0.23
X-KDE-SubstituteUID=false
X-KDE-Username=

The fix is to change the Exec in the [Desktop Entry] section to the following...

Exec=/usr/share/code/code --no-sandbox --unity-launch --new-window %F

I.e add the --new-window switch.

You may have to run kbuildsycoca5 after editing the file to get KDE to use the updated file.

@ziyouchutuwenwu
Copy link
Author

it's aur package issue.

@cs96and
Copy link

cs96and commented May 6, 2024

it's aur package issue.

I don't use Arch though, I'm on Debian.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants