Score:1

notepadqq on ubuntu 22 on wsl deletes my file

et flag

I just installed Notepadqq v2.0.0 on Ubuntu 22.04.2 LTS, and it gave the following message when attempting to load a file on my Google Drive:

This file has been deleted from the file system. with Save and Ignore options.

NotepadqqErrorMsg

If I ignore, a zero length file is opened. If I choose SAVE, a zero length file is opened and my original file is truncated to zero bytes. If I cancel out of the operation, all is well on my file but I have nothing to edit.

Weird thing is that I have narrowed this behavior down to the following.

  • Open a DOS window in a directory with my file on Google Drive
  • Execute bash to open up a WSL bash terminal.
  • Attempt to open the file with Notepadqq.

Bug occurs.

If I click open a WSL prompt into my root directory and edit a file from there, Notepadqq seems to work correctly.

If I try this on the /mnt/c mount, Notepadqq seems to work correctly.

I have searched Google, searched Ask Ubuntu, and did an image search of the displayed image on Google image search. No joy with any of these.

Any suggestions?

ec flag
**Welcome to the Ask Ubuntu community.** Just to be clear, you're running in a WSL environment, and the application (Notepadqq) is generating an error in this environment? What's the output when you run `sudo notepadqq` on the command line? What about as a non-root user: `notepadqq`? Could be a permissions issue. Have you tried to reinstall the application?
NotTheDr01ds avatar
vn flag
I'm just not able to reproduce on WSL2 using Ubuntu 22.04 with Notepadqq 2.0-beta installed via `apt`. Opening a file on the Windows drive works fine, with no message regarding deletion. Some questions to help clarify - Does this happen with *any* file, or just this one particular one? The `pipe.sav` file looks to be working normally from the tab color - Is that file on the root filesystem?
NotTheDr01ds avatar
vn flag
Also, is that a USB drive, flash drive, etc.? Is the result any different if you use the `C:` drive (e.g. `/mnt/c/Users/<username>/forkwait.sav`)?
ClayD avatar
in flag
@richbl It will not run as root. Get message : " Notepadqq will ask for root privileges whenever they are needed if either 'kdesu' or 'gksu' are installed. Running Notepadqq as root is not recommended. Use --allow-root if you really want to." I did not allow it to contine. I get the original error with any file I open from a bash shell directly into a windows directory. It works fine when opened directly into my root directory but is very inconvenient, such that I don't use it. I have not tried reinstalling it yet.
ClayD avatar
in flag
@NotTheDr01ds This happens with all files I have tried. The pipe.sav file is one that it deleted so I started using a backup version to test with. I had it open in my root directory and it reopened automatically when I opened a copy from another directory. The one in root was not truncated. The other one was. I am on my G: drive. which is google drive. Not a usb stick or anything like that. Just went to my real C drive and did the same thing and it worked fine. Must be something to do with google drive.
NotTheDr01ds avatar
vn flag
@ClayD Good info! I've edited it into the question itself, but would appreciate your review to make sure that looks correctly. I'll see if I can reproduce based on the updated info. Thanks!
ClayD avatar
in flag
@NotTheDr01ds That seems to about cover it
NotTheDr01ds avatar
vn flag
@ClayD I haven't had a chance to install Google Drive on one of my systems to see if this can be worked around. It sounds like there's some conflict between the file-locking mechanism of Google Drive and the way that Notepadqq (and potentially other Linux applications) is operating.
ClayD avatar
in flag
@NotTheDr01ds I think you are right. Google drive does some odd stuff compared to most filesystems. Have to admit it is over my head though. Thanks for looking into this.
NotTheDr01ds avatar
vn flag
My gut feeling is that [this Super User question](https://superuser.com/q/1774272/1210833) is a similar (perhaps the same) root cause.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.