question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pasting from Nautilus to editor pastes the file name and not the path

See original GitHub issue

Issue Type: Bug

I recently re-installed vscode to the latest version. My OS is Ubuntu 20.04 and it is up to date.

For some reason, I can’t copy the path of files from nautilus/filemanger and paste it directly into vscode.

Pasting anywhere else in the system works fine. Also, pasting into the integrated terminal of vscode works fine also.

Pasting into scripts I write doesn’t work.

Please note that this issue only happens if the source is the file/manager (nautilus)

VS Code version: Code 1.66.2 (dfd34e8260c270da74b5c2d86d61aee4b6d56977, 2022-04-11T07:49:24.808Z) OS version: Linux x64 5.13.0-40-generic snap Restricted Mode: No

System Info
Item Value
CPUs Intel® Xeon® W-2245 CPU @ 3.90GHz (16 x 3900)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 0, 0, 0
Memory (System) 62.50GB (55.98GB free)
Process Argv –no-sandbox --force-user-env --unity-launch
Screen Reader no
VM 0%
DESKTOP_SESSION ubuntu
XDG_CURRENT_DESKTOP Unity
XDG_SESSION_DESKTOP ubuntu
XDG_SESSION_TYPE x11
Extensions: none
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30443607
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
pythonvsnew555:30457759
vscscmwlcmt:30465135
cppdebug:30475216
vscaac:30438847

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
ralfriegel5commented, Jun 20, 2022

same for me. Before finding this issue, I opened a topic on stackoverflow:

https://stackoverflow.com/questions/72247775/copy-paste-filepath-from-nautilus-files-in-ubuntu-does-not-work-anymore

In my case only the filename gets copied. Everywhere else it works.

0reactions
hedietcommented, Dec 9, 2022

This is how we read text: https://github.com/microsoft/vscode/blob/376af084af1ef6ebf35cc1176dca84768aaf42d7/src/vs/platform/clipboard/browser/clipboardService.ts#L133

Maybe we can use one of the other read methods to mimic this behavior.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Correct way to copy-paste file location from nautilus into a file ...
Select the file or folder whose path you'd like to copy in Nautilus. Ctrl+c to copy in Nautilus then Ctrl+Shift+v to paste to...
Read more >
[SOLVED] paste path from nautilus into editor appends x ...
Since I moved from Ubuntu 16 to 19 there is a change in behaviour when I paste a file into my text editor....
Read more >
Easiest way to copy a filepath in Nautilus? : r/gnome - Reddit
Right (secondary) click on file/folder and `Copy` or select file/folder and `Ctrl + C`. Then right click and `Paste` the path as a...
Read more >
Copy/Paste filepath from Nautilus/Files in Ubuntu does not ...
This pastes only the the filename without the path, e.g. only somefile.txt instead of /home/rolle/tmp_files/somefile.txt . Pasting this into ...
Read more >
Copy a file from a nautilus-script to clipboard
After your manually copy/cut, you can perform endless actions (either in Nautilus or elswhere) and the Ctrl+V paste in Nautilus will work, but ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found