[BETA TESTERS WANTED] Scrivenix — Automated Flatpak Installer for Scrivener 3 on Linux

Nitram3

Another question: Can you check in your KDE settings and tell me what your subpixel settings are?

I think it is in the settings at: KDE System Settings → Fonts → Configure → Sub-pixel rendering, but I’m not 100% sure.

It should be set to one of these:

  • RGB — horizontal RGB (most common, standard for most monitors)
  • BGR — horizontal BGR (some laptop panels, including many Asus)
  • VRGB — vertical RGB (rare, rotated displays)
  • VBGR — vertical BGR (rare, rotated displays)
  • None — no sub-pixel rendering, just grayscale antialiasing

Anti-Aliasing:

  • Enable
  • Exclude range from anti-aliasing

Sub-pixel rendering: RGB
Hinting: Slight

So 170% is an odd scaling factor and I think it could be a part of the problem. What happens if you drop back to 150%? Any change?

Regardless, let’s try giving Scrivener access to those Linux native fonts and see if they render more to your liking:

find /usr/share/fonts \( -name "*.ttf" -o -name "*.otf" \) -exec cp -n {} ~/.var/app/com.local.Scrivenix/wine/drive_c/windows/Fonts/ \;
  flatpak run --env=WINEPREFIX=$HOME/.var/app/com.local.Scrivenix/wine --command=wineboot com.local.Scrivenix

That will copy the fonts from the usr/share/fonts directory into the Scrivenix sandbox and then prompt Wine to refresh. Then you ought to be able to relaunch Scrivenix and see those fonts available. You can then go to File>Options>Appearance and work your way down through all the lefthand tabs to change the fonts for the binder, menus, notecards, etc to a native font and see how it does for you.

Let me know. If this fixes it, maybe I can build it into the script file for future builds.

1 Like

@nitram3
RGB sub-pixel rendering is what Wine’s ClearType expects, so that rules out one possible cause.

The next test is to disable Wine’s font smoothing entirely and let KDE’s FreeType render natively. Run this with Scrivenix closed, then relaunch:

flatpak run --env=WINEPREFIX=$HOME/.var/app/com.local.Scrivenix/wine --command=wine com.local.Scrivenix reg add “HKCU\Control Panel\Desktop” /v FontSmoothing /t REG_SZ /d 0 /f

If fonts look noticeably better, it confirms Wine’s ClearType is conflicting with KDE’s hinting pipeline and we can tune from there.

To revert if it looks worse:

flatpak run --env=WINEPREFIX=$HOME/.var/app/com.local.Scrivenix/wine --command=wine com.local.Scrivenix reg add “HKCU\Control Panel\Desktop” /v FontSmoothing /t REG_SZ /d 2 /f

One side note: The grayscale test earlier locking your DPI to 144 was unexpected behavior, so if the DPI locks again after this test just run the revert command and let me know.

1 Like

The command gave a bunch of errors.

002c:err:winediag:getaddrinfo Failed to resolve your host name IP
002c:err:wineboot:process_run_key Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -a -r" (2).
0078:fixme:seh:WerSetFlags (2) stub
0078:fixme:heap:RtlSetHeapInformation HEAP_INFORMATION_CLASS 1 not implemented!
0084:fixme:process:SetProcessShutdownParameters (00000380, 00000000): partial stub.
0084:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 00006FFFFEE825B7, 28) stub
0084:fixme:ver:GetCurrentPackageId (00007FFFFF01EB50 0000000000000000): stub
00a8:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
00a8:fixme:seh:WerSetFlags (2) stub
00a8:fixme:heap:RtlSetHeapInformation HEAP_INFORMATION_CLASS 1 not implemented!
00b4:fixme:process:SetProcessShutdownParameters (00000380, 00000000): partial stub.
00b4:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 7B003241, 28) stub
00b4:fixme:ver:GetCurrentPackageId (012EECCC 00000000): stub
00d0:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\winebth": c00000e5
0034:fixme:service:scmdatabase_autostart_services Auto-start service L"winebth" failed to start: 1359
reg: Invalid system key

I’ve checked anyway, but it looks similar to me, but I am unsure because I played around a lot with different fonts.
Can someone please tell me what the default fonts are that Scrivener uses for the UI?

Segoe UI is the default UI font for the Windows variant of Scrivener.

2 Likes

Thanks. Yea, it’s exactly the same. The command didn’t work.

Found this thread with the help of a friend after trying the pinned rdewalt method and Lutris. The other two install methods largely worked fine, but had a goofy bug where the main font selector was inoperable and sometimes crashed the program. Scrivenix resolved that issue, so thank you for your work on this project! Also, I am a Linux noob transitioning away from Windows as of this week, so if I say anything super ignorant, apologies.

Scrivenix install works on Nobara 43 (KDE Plasma desktop version) (Wayland)

1440p and 1080p monitors –somewhere around 144dpi seems okay, but still tweaking UI & physical desk setup for a new PC

Here’s some notes from the install process:

udisks2

udisks2 caused me a bunch of anxiety, since it changed the ID and Vendor fields inside the pop-up dialogs for drive mounting. Other new users to Linux that are relying heavily on GUI might have a similar panic attack, thinking their system’s security became compromised. It might be helpful to make a note about this in the install directions or in the installer itself.

Possible Bazaar flatpak manager compatibility issues

The Scrivenix install seems to temporarily or irregularly break Bazaar, which is my OS’s suggested flatpak manager. On open, the program hangs for a litle bit, then closes. What little debugging I could figure out seemed to point to a bwrap issue. Here’s the few lines before the app closes:

F: Running '/usr/bin/bwrap --args 72 -- /usr/bin/xdg-dbus-proxy --args=75'
F: Running '/usr/bin/bwrap --args 72 -- bazaar '%U''
Failed to register: Timeout was reached

A PC restart found Bazaar back to normal & functioning, with Scrivenix listed in the GUI. Bazaar also seemed to properly notify me of necessary updates and handled them without error. However, the next time I tried to open Bazaar, it exhibited the same crash. (I didn’t debug, sorry!) I don’t have enough data yet to say if Scrivenix is causing this to happen, or if something else is the culprit. To note, I’ve also been having some (harmless?) bwrap issues with Steam that I haven’t gotten around to troubleshooting–unsure if related. If I had to hazard an ignorant guess, perhaps the manual install of a flatpak isn’t playing nice with how Bazaar likes to keep track of its installs, related files, and/or folders?

Accidental launch of multiple instances of Scrivenix

Accidentally launching a 2nd instance of Scrivenix causes it to lock up badly enough that both the processes and the window have to be terminated manually; the window, in particular, must be killed, even after the processes have ended. GUI prompts asking to terminate the window do absolutely nothing.

cabextract

Nobara comes with 1.11 already installed. Scrivenix installation failed as follows:

flatpak-builder --force-clean --install --user build-dir com.local.Scrivenix.yml
Downloading sources
Downloading https://www.cabextract.org.uk/cabextract-1.11.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
Failed to download sources: module cabextract: The requested URL returned error: 403

Commenting out the cabextract section of the .yml allowed the installation to proceed. My troubleshooting friend, on ubuntu, also had the module installed on his system–so many future users might be affected by this. Could a version check & bypass be added for this step? (And, perhaps any other modules that an OS might already have installed?)

Fonts

Scrivener’s default UI fonts aren’t part of the Scrivenix install for me. Not sure if that’s intentional, or if my particular install failed in some way. As such, the entire UI defaults to Arial, which displays very poorly on my system–especially if the DPI is set too high or too low, or OS sub-pixel rendering is off. This is pretty rough to deal with during initial install, DPI tweaking, test-opening important projects, etc….

My OS had sub-pixel rendering OFF by default. Suggest telling the user to change that setting in their OS before starting the install. This should help visibility during the install and post-install configuration processes. My OS also features “hinting” options for fonts, set to “slight” by default. I barely notice a difference between the options at normal font sizes, but any users with this feature might want to play with it to see if it helps them.

Question: I’ve got a custom font I’d like to use if at all possible. Can this be done without breaking things? If so, what’s the process? (It’s already installed on my OS, but those fonts are not showing up in Scrivenix by default.)

That’s all I’ve got! Hope the text wall is useful in some way. Thanks again for the awesome work (and for inadvertently leveling my Linux knowledge up! ;P)

1 Like

Thanks! Scaling factor makes no difference but changing Scrivner’s zoom level does. Font look more normal at 105%.

One new behaviour: When using an attached monitor Scrivner at 96 DPI Scivner can’t open the compile menu and hangs/ctds.

I’m new on Linux but woudl like to try Scrivenix. I got as far as to step 3 were I get the return below;

sophie@sophie-MacBookAir:~/Documenten/Scrivenix-main$ flatpak-builder --force-clean --install --user build-dir com.local.Scrivenix.yml
Downloading sources
Downloading https://www.cabextract.org.uk/cabextract-1.11.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
Failed to download sources: module cabextract: The requested URL returned error: 403

I might do a simple thing wrong, perhaps you can help me?

It’s probably due to you already having cabextract installed on your system; the installer isn’t designed to troubleshoot when a module is already loaded on your system.

Find the Scrivenix-main folder you’re using, open “com.local.Scrivenix.yml” in a code editor.

“Comment out” the cabextract section as shown. (“Comment out” means put a hash tag in front of each line of ONLY the cabextract section.)

#- name: cabextract
#  buildsystem: autotools
#  config-opts:
#    - --prefix=/app
#  sources:
#    - type: archive
#      url: https://www.cabextract.org.uk/cabextract-1.11.tar.gz
#      sha256: b5546db1155e4c718ff3d4b278573604f30dd64c3c5bfd4657cd089b823a3ac6

Try running the installer again and it should proceed. I had the same issue.

@Buijsen The issue was a bad download link for cabextract or that the website hosting it was blocking automatic downloads which is what the script was doing.

I’ve worked around this by bundling cabextract with the files available on GitHub and by editing the yml file to reference the bundled cabextract rather than trying to download it separately. If you delete all your Scrivenix files and download everything fresh from GitHub and try again I believe it will work. I’ve not had a chance to test it since the update, but a couple of people on my YouTube channel have had success since the updates. Let me know.

2 Likes

@NerfEntropy

What you said will work IF she installs cabextract separately or already has it installed. Otherwise I think starting fresh with new files from GitHub will fix the issue as I’ve made some changes.

1 Like

@Maise_Malaise Sorry, I’ve had not luck running down this issue. It seems to be specific to KDE, but I can’t reproduce the problem on my hardware. Hopefully somebody will come up with a solution or at least identify the root cause.

1 Like

Apologies I should have read the other replies first in more detail! the problem is known and I have tried to solve it as others indicated.

  1. I have checked in program-manager if cabextract was already installed in my Linux Mint 22.3 Cinnamon, it was!
  2. I have deleted in com.local.scrivenix.yml the part about cabextract (after making a copy, that I stored on another location). (Thank you #NerfEntropy I will use next time the “comment out” option)
  3. I run the installation staring from step 3
    The installation run and scrivener is now working. I will continue testing.

Thank you very much for all the effort and work and for offering this solution. For me the main reason not to move to linux was the non-availability of Scrivener on Linux.

2 Likes

Hi!

It looks like I am having similar issues with my fonts, even though I am on the latest version of Debian + GNOME. As I only installed linux two days ago, everything should be as up to date as possible.

For some reason, all the fonts are very bold for me.

I have two acer monitors:

  • One 27 inches with the resolution of 1920 x 1080
  • One 23 inches with the resolution of 1920 x 1080 as well.

During installation, I had no issues and was able to install windows fonts (Candara and Segoe UI) that I copied from my windows laptop. [/home/lindsey/.var/app/com.local.Scrivenix/wine/drive_c/windows/Fonts]

In the wine configuration, I set the windows version to windows 11.

For graphics, I set the screen resolution to 96 dpi (as anything bigger made Scrivener look terrible).

When I booted up Scrivener, I set the windows font to Segoe UI 9 under Options→ Appearance → GUI Font.

I am unable to attach a screenshot as I am new, let me see if I am able to attach a link to an image…

https://imgur.com/a/SHGIxAg apparently not able to edit posts… lovely.

Installed it on Fedora 44 KDE, working mostly well so far. Can confirm the following:

  • Fonts looked awkward to be too on the usual Wine scaling i use (115), changing it to 96 looks better but it’s weird it needs to be different (and part of the interface still looks too small)
  • Corrections option on Settings crash - works with higher scaling for some reason
  • I had this issue with accents : Accented characters don't work on Wine (Linux) - #16 by Syn_leaf Following Syn guide I managed to fix it by configuring ibus but had to add the environment lines to the wrapper script inside the flatpak. Wonder how viable it is to add it to the original file
1 Like

Installed Scrivenix on Ubuntu Mate 24.04.4. Launched easily, though I’m still in the 30-day trial period. I did have to give access to the Linux native fonts (specifically ttc’s) manually, using your Jun. 9 instructions, to get it to display CJK characters. Otherwise, works perfectly.

I wanted to ask something, but I want to preface by saying I am aware of how much work is going into this project, and I am nothing but grateful for it.

Is there a sense of when this might be downloadable via flatpak?

Please do not take that to mean I am trying to rush you. I am very happy to see you taking your time to get it right. I am just curious.