brummer10 / guitarix

guitarix virtual versatile amplification for Jack/Linux
270 stars 32 forks source link

File browsing unavailable in headless mode using guitarix -G GUI on second machine #180

Open AtlantaScott opened 3 weeks ago

AtlantaScott commented 3 weeks ago

I run guitarix in a headless mode using guitarix -N to start up the engine. I connect via link-local ethernet on a second machine to run the GUI only using guitarix -G. When I do this I can run everything just fine including all midi controllers. However if I try to browse for a file, for example in NAM or convolver plugins, I am unable to browse to a different folder even though I can select different files in the folder that is shown. It shows the path to this folder but the "File" button is grayed out and so I can't click to browse to a different folder. Any idea if this is expected behavior running the GUI like this?

In general I find I can avoid x-runs at lower latency on modest hardware by offloading the GUI to a second machine. For now I have to run the GUI locally or via RDP in order to browse for different folders in plugins like NAM and convolver. Once I set up the presets and save them I can run using the -no GUI switch and it works fine to use the already set up presets. It is surprisingly easy to set up a true headless system with the GUI running on a second machine. If I disable the GPU altogether on the CPU running the engine and then connect by SSH to the headless computer hosting the guitarix engine I can run the engine with no x-server and no desktop processes running. A simple local-link ethernet tether between the headless box and a cheap laptop and I'm all set. As long as I have guitarix installed on the laptop I just run guitarix -G and it finds the running server and just works (except for the file browsing :). This methods uses very few resources on the CPU running the guitarix engine, thus fewer/no x-runs at lower buffers like 32 frames 2 periods.

brummer10 commented 3 weeks ago

Yep, remote file browsing is switched off. I mean I've implemented file path/name as uris but it isn't sure that it works from a remote laptop. You could try if you wish. Go to the file /trunk/src/gx_head/gui/gx_stackbox_builder.cpp line 842 and comment out the guard https://github.com/brummer10/guitarix/blob/master/trunk/src/gx_head/gui/gx_stackbox_builder.cpp#L842

    if (!machine.get_jack()) {
        return;
    }

becomes

   // if (!machine.get_jack()) {
   //     return;
   // }

and line 492 https://github.com/brummer10/guitarix/blob/master/trunk/src/gx_head/gui/gx_stackbox_builder.cpp#L492

    if (!machine.get_jack()) {
        w->hide();
        return;
    }

becomes

   // if (!machine.get_jack()) {
   //     w->hide();
   //     return;
    }

that will enable the file browser button for nam on the remote UI. As I said, it may or may not work, that all depend on some security settings for remote access.

AtlantaScott commented 3 weeks ago

Thanks for the information! That's helpful. I've got an easy work around so it's non-critical. I did try those edits and did a cleandist and built it again, but I got an error due to the edits. I don't have the knowledge to figure out why, so I'll leave it as-is and use my work around. Thanks again for the attention to this question.

brummer10 commented 3 weeks ago

Okay, I've pushed a fix for it to the repository. Still, if it works depend on if the remote machine is allowed to browse files on the host. Let me know if it works for you.