Sublime Forum

Print to HTML Fails Silently on Kubunty 20.04 LTS

#1

Attempts to print (new install) on a clean Kubunty 20.04 LTS system result in these errors only visible in the python console (without console no errors, just no function):

Plain text or no text, defaulting to: <pygments.lexers.TextLexer>
Traceback (most recent call last):
  File "/snap/sublime-text/85/opt/sublime_text/sublime_plugin.py", line 1082, in run_
    return self.run(edit, **args)
  File "/home/mnagy/.config/sublime-text-3/Packages/Print to HTML/PrintToHTML.py", line 131, in run
    send_to_browser(html)
  File "/home/mnagy/.config/sublime-text-3/Packages/Print to HTML/PrintToHTML.py", line 

164, in send_to_browser
desktop.open(tmp_html.name)
File “/home/mnagy/.config/sublime-text-3/Packages/Print to HTML/desktop/init.py”, line 287, in open
return _run(cmd, 0, wait)
File “/home/mnagy/.config/sublime-text-3/Packages/Print to HTML/desktop/init.py”, line 86, in _run
opener = subprocess.Popen(cmd, shell=shell)
File “./python3.3/subprocess.py”, line 819, in init
File “./python3.3/subprocess.py”, line 1448, in _execute_child
FileNotFoundError: [Errno 2] No such file or directory: ‘kfmclient’

Any idea how to proceed? There is no file named ‘kfmclient’ on this system anywhere.

  • Michael
0 Likes

#2

It looks like you are using the snap version of Sublime Text. You may find that printing works better with the repository version of ST, as snap has its own directory structure.
This happened to me on Ubuntu when I used the repository version of ST but the the snap version of Firefox, with ExportHTML to print. No error message, it just would not print.
When I switched to the normal version of Firefox, printing occurred as usual. YMMV.

0 Likes

#3

Thank you for your reply, it seemed hopeful. Unfortunately, even after uninstalling the snap package and scrubbing the file system, and then installing the ‘apt get’ one, I have the same issue. I have tried both Print to HTML and EasyPrint (after installing escript/erlang) at this point, both fail differently but silently. Sigh. This print issue is the one gripe I have with Sublime, which I have used for years on multiple platforms. But each time I reinstall, even on the ‘same’ platform, I end up struggling with printing (again).

Additional suggestions welcome!

  • Michael
0 Likes

#4

Re-reading your reply, you mention using non-snap version of Firefox. At this point, I have no snap stuff on Kubuntu at all, and I normally use Chrome. I’ll give firefox a try just for kicks.

0 Likes

#5

Bingo! Buried in the __init__.py script within the .config folder under my user home directory is an explicit reference to the kfmclient. A bit of googling and I now see that utility is now called kioclient5 under the latest version of KDE. I updated the line in __init__.py and eh voila, it now works (after logging off and back on to reset desktop cache).

  • Michael
0 Likes

#6

Happy that it worked out for you. Cheers!

0 Likes