Printing problem with 20.04

Check for typos, then. Like I said, i just confirmed it worked. That means I confirmed the problem first (printing to a file produced a blank PDF) and then resolved it by implementing the fix (printing to a file produced the appropriate content).

Is it possible that it has something to do with the german version?

I’ve checked for typos. And also copied and pasted your posts. Always got a blank pdf or blank print out.

Nope, the Exec line knows no language boundaries. Translations don’t happen on computer-readable elements. For example, cd stands for “change directory,” but that might not make sense in German. No one translates it. In contrast, the GenericName is what’s displayed in the tooltip, which you can see is “Textverarbeitung” in German, where it’s “Word Processor” in English. The Name key could be translated, but it’s kind of a brand name and, so it would not normally be translated. By the same token, American or British car manufacturer names or their model names aren’t translated when sold in Germany, but their manuals are.

I’m at a loss for what to tell you since I’m not having the same experience. You could try creating a shell script and referencing the full path to that shell script instead.

Alright, I’ll do that tomorrow (it’s past 2 o’clock in the morning over here). Many thanks for your help!

Before I’m off, am I the only one with that problem?

Well I confirmed the initial printing issue. I have not confirmed that anyone else can’t make my fix work, though. @HMollerCl @kc2bez @guiverc @apt-ghetto want to try it out?

I can confirm that your fix works. I edited the exec line to have the following:
Exec=env SAL_VCL_QT5_USE_CAIRO=true libreoffice --writer %U
In the desktop file /usr/share/applications/libreoffice-writer.desktop
I used sudo vim /usr/share/applications/libreoffice-writer.desktop to edit the file but you can use any editor you like. sudo nano or sudo featherpad would also be able to edit and save the file.

I then launched writer using “LibreOffice Writer” from the menu. Upon inspection of the about page I was able to verify my change worked. You can see the VCL: qt5+cairo
screenshot23

I then proceeded to craft a document, I inserted a few special characters for good measure. I was able to export the document as a PDF. The document looked as it appeared on my display. I added my printer to the system a, Xerox 3260. I was also able to print the document and it too appeared the same as my display.

1 Like

Please never start a graphical application with sudo, because there are several downsides.
Theoretically there is lxqt-sudo, but this is almost as bad as sudo.

It isn’t necessary to run the graphical application with elevated privileges, you only need elevated privileges for the write (and sometimes read) actions.

The best way to edit files with elevated privileges is (I took the file /etc/fstab as an example, because it is less typing for me):

VISUAL=featherpad sudoedit /etc/fstab

This will start the editor, which you have defined in the variable VISUAL, with normal user permissions. Of course you can define every other editor, you prefer. You can even define a non-graphical editor such as nano or vim, although in this cases it might be better to use EDITOR=vim instead of VISUAL=vim.

If you use always the same editor, you can add to the file ~/.bashrc the following line:

export VISUAL=featherpad

and after reopening the terminal you need only

sudoedit /etc/fstab

which opens your favourite editor without elevated privileges.

2 Likes

Here is a second confirm. I used the method as per @kc2bez above post. i.e using vim.

Should we not file a bug report on this?

2 Likes

Excellent points. Thank you for the corrections.

1 Like

I think this is an extension or at least related to the bug report mentioned in the release notes as that’s where the proposed fix came from. It was a wild guess on my part.

1 Like

Overlooked by me… :upside_down_face:sorry

1 Like

No, I think you’re kind of right. The bug report at least should be edited to include a larger scope. Feel free!

1 Like

An even better solution: add it to the LXQt environment variables.

1 Like

Thank you, now it works. But now I get the following screen everytime I try to open LibreOffice (and not open the odt through PCMan):
grafik
It doesn’t matter if I close the message or press “OK” - it reappears every single time and doesn’t open.
It says that LibreOffice has crashed and tries to restore the following documents - well, none.

Probably a LibreOffice bug. This may prove to be a solution.

Yes, that’s the downside of changing thr env variable, you cannot run office alone. You need to run an app (writer, calc, etc…)
Maybe @scro problem is that he edited writer .desktop but he opened lo with other .desktop?

@kc2bez there is another way like this: https://www.linuxuprising.com/2018/04/gksu-removed-from-ubuntu-heres.html

2 Likes