The Smell of Molten Projects in the Morning

Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.

Category: PC Tweakage

Remembering which tweaks worked

  • Inkscape: LightBurn Layer Color Palette

    Inkscape: LightBurn Layer Color Palette

    Inkscape is not a CAD program (neither is LightBurn), but for my simple needs it works well enough, with the compelling advantage that OpenSCAD can import named layers and extrude them into solid models.

    LightBurn can import Inkscape SVG images to define the patterns for laser cutting / engraving and will automatically put the vectors into layers corresponding to their colors if and only if the SVG image uses colors from the LightBurn palette. Regrettably, picking those colors from the default Inkscape palette is essentially impossible, but you can have Inkscape use a palette file that displays only the LightBurn colors corresponding to its layers.

    I conjured this GIMP / Inkscape palette file based on the table in a LightBurn forum post, plus tool layer colors from another post:

    GIMP / Inkscape Palette
    Name: LightBurn Layers
    #
      0   0   0 BLACK
    255 255 255 WHITE
      0   0   0 LBRN #0
      0   0 255 LBRN #1
    255   0   0 LBRN #2
      0 224   0 LBRN #3
    208 208   0 LBRN #4
    255 128   0 LBRN #5
      0 224 224 LBRN #6
    255   0 255 LBRN #7
    180 180 180 LBRN #8
      0   0 160 LBRN #9
    160   0   0 LBRN #10
      0 160   0 LBRN #11
    160 160   0 LBRN #12
    192 128   0 LBRN #13
      0 160 255 LBRN #14
    160   0 160 LBRN #15
    128 128 128 LBRN #16
    125 135 185 LBRN #17
    187 119 132 LBRN #18
     74 111 227 LBRN #19
    211  63 106 LBRN #20
    140 215 140 LBRN #21
    240 185 141 LBRN #22
    246 196 225 LBRN #23
    250 158 212 LBRN #24
     80  10 120 LBRN #25
    180  90   0 LBRN #26
      0  71  84 LBRN #27
    134 250 136 LBRN #28
    255 219 102 LBRN #29
    243 105  38 LBRN T1
     12 150 217 LBRN T2
    

    Plunk that file (which I named Lightburn.gpl) into /home/ed/.config/inkscape/palettes/, restart Inkscape, then select it (the Name line defines its mmm name):

    Inkscape - selecting LightBurn palette
    Inkscape – selecting LightBurn palette

    Which lays a row of the LightBurn layer colors along the the Inkscape window:

    Inkscape - LightBurn palette
    Inkscape – LightBurn palette

    The text after the RGB triplet in each file line appears as the tool tip for the color swatch:

    Inkscape - LightBurn palette tooltip
    Inkscape – LightBurn palette

    Because LightBurn uses only the vector Stroke and ignores its Fill, you (well, I) must become accustomed to Shift-clicking palette colors.

    You can fetch a similar palette file directly from the LightBurn doc, although minus the tool tips. GIMP and Inkscape have many palettes available, should you make artsy drawings where subtle color shading matters.

    I generally use only a few cheerful primary colors, because I have trouble distinguishing (heck, in some cases even seeing) the more subtle colors against LightBurn’s light (or dark) workspace background. I assign the layer cut settings using the Material Library: reds for cutting, blues for marking, and grays for engraving.

    When I need more than maybe half a dozen colors, I (eventually) realize I’m trying to be too clever and split the project into separate LightBurn files.

  • Piping Yubikey TOTP To xclip

    Piping Yubikey TOTP To xclip

    Rather than fiddle with the GUI program for my Yubikey, I use the ykman CLI program for TOTP authentication, because there’s always a command prompt / terminal open on the portrait monitor:

    ykman oath accounts code -s ama
    161413
    

    Double-click to select the number in the terminal, then either copy-n-paste or middle-click into the target field of whatever needs convincing I am truly me, myself, and I.

    I finally got a Round Tuit and piped the output into xclip to put the number into the clipboard:

    ykman oath accounts code -s ama | xclip
    

    Which lets me go directly to pasting or middle-clicking.

    The command history is big enough that I now type only:

    Ctrl-R ama
    

    Which brings up the most recent version of the command, whereupon I whack Enter to execute it. Similar abbreviations extract the commands for dozen-odd companies / banks / institutions / whatever I deal with.

    When I need a hint:

    ykman oath accounts list
    

    Should’a done that long ago.

    For reference, a treatise on Yubikey config and usage.

    Bonus! A cat:

    Gray Cat - 2023-05-23
    Gray Cat – 2023-05-23

    Because SEO demands a picture.

  • Medical Image CD: FAIL

    Medical Image CD: FAIL

    I asked for the images from recent X-ray and MRI sessions, whereupon a CD arrived in the mail. Popping it into my desktop Linux box produced this directory listing:

    ll /run/media/ed/Feb\ 21\ 2025/
    total 146M
    dr-xr-xr-x  2 ed   ed    136 Feb 21 13:14 ./
    drwxr-x---+ 3 root root   60 Mar  2 13:40 ../
    -r--r--r--  1 ed   ed   146M Feb 21 13:14 -NISLEY-DMBG8yMQcf8qXcVj.iso
    
    

    It seems whoever / whatever produced the CD copied the ISO image to the CD, rather than burning the ISO directly to the CD. As a result, the CD has one file.

    Raise your hand if you’ve never done that.

    Well, I was going to save the CD as an ISO file anyway, so I just copied it to the file server.

    Attempting to mount it produces an odd result:

    sudo mount -o loop "-NISLEY-DMBG8yMQcf8qXcVj.iso" /mnt/loop/
    [sudo] password for ed: <make up your own>
    mount: failed to set target namespace to ISLEY-DMBG8yMQcf8qXcVj.iso: No such file or directory
    
    

    Oh, right, starting a filename with a leading dash is never a Good Idea™.

    Rename it:

    mv -NISLEY-DMBG8yMQcf8qXcVj.iso NISLEY-DMBG8yMQcf8qXcVj.iso
    mv: invalid option -- 'N'
    Try 'mv --help' for more information.
    
    

    Which is why leading dashes are a Terrible Idea™.

    Force the rename to happen:

    mv ./-NISLEY-DMBG8yMQcf8qXcVj.iso NISLEY-DMBG8yMQcf8qXcVj.iso
    

    The same syntax works in the mount command, but it’s easier to solve the problem once and be done with it.

    Now mount the file:

    sudo mount NISLEY-DMBG8yMQcf8qXcVj.iso /mnt/loop
    mount: /mnt/loop: WARNING: source write-protected, mounted read-only.
    
    

    That’s entirely expected, because the whole filesystem is intended for a non-writeable CD.

    What’s inside?

    ll /mnt/loop/
    ls: cannot open directory '/mnt/loop/': Permission denied
    
    

    Why would that be?

    ll /mnt
    total 58K
    drwxr-xr-x 15 root root 4.0K May 21  2023 ./
    drwxr-xr-x 17 root root 4.0K Mar  2 13:43 ../
    … omitted …
    drwxrwx---  4  496  495 2.0K Feb 21 13:13 loop/
    … omitted …
    
    
    

    Maybe 496 and 495 are the UID and GID of whatever created the CD?

    Force it to my UID:

    sudo umount /mnt/loop
    [ed@shiitake tmp]$ sudo mount -o uid=ed NISLEY-DMBG8yMQcf8qXcVj.iso /mnt/loop
    mount: /mnt/loop: WARNING: source write-protected, mounted read-only.
    [ed@shiitake tmp]$ ll /mnt/loop
    total 16K
    drwxrwx---  4 ed    495 2.0K Feb 21 13:13 ./
    drwxr-xr-x 15 root root 4.0K May 21  2023 ../
    drwxrwx---  4 ed    495 2.0K Feb 21 13:12 data/
    drwxr-xr-x  5 ed    495 2.0K Feb 21 13:13 DICOM/
    -rw-rw----  1 ed    495 1.7K Feb 21 13:12 README.txt
    -rw-rw----  1 ed    495 3.2K Feb 21 13:12 view-studies.html
    
    

    Now that’s more like it.

    Finally, I can fire up Weasis to look at pretty DICOM images:

    Spine - lateral T2 TSE SAG - 2025-02 - tweaked
    Spine – lateral T2 TSE SAG – 2025-02 – tweaked

    Apparently things looks suspicious around L4.

  • Thunar WEBP Thumbnails

    Thunar WEBP Thumbnails

    For whatever reason, the Thunar file browser in XFCE does not automagically show thumbnails for webp images. Some searching produced a recipe, although the displayed webp.xml file needs the last two lines to close the tags:

    <?xml version="1.0" encoding="UTF-8"?>
    <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
        <mime-type type="image/webp">
            <comment>WebP file</comment>
            <icon name="image"/>
            <glob-deleteall/>
            <glob pattern="*.webp"/>
        </mime-type>
    </mime-info>
    

    The magic copy-to-clipboard button includes those tags, so I suppose it’s another case of being careful what you believe on the Intertubes.

    Going through the steps displayed images of the Subpixel Zoo:

    Thunar - webp previews
    Thunar – webp previews

    They’ll turn into layered paper patterns:

    Subpixel Zoo - Quattron RGBY Shifted - detail
    Subpixel Zoo – Quattron RGBY Shifted – detail
  • PrusaSlicer Flatpak: Adding an NFS Filesystem

    PrusaSlicer Flatpak: Adding an NFS Filesystem

    PrusaSlicer V 2.9.0 for Linux arrives as a Flatpak, instead of the previous AppImage, which wouldn’t matter except that the Flatpak sandbox prohibits access to anything outside each user’s home directory. I long ago set up access to the fileserver in the basement through filesystems mounted on /mnt, which is now inaccessible.

    Obviously, I’m not the first person to hit this issue, as some diligent searching turned up a hint leading to a description of Flatpak permissions, which eventually produced:

    sudo flatpak override com.prusa3d.PrusaSlicer --filesystem="/mnt/bulkdata"
    

    Overall, 2.9.0 seems significantly more sluggish and uglier than the 2.8.x series, but at least Prusa still supports Linux.

    Just to show PrusaSlicer can fetch files from the server and to have some pictures enhancing this post’s negligible SEO, I built a couple of Gear Fidget Toys:

    Double Gear fidget toy - on platform
    Double Gear fidget toy – on platform

    Which pop off the platform ready to roll:

    Double Gear fidget toy - finished
    Double Gear fidget toy – finished

    A trace of silicone grease eased between the pieces on a slip of paper makes the spinning action so smooth.

    As usual, the multi-material version takes twice as long to build due to all the filament swapping. I think I must improve the MMU3’s spoolholders, because the MMU3 (very) occasionally fails to ram the filament into the extruder, seemingly due to the force required to pull filament from the recalcitrant spools.

  • Windows 11 for the Linux Guy: Remote Desktop Protocol

    Windows 11 for the Linux Guy: Remote Desktop Protocol

    With Windows 11 and LightBurn running on a little PC perched atop the laser in the basement:

    BeeLink Win 11 PC - overview
    BeeLink Win 11 PC – overview

    I wanted to work with that desktop from my Comfy Chair upstairs, because I’m unwilling to stand up a Windows box specifically for another LightBurn installation, along with a nightmare KVM switch tangle for all the displays / keyboards / trackballs I run with Linux.

    At the Win 11 PC, turn on Remote Desktop connections:

    Remote Desktop enable
    Remote Desktop enable

    The Administrator is automatically allowed access, but I also allowed access for my local User (who does not have a Microsoft account), which requires the Administrator’s password. You’ll want to store that in a password manager, because typing line noise gets tedious.

    Upstairs on the Comfy Chair at the Linux box, install Remmina from the repository, then tweak some preferences:

    Remmina prefs - General
    Remmina prefs – General

    This being a LAN connection, pick the highest quality scaling, although that shouldn’t matter with a fullscreen display. I added a screen resolution matching my desktop landscape monitor:

    Remmina config - screen resolutions
    Remmina config – screen resolutions

    Somewhat to my surprise, selecting an RDP screen resolution larger than the HDMI monitor on the Win 11 box worked perfectly.

    Because the remote display will fill the entire screen in fullscreen mode, set the toolbar to “Peeking” mode making it barely visible at the top of the screen:

    Remmina prefs - Appearance
    Remmina prefs – Appearance

    I have yet to (figure out how to) enable the hotkey turning fullscreen mode on and off, so if the toolbar isn’t readily available there is no way to get out of fullscreen mode.

    Set up the RDP connection to the Win 11 box, using either the static IP address or whatever name the router assigns:

    Remmina config - Basic
    Remmina config – Basic

    I set the Win 11 box for a static IP address, then told the router to assign that IP to the box if it ever woke up asking for an address through a DHCP request. The process differs depending on which router you have and may not be needed. I (try to) nail down all the IP addresses, so anything using DHCP will be obviously in need of attention.

    Select the highest quality compression:

    Remmina config - Advanced
    Remmina config – Advanced

    With all that set up, double-clicking the appropriate line should fire up an RDP connection, perhaps with a peephole view of the Win 11 desktop:

    Remmina - small RDP window
    Remmina – small RDP window

    Hit the Toggle Fullscreen icon (hollow square, fifth down) to embiggen it:

    Remmina - fullscreen RDP window
    Remmina – fullscreen RDP window

    Your Win 11 desktop will be different; that’s the Apollo 17 lunar module ascent stage.

    The thin line along the center top is the Remmina toolbar, peeking over the edge. Move the mouse cursor up there to roll it down into view:

    Remmina - fullscreen RDP window - detail
    Remmina – fullscreen RDP window – detail

    Because this is a fullscreen view, hitting the Toggle Fullscreen icon (highlighted blue) is the only way out. It required a disturbing number of iterations before realizing none of the hotkeys worked, then figuring out how to enable toolbar peeking.

    Moving the mouse pointer to the bottom of the screen rolls up the Win 11 Task Bar (which I always set to Hide mode to get it out of the way):

    Remmina - fullscreen - task bar
    Remmina – fullscreen – task bar

    I pinned the LightBurn icon to the task bar where it’s easy to hit, as that’s the whole point of the exercise.

    And then It Just Works™:

    Remmina - fullscreen LightBurn
    Remmina – fullscreen LightBurn

    Because this is Windows, one user can sign onto the box from either the local keyboard or the RDP connection, but not both.

    Being an Old School type of guy, I reflexively save my work before trotting either upstairs or downstairs and signing on wherever I end up, but it’s the same file in the same program on the same hardware.

    The performance over the LAN and through Remmina is good enough to make the fullscreen session feels exactly like running LightBurn locally. In truth, LightBurn is not a particularly resource-heavy program.

    Then I deleted both Linux installations from the LightBurn license portal …

  • Windows 11 for the Linux Guy: Hardware

    Windows 11 for the Linux Guy: Hardware

    Contrary to what I thought a while ago, the least awful way to continue running LightBurn after Linux support goes away is to stand up a dedicated Windows 11 box:

    BeeLink Win 11 PC - overview
    BeeLink Win 11 PC – overview

    Lest it become lost in the clutter:

    BeeLink Win 11 PC - detail
    BeeLink Win 11 PC – detail

    It’s a BeeLink Mini S12 (whatever that means) and squats near the low end of PC performance these days. I chose it based on reports from folks at Squidwrench having used similar units for various purposes without much pain, plus motivation from one of those weird Amazon “coupons” knocking the price down; it now sells for about that same price without the coupon.

    It’s advertised as coming with Windows 11, but my advisors recommended a clean installation to get rid of crapware and possible pre-installed malware. I decided to start with the as-delivered system, then use the same product key to blow away the default installation.

    The box / packaging did not include a Microsoft Windows Product Key and going through the first boot setup process produced this disconcerting result:

    Win 11 license key - not found
    Win 11 license key – not found

    More disconcerting: Windows Defender (Microsoft’s antivirus scanner / system integrity checker) was inactive and could not be installed from the MS “Store”. While not conclusive proof of pre-installed malware, the situation certainly seemed suspicious.

    The seller sent a key that seemed to be for Windows 10:

    BeeLink MS Product Key - Win 10 - redacted
    BeeLink MS Product Key – Win 10 – redacted

    Having been assured this would also validate a Win 11 installation, I did a clean installation using a USB flash drive produced by the MS installer, was never asked for a key, and eventually got to this point:

    Win 11 Pro Installed Key - requires Digital License - redacted
    Win 11 Pro Installed Key – requires Digital License – redacted

    Despite the missing OEM key and the footnote, everything seems just ducky:

    Win 11 Activation with Digital License
    Win 11 Activation with Digital License

    I assume a clean installation blows away any malware resident on the “hard drive” (an M.2 solid state drive, of course), including rootkits and boot sector malware. My threat model does not include malware in the BIOS / UEFI firmware, which may be overoptimistic.

    I declined all the optional MS products, refused various MS subscriptions, and generally tried to kill off a myriad invasive / advertising / “customized for you” features along the way. A casual search will produce many helpful guides for that process; I expect the details will change as MS continues to extract information from us. I set up a non-Administrator account for myself specifically to run LightBurn.

    With that accomplished, I gave it a static IP address, created network shares to various directories on the “file server” (an ancient off-lease Dell Optiplex) holding the files I previously used with Linux LightBurn, installed Window LightBurn, got its preferences sorted out / restored from backup, and things eventually worked pretty much as intended.

    Not shown in the picture:

    This setup is intended for layout tweaking and laser control, not for protracted design work while standing in what’s now a 57 °F = 14 °C basement.

    For what it’s worth, I must run the laser’s water chiller for half an hour to raise the cooling water to the normal 20 °C operating range; it has a water-cooled pump serving as a little heater.

    The next step involved enabling Remote Desktop Protocol access so I can access the Windows box from my Comfy Chair at my usual battle station upstairs. More on that tomorrow …