Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Running Foobar in Linux (Read 718132 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

Re: Running Foobar in Linux

Reply #675
And of course you can run foobar 32-bit and deno 64-bit in the same 64-bit WINE prefix.

I tried that and found some problems....

When I tried to tag on batch files with essentia, EBUR, etc the foobar2000 interface freeze and doesn't respond or update until the scan is finished.

And there is no way to install winetricks mdac in a 64 prefix, so the  Wil-B's biography doesn't download images.

Do you know any method to solve this?

Re: Running Foobar in Linux

Reply #676
Are you able to repeat that, but in Windows? Same behavior of foobar? I suspect that - yes.

I am afraid that this is because foobar - the parent process - just starts an external process (essentia, EBUR, name it...) as its child process and simply waits until the child process finishes. There isn't any inter-process communication allowing for instance foobar to show a progress of the child process, a currently processed element, or whatsoever. That is why you perceive the waiting parent process as "frozen" and "irresponsive".

This doesn't depend on the operating system.

What you expect is a complete different architecture of integration between foobar and its child process: foobar just starts the child process and doesn't wait for its end, continues its normal operation. Meanwhile, the child process runs independently of its parent, somehow informing about its progress. And the parent - foobar - from time to time checks if there is any incoming information from its children, eventually processing such an information, like updating a progress bar. Also a child may inform its parent about any other event, like error or just finish. Also the parent may interact with its child, like pause or break it.
There are different ways of constructing such an integration - it must be upfront designed, mutually agreed, implemented and tested.

Re: Running Foobar in Linux

Reply #677
Are you able to repeat that, but in Windows? Same behavior of foobar? I suspect that - yes.

I am afraid that this is because foobar - the parent process - just starts an external process (essentia, EBUR, name it...) as its child process and simply waits until the child process finishes. There isn't any inter-process communication allowing for instance foobar to show a progress of the child process, a currently processed element, or whatsoever. That is why you perceive the waiting parent process as "frozen" and "irresponsive".

This doesn't depend on the operating system.

What you expect is a complete different architecture of integration between foobar and its child process: foobar just starts the child process and doesn't wait for its end, continues its normal operation. Meanwhile, the child process runs independently of its parent, somehow informing about its progress. And the parent - foobar - from time to time checks if there is any incoming information from its children, eventually processing such an information, like updating a progress bar. Also a child may inform its parent about any other event, like error or just finish. Also the parent may interact with its child, like pause or break it.
There are different ways of constructing such an integration - it must be upfront designed, mutually agreed, implemented and tested.

It is not the child process, it is the main foobar process the one not reponding in this case.
With that combination (foobar2000 32 installation running in wine 64 prefix) when foobar launch the child process (essentia scanner) it doesn't continue to operate normally. The UI completely freezes, you can't click, the progress bar, visualizations or dynamic info didn't update...no interaction until the scan ends.
In a 32 wine prefix, after launching the scanner you can continue to work without problem.

And there is also the problem with the bio script not downloading images.

Re: Running Foobar in Linux

Reply #678
Yep, that doesn't happen on windows. CMD calls are run async on my scripts. If you can further investigate why CMD calls are not async in that combination, let me know.

What about foo_run? It lets you do the same. Does it work properly there?

Re: Running Foobar in Linux

Reply #679
Yep, that doesn't happen on windows. CMD calls are run async on my scripts. If you can further investigate why CMD calls are not async in that combination, let me know.

What about foo_run? It lets you do the same. Does it work properly there?

foo_run services seems to work fine, but I only have services to open searches, discogs or musucbrainz pages, mp3tag in file or folder... nothing that could take a long time to run.

mp3tag run with foo_run stay open without freezing foobar2000, but I don't know if it is the same.

How can I make a foo_run to test something similar to the essentia scan?

Re: Running Foobar in Linux

Reply #680
Linux Mint 22.1
Wine 10.0 (stable) with wine mono
foobar2000 v2.24 32-bit portable
skin: my customised version of tego's DarkOne v4

I am relatively new to Linux and this is my first attempt at Wine. I managed to install and run foobar2000 portable (basic DUI) and it seemed to work fine.
I then installed DarkOne v4 skinned f2k (uses CUI). I have successfully imported files into the library and can see them and navigate the library but I have the following problems:
    1. Library (Album list panel v2.0.3)
        a. can't drag & drop selected files into the playlist panel (ELPlaylist), but I can drag & drop from the file manager into the playlist panel
        b. the right click menu only displays View, Filter and Settings (all other normal menu entries below that are missing, eg. send to playlist)

    2. I wish to connect to my actual library which is on a shared network drive (samba) on another Linux PC. How do i point wine foobar at an smb share.

Re: Running Foobar in Linux

Reply #681
    1. Library (Album list panel v2.0.3)
        a. can't drag & drop selected files into the playlist panel (ELPlaylist), but I can drag & drop from the file manager into the playlist panel
        b. the right click menu only displays View, Filter and Settings (all other normal menu entries below that are missing, eg. send to playlist)

This might be related to a bug on Wine that I do not believe that will be fixed anytime soon.
This bug does not happen on album list panel version 1.0.0. which is very stable on Linux.
More information here:
https://github.com/reupen/album_list_panel/issues/179
and here:
https://bugs.winehq.org/show_bug.cgi?id=55707

Re: Running Foobar in Linux

Reply #682
Thanks for that Rocker, I'll check it out

Re: Running Foobar in Linux

Reply #683
Hi,
has someone a Bash Script that works when foobar2000 is not installed in wine ?

Portable somewhere on a drive and only wine is used for starting Foobar2000.

In my case i have /media/VolumeD/foobar2000 (Linux path)

I always get Unknown Command Line Parameter because the Z: is not send with the Open with Foobar2000.desktop

All Bash Scripts i have found here are within the Wineprefix directory not outside this.

Re: Running Foobar in Linux

Reply #684
Somebody might correct me, but opening an .exe automatically launches the .exe in Wine.  I've not tried that with FB2K mind..
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: Running Foobar in Linux

Reply #685
Hi,
has someone a Bash Script that works when foobar2000 is not installed in wine ?

Portable somewhere on a drive and only wine is used for starting Foobar2000.

In my case i have /media/VolumeD/foobar2000 (Linux path)

I always get Unknown Command Line Parameter because the Z: is not send with the Open with Foobar2000.desktop

All Bash Scripts i have found here are within the Wineprefix directory not outside this.

I'm far from an expert with Bash scripts, but here's the foobar2000.desktop file I eventually created after a bit of research on how to create one that'd work properly using the file manager's right click "open with" and "send to" menus.

Code: [Select]
[Desktop Entry]
Name=foobar2000
Comment=
Type=Application
Icon=/home/UserName/.local/share/icons/foobar2000.png
Exec=env sh -c "winepath -w -0 %F | WINEPREFIX='/home/UserName/.local/share/wineprefixes/Win64' xargs -0 wine start /Unix '/home/UserName/.local/share/wineprefixes/Win64/drive_c/Program Files/foobar2000/foobar2000.exe'"
StartupWMClass=foobar2000.exe
Categories=AudioVideo;Player;

This should run foobar2000 from /media/VolumeD/foobar2000/ using the default wine prefex.

Code: [Select]
[Desktop Entry]
Name=foobar2000
Comment=
Type=Application
Icon=/home/UserName/.local/share/icons/foobar2000.png
Exec=env sh -c "winepath -w -0 %F | xargs -0 wine start /Unix '/media/VolumeD/foobar2000/foobar2000.exe'"
StartupWMClass=foobar2000.exe
Categories=AudioVideo;Player;

As a desktop file, if you add it to your applications (shortcuts) folder it should appear in the start menu and should work correctly via your file manager's "open with" menu. For me it's
/home/UserName/.local/share/applications/
Also for me, MX Linux and the Thunar file manager, putting a copy in this folder adds it to the file managers right click "send to" menu.
/usr/share/Thunar/sendto/

Re: Running Foobar in Linux

Reply #686
Somebody might correct me, but opening an .exe automatically launches the .exe in Wine.  I've not tried that with FB2K mind..
I've thought about this some more, and that works with a self-contained .exe which does not access the file system.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: Running Foobar in Linux

Reply #687
It starts correctly and i can open from Foobar2000 Files.

But if i use the "Open with" command from Linux then i have the Error:

"Unknown Commandline Parameter" ... then Path to the MP3 File but the Z:/ is missing thats the Problem

Its only e.g. /media/VolumeD/Music but it must be Z:/media/VolumeD/Music

thats the correct Path

Re: Running Foobar in Linux

Reply #688
Its only e.g. /media/VolumeD/Music but it must be Z:/media/VolumeD/Music
Are you sure that shouldn't be "Z:\media\VolumeD\Music"? (Windows/DOS "\" rather than "/")

There are no drive letters in Linux.  You only get a drive letter by working within Wine's file system emulation, and that's what I was saying about executables accessing the file system.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: Running Foobar in Linux

Reply #689
Yes thats the Drive Letter from Wine Enviroment thats correct for the Music Path and yes the Backslashes are wrong i have posted.

Here a Screenshot from Foobar2000 if i open a File -> Add File in Foobar2000

If i open the mp3 File with Nemo File Explorer "Open With Foobar2000"

I get this Error in Screenshot Drive Z: is missing

Re: Running Foobar in Linux

Reply #690
Yes thats the Drive Letter from Wine Enviroment thats correct for the Music Path and yes the Backslashes are wrong i have posted.

Here a Screenshot from Foobar2000 if i open a File -> Add File in Foobar2000

If i open the mp3 File with Nemo File Explorer "Open With Foobar2000"

I get this Error in Screenshot Drive Z: is missing

You must translate the unix path to windows path to make foobar2000 open it
Take a look at foobar-on-linux integrates a Wine installation of the foobar2000 audio player into the Linux desktop so that it can be launched and used as if it were a native Linux application.

Re: Running Foobar in Linux

Reply #691
Ah thanks that works !

Big Big thx i searching for this about a Month, i tried deadbeef instead but its not Foobar  8)

Re: Running Foobar in Linux

Reply #692
Ok now one little thing, how can i add m3u files to open it with Foobar2000 in Linux ?

:Edit: Have found it, Edit in ~/.config mimeapps.list

Add following:
audio/mp3=foobar2000.desktop;
audio/m3u=foobar2000.desktop;

If you have foobar2000.desktop in ~/.local/share/applications this works fine

Re: Running Foobar in Linux

Reply #693
Ok now one little thing, how can i add m3u files to open it with Foobar2000 in Linux ?

:Edit: Have found it, Edit in ~/.config mimeapps.list

Add following:
audio/mp3=foobar2000.desktop;
audio/m3u=foobar2000.desktop;

If you have foobar2000.desktop in ~/.local/share/applications this works fine

You can also add it to the MimeType section of .desktop file

Re: Running Foobar in Linux

Reply #694
So, I believe this question is on topic. And I searched and it's not shown as being asked before.

 Note: I believe it will take someone who knows foobar2000's source code intimately, to answer it.

I use duck duck go, so occasionally the AI prompt will pop up on the side, and you can use AI directly to get answers to questions directly instead of hunting through the mess a typical web search spits out.

I asked duck.ai this question:
Real world situation. If I want to make foobar2000 run in Linux via flatpak, assuming I have the code for foobar2000. What are the steps to ready it for flatpak?

The answer it gives is seemingly simple. The only hurdle I can see is, if foobar2000 uses Windows specific API's etc. They would have to be adapted.

Since the number of users in Linux has surpassed Mac on Steam.. There's a clue of the size of the Linux user base.

For those not knowing, Linux has many distributions. Flatpak bundles are designed to overcome the differences between distributions so your software reaches those distributions simultaneously.

So, to the great and powerful foobar2000 coders, is this task difficult?

Re: Running Foobar in Linux

Reply #695
It starts correctly and i can open from Foobar2000 Files.

But if i use the "Open with" command from Linux then i have the Error:

"Unknown Commandline Parameter" ... then Path to the MP3 File but the Z:/ is missing thats the Problem

Its only e.g. /media/VolumeD/Music but it must be Z:/media/VolumeD/Music

thats the correct Path

Out of curiosity, did you try the desktop file I posted?
I ask, as the only way I could duplicate your problem was to remove the -w option from the command line. It converts the unix path for the file(s) being opened to a windows file path..
https://gitlab.winehq.org/wine/wine/-/wikis/Commands/winepath

Quote
[Desktop Entry]
Name=foobar2000
Comment=
Type=Application
Exec=env sh -c "winepath -w -0 %F | xargs -0 wine start /Unix '/media/HDD1/foobar2000/foobar2000.exe'"
StartupWMClass=foobar2000.exe
Categories=AudioVideo;Player;

Without the -w in the command line:
Unknown commandline parameter: /home/UserName/Music/MP3s/Cure, The/Cure, The - Lullaby.mp3

I did forget to mention that for me this all works quite well unless I'm trying to use "open with" or "send to" to open a file from an external/portable drive, in which case it'll only work if I boot with systemd. If I don't, the file manager complains it can't find the file when it's on an external drive. I haven't discovered why that is yet.

Re: Running Foobar in Linux

Reply #696
Hi,
somebody has tested WineASIO with Foobar2000 on Wine ? I have installed WineASIO on Wine 10.0 Foobar2000 2.24.3 has the ASIO Driver under Playback -> Output -> Devices but if i set WineASIO to default Ouput Device i get an Error:

"Unrecoverable Playback Error: Unknow Exception"

My Problem with the Default Device e.g. Soundcard i have alway a fixed Samplerate under Wine from 48KHZ

Re: Running Foobar in Linux

Reply #697
I have found out that Foobar2000 does the correct Samplerates only in "Exclusive Mode" in Windows.

That work for Windows but not in Foobar2000 with Wine, i get the Error "Unrecoverable Playback Error: Unknown exception"

Any Ideas to get the Exclusive Mode working in Wine ?

Re: Running Foobar in Linux

Reply #698
:Update: Have found a solution, the only way it works is:

Set Wine to "Sound_ALSA" , install Foobar2000 WASAPI Plugin and set Foobar2000 Playback Output to "PUSH" Mode then its the native Samplerate

 

running native Linux commands from foo_run

Reply #699
Yeah, something changes some WINE versions ago.

Try with winebrowser.exe

Code: [Select]
"C:\windows\system32\winebrowser.exe" "$directory_path(%path%)"

to open the file's folder in system file browser (nautilus, dolphin, etc...)

The same change to WINE broke my foo_run (Run Services component) commands for opening native Linux applications like Audacity, which formerly worked using the syntax "z:\usr\bin\audacity".  Your solution for opening the browser with winebrowser.exe inspired me to try opening native Linux commands with wineconsole.exe, and it works!  A playlist file can again be opened in Audacity with the command

Code: [Select]
"C:\windows\system32\wineconsole.exe" "/usr/bin/audacity" "$substr($replace(%_path%,\,/),3,300)"

There's probably a cleaner way to replace the filename's backslashes with forward slashes, but this works for me and I'm old and tired today.