Problems when pasting text into LibreOffice Writer on Ubuntu 24.04

I am currently using LibreOffice 24.2.7.2 (x86_64) on Lubuntu 24.04.3 LTS, a Linux distribution based on Ubuntu 24.04.3 LTS. This same computer had previously used Manjaro Linux instead of Lubuntu, and I had no issues operating LibreOffice in Manjaro.

Since formatting the hard drive and installing Lubuntu, I’ve been having a problem with LibreOffice Writer. When I copy text from a plain text document (a .txt file) and paste it in to LibreOffice Writer, square brackets that are barely visible appear around the pasted text. I never saw that happen until I switched to Lubuntu, and the brackets are only created when I paste plain text into LibreOffice Writer.

I realized that these brackets pose a problem once text had been copied and pasted from file created by LibreOffice Writer. That text was a password that had first been copied and pasted from a plain text file (.txt) into LibreOffice Writer, and so it had the square brackets around it that I could not select with my mouse. Once the password was copied and pasted from LibreOffice Writer into VeraCrypt, the password was rejected. Apparently the square brackets get copied and pasted, even though I never authorized their creation and had seemingly never selected them with my mouse when performing the ‘copy’ function.

Based on what I’ve read by searching the web, the square brackets are DDE links / bookmarks. WHY are they suddenly appearing in LibreOffice Writer on Lubuntu, and why wasn’t think happening when I used LibreOffice Writer on Manjaro? How do I remove them, and how do I prevent them from appearing when copying text from a plain text document and then pasting it into LibreOffice Writer?

This is literally the first time I’ve had passwords spoiled by software, and it is frustrating. I’m not sure if the problem originates with LibreOffice or with Lubunu / Ubunutu.

This would actually be unexpected - at least when you paste as plain text. So this part needs additional investigation.

Using Navigator F5.

This would actually be unexpected - at least when you paste as plain text. So this part needs additional investigation.

Thank you for your feedback. Since I recently installed Lubuntu, and LibreOffice came pre-packaged with it, I am very confident that the ‘bookmarks’ are not appearing as a result of any settings I have changed.

The passwords were indeed copied from a plain text file. Originally, the original source of the passwords was a .txt file created in Windows using Notepad. The passwords were a combination of (regular English) characters, numbers, and standard special characters like !, @, #, $, %,^, &, *, etc.

Even when the same data had been copied from the .txt file into LibreOffice Writer when Manjaro was on the same computer, there was no problem of ‘bookmarks’ appearing and/or changing the data when it was copied from LibreOffice Writer and pasted into VeraCrypt.

Using Navigator F5.

If I select a bookmark via that menu, right-click on the bookmark listed, and then select “Delete bookmark”, that should make the text in LibreOffice Writer functionally identical to the text in the .txt file (where it had originated from). Is that correct? (When I say “functionally identical”, I mean that both versions of the text will function the same when pasted into VeraCrypt.)

Note that the source of the passwords is immaterial. The bookmarks appear not in the plain text file, but in the Writer file, when you copy text from it, because some application then handles the changed clipboard content incorrectly.

When I wrote that “This would actually be unexpected”, what I specifically meant was, that even when you have the bookmarks, they are not expected to affect copying the text (having the bookmarks) and pasting elsewhere. The bookmarks should not appear in the clipboard (at least its plain text format), so if you paste to your “VeraCrypt” as plain text, the bookmarks should make no difference.

No idea. I don’t use that “VeraCrypt”, and I don’t know why the problem happens to you due to the bookmarks (note that that was just a guess, and still needs to be debugged and confirmed). Again - make sure that you paste into “VeraCrypt” as plain text.

First of all, the context for the answer is tdf#159755 and klipper: ignore `application/x-openoffice-link` (!5296) · Merge requests · Plasma / Plasma Workspace · GitLab (and especially the discussion starting at this message).

The reason is, that the bookmarks appear when something tries to read the clipboard content of type application/x-openoffice-link. That type is a special clipboard type, which target apps use when establish the DDE link; when such applications do that, it is expected and normal that the source application creates the bookmark. However, some applications that manage clipboard use a naive approach of reading all clipboard formats just to store them in their history; and that naturally means that they read the mentioned special format, with the natural (unwanted) outcome.

Distros (or individual systems) may use different clipboard managers, with obviously different behavior with regards to the discussed problem.

The clipboard manager applications deal with a highly complex, shared, multi-format machinery, which is called clipboard. Use of naive methods is the bug, which needs to be fixed in those managers.

If I understood your post correctly, the problem seemingly stems from the clipboard built into Lubuntu. Manjaro Linux apprently had a different clipboard that did not include meta-data along with plain text that had been copied, but Lubuntu’s clipboard does so.

Shouldn’t the same problem of extra data being posted occur if I am copying a password from a plain text file directly into VeraCrypt while using Lubuntu?

No. The problem is not what the clipboard contains. The problem is what clipboard manager program does (it must not happily read everything in clipboard, because reading some clipboard formats provided by LibreOffice causes side effects by design).

No. But here you use term “from a plain text file” - but you never copy from “file”, but from an application (be it notepad++, or gedit, or LibreOffice Writer… whatever data they happen to display at the moment), so we may need to clarify what your phrase was meant to tell :slight_smile:

In Lubuntu, the default program for opening .txt files is FeatherPad 1.4.1. That is the program that had been displaying plain text that had originally been created with Notepad in Windows.

It seems that you were involved in discussions at https://bugs.documentfoundation.org/show_bug.cgi?id=159755 and klipper: ignore `application/x-openoffice-link` (!5296) · Merge requests · Plasma / Plasma Workspace · GitLab. I lost track of what page led to which destination, but I read something about the settings of a clipboard manager, and how they could be changed to prevent the problem of extra data from being saved into Klipper and then pasted from Klipper into other programs.

In Lubuntu, the clipboard manager is qlipper. When I right click on its icon and then select “Configure”, the window that appears has these settings (under the ‘Preferences’ tab, which is the only tab that seems relevant):

Clipboard entries count: 10 entries

Maximum display size: 30 characters

Trim whitespaces for every line: Enabled

Keyboard shortcut: Ctrl+Alt+V

Tray icon image: (Default)

Use platform specific extensions (Advanced) (Disabled):
No synchronization of clipboard and PSE (This is grayed out)

Clear items on exit Disabled

Synchronize history to storage instantly: Enabled

Confirm clear history: Confirm

I don’t see any obvious way to prevent meta-data from being saved in Qlipper when I copy text. I am not sure what I can do with Qlipper to prevent the problem from continuing.

You can file a bug report to it. That’s the most effective way to stop problems. Without that step, anything else is a workaround.

1 Like

If I can find a way to report the problem to the development team at Qlipper, how do you think it should be described? I think what is lacking is an option to only copy text verbaim, with no extra detail from the text (or about the text) being saved along with it in the clipboard. Does that sound right to you?

Also, apparently it is possible to switch clipboard managers in Linux distros like Lubuntu. Can you recommend one that does not have the problem that Qlipper apparently does?

I would do it this way:

  1. You explain what you see, when you open LibreOffice Writer, select some text in it, and do Ctrl+C. You see the brackets appearing around the selection, and the bookmark appearing in the Navigator, right? Also tell if this happens with Qlipper disabled completely (is that possible?).
  2. You point to the links I provided in the answer: one is the bug in our bug tracker, where I explain it; and the other is the similar bug in a similar manager, that is resolved by that other project.
  3. You may also provide a link to this Ask LibreOffice topic, as providing an overview.

You should not suggest specific ways how to fix that / which options should it provide to you. The developers need the details of the problem, not how users see the solutions :slight_smile: well - you can also add that to the end, but only after the important items above.

Clipper 6.3.3+ :slight_smile: But actually I’m not a Linux user, so no good suggestions from me (but others can have good ideas).

I created a new document in LibreOffice Writer, and as I was editing it, I noticed something: even when I selected text within this newly created document and then copied it to the clipboard, the DDE link / bookmark brackets appeared around the text that I had copied - even before I had pasted the text anywhere. This is very unwelcome, and I would very much like a way to stop my documents to get polluted with these bookmarks whenever I copy and/or paste text using LibreOffice.

According to Meta AI, the brackets are 'change tracking or 'revision marks. It claims that it is possible to stop them from appearing by going into Edit > Changes > Record and then unchecking “Record Changes,” but there isn’t any option it the Edit section of the menu called “Changes”. It also claims that it is possible to change the program’s default paste behavior by going into Tools > Options > LibreOffice Writer > General > Paste Options, but I see no such setting under the ‘General’ section.