You are not logged in.
My favorite oldschool game to play on Linux is Microsoft 3D Pinball: Space Cadet. I grew up with it at a time when that's what playing computer games meant.
I don't know why but I had a little trouble getting it set up in Bunsen.
The normal procedure is get the .exe file from the internet (I think it's abandonware at this point) and then use something like "wine Pinball.exe" to install it. After this it's usually just a matter of searching "pinball" in the desktop's application menu and pressing enter.
The wine installation left a .desktop file in my home directory and at ~/.local/share/applications/wine/Programs/Games/ . These files worked by clicking on them in the file manager, however neither showed in jgmenu. I tried moving one of the desktop files to ~/.local/share/applications, and now it showed up in jgmenu, but failed to launch.
Inspecting the desktop file, i found the line Exec=env WINEPREFIX="/home/rkw/.wine" wine-stable C:\\\\Program\\ Files\\\\Microsoft\\ Games\\\\Pinball\\\\pinball.exe
When running env WINEPREFIX="/home/rkw/.wine" wine-stable C:\\\\Program\\ Files\\\\Microsoft\\ Games\\\\Pinball\\\\pinball.exe in a terminal, it did not work. After fiddling around, the line that worked was env WINEPREFIX="/home/rkw/.wine" wine-stable C:\\Program\ Files\\Microsoft\ Games\\Pinball\\pinball.exe (just had to remove some slashes.)
Now pinball shows and launches from jgmenu.
So I figured it out but I don't really understand the problem. I feel that jgmenu should parse the full path of ~/.local/share/applications/wine/Programs/Games/ so that the installed application shows up without intervention. I also don't understand why clicking on the desktop file in the file manager would run the program, but to execute it from the terminal or jgmenu, I had to mess around with the Exec line.
Maybe someone with a better understanding will find something of use from this? Anyway, time to play!
Offline
Ahhhhh, good ol' Space Cadet...loved that game and now your post piqued my interest and perhaps will set up Wine to run it on my BL system. Perhaps someone who knows Wine as well as the jgmenu dev (malm) will chime in.
Real Men Use Linux
Offline
So, I looked at /usr/share/applications/wine.desktop and it executes
wine start /unix %f
So, I tried it manually, e.g.:
wine start /unix ~/.wine/drive_c/Program\ Files\ \(x86\)/Windows\ NT/Accessories/wordpad.exe
In other words, you can use normal unix paths, and backslashes only escape shell-special characters.
No silly \\\\\\\ stuff.
BTW, where'd you get the executable? I want...
Please use CODE tags for code.
Search youtube without a browser: repo | thread
BL quote proposals to this thread please.
my repos / my repos
Offline
Would be nice to get it full screen too, if someone has the trick to get it to do that under wine.
Real Men Use Linux
Offline
@Nick - I've pushed a couple of fixes.
I didn't realise that $XDG_DATA_DIRS/applications/ sub-directories should be respected, but looks like they ought to be from here https://specifications.freedesktop.org/ … c-1.0.html
Are you in a position to build and try it out? You don't have to install it or anything, just do
git clone https://github.com/johanmalm/jgmenu
cd jgmenu
./scripts/install-debian-dependencies.sh
make
./jgmenu-apps | ./jgmenu --simple
Online
...perhaps will set up Wine to run it on my BL system
Enjoy!
Would be nice to get it full screen too, if someone has the trick to get it to do that under wine.
For me it's depended on the window manager. Usually pressing F4 will fullscreen the app at least in the wrong resolution, and restore to normal window after, but on openbox the restored window is messed up. I've tried it under a few wm's over time like xfwm, marco, probably even compiz back in the day and sometimes it works but sometimes it doesn't :-)
So, I looked at /usr/share/applications/wine.desktop and it executes
wine start /unix %f
So, I tried it manually, e.g.:
wine start /unix ~/.wine/drive_c/Program\ Files\ \(x86\)/Windows\ NT/Accessories/wordpad.exe
In other words, you can use normal unix paths, and backslashes only escape shell-special characters.
No silly \\\\\\\ stuff.
I just don't know why yet clicking on the desktop file in thunar works OOTB but to run from shell or jgmenu I need to modify the Exec line.
where'd you get the executable? I want...
I can't figure out how it's licensed so I don't want to post warez but there's a few download links through google search
I've pushed a couple of fixes...
Thank you! With your update, jgmenu now locates the desktop file at applications subdirectory.
However, the program still doesn't run without modifying the Exec line of the desktop file when selected through the menu. It does run without modification when clicking on the desktop file in Thunar. I tested more by installing another windows program (notepad++) and found the same - the application is now found in the menu, but it still won't launch.
If there is any more information I can provide please let me know
edit -
To be more precise, what happens is I open the menu, select the application name, then it gives me a series of wine dialog boxes saying "File not found [OK]" which I hit ok for until they go away, and that is it.
This is what it looks like from the console:
rkw@rose:~/build/jgmenu$ ./jgmenu-apps | ./jgmenu --simple
jgmenu-apps: 'vlc.desktop' invalid TryExec
jgmenu-apps: 'vim.desktop' invalid TryExec
rkw@rose:~/build/jgmenu$ Application could not be started, or no application associated with the specified file.
ShellExecuteEx failed: Invalid window handle.
rkw@rose:~/build/jgmenu$
edit again -
Another item of interest- for comparison, while testing a different menu program, there is a separate application category entitled "Wine" from which the wine applications are visible and can be launched. This is a vanilla instance of openbox with xfce4-panel running:
Last edited by Nick (2021-02-20 06:41:29)
Offline
However, the program still doesn't run without modifying the Exec line of the desktop file when selected through the menu. It does run without modification when clicking on the desktop file in Thunar. I tested more by installing another windows program (notepad++) and found the same - the application is now found in the menu, but it still won't launch.
It would appear that the wine installer creates weird .desktop files, then.
Maybe research WINE documentation/community channels for this problem?
Please use CODE tags for code.
Search youtube without a browser: repo | thread
BL quote proposals to this thread please.
my repos / my repos
Offline
@Nick
From the jgmenu/ top level directory, could you paste the output of
./jgmenu-apps | grep -i wine
Online
Sure thing:
rkw@rose:~/build/jgmenu$ ./jgmenu-apps | grep -i wine
jgmenu-apps: 'vlc.desktop' invalid TryExec
jgmenu-apps: 'vim.desktop' invalid TryExec
Notepad++,env WINEPREFIX="/home/rkw/.wine" wine-stable C:\\windows\\command\\start.exe /Unix /home/rkw/.wine/dosdevices/c:/ProgramD,33E8_notepad++.0,,#
Pinball,env WINEPREFIX="/home/rkw/.wine" wine-stable C:\\windows\\command\\start.exe /Unix /home/rkw/.wine/dosdevices/c:/users/rk,E4EC_pinball.0,,#
rkw@rose:~/build/jgmenu$
If it's of any use, the two wine applications currently show up under the jgmenu applications menu category of "Other". Also, I have a directory of ~/.config/menus/applications-merged/ containing the two files shown below:
rkw@rose:~/build/jgmenu$ cat /home/rkw/.config/menus/applications-merged/wine-Programs-Games-Pinball.menu
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
"http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">
<Menu>
<Name>Applications</Name>
<Menu>
<Name>wine-wine</Name>
<Directory>wine-wine.directory</Directory>
<Menu>
<Name>wine-Programs</Name>
<Directory>wine-Programs.directory</Directory>
<Menu>
<Name>wine-Programs-Games</Name>
<Directory>wine-Programs-Games.directory</Directory>
<Include>
<Filename>wine-Programs-Games-Pinball.desktop</Filename>
</Include>
</Menu>
</Menu>
</Menu>
</Menu>
rkw@rose:~/build/jgmenu$ cat /home/rkw/.config/menus/applications-merged/wine-Programs-Notepad++.menu
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
"http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">
<Menu>
<Name>Applications</Name>
<Menu>
<Name>wine-wine</Name>
<Directory>wine-wine.directory</Directory>
<Menu>
<Name>wine-Programs</Name>
<Directory>wine-Programs.directory</Directory>
<Include>
<Filename>wine-Programs-Notepad++.desktop</Filename>
</Include>
</Menu>
</Menu>
</Menu>
rkw@rose:~/build/jgmenu$
Last edited by Nick (2021-02-20 07:08:44)
Offline
@Nick
I installed notepad++ under wine and have been able to reproduce the issue.
I think I've fixed it now. Thanks for reporting and helping to resolve.
By default, jgmenu uses the apps module to generate the system menu. However, the apps module is not XDG Menu Spec compliant, because the spec is so complicated and I don't like it
If you want a more XDG compliant menu, try the lx module by setting csv_cmd=lx in your ~/.config/jgmenu/jgmenurc
I say "more" compliant, because I have found that lx/xfce/KDE/gnome implement the menu/desktop file spec slightly differently and mostly tuned to deal with their own menu packages. If you install several menu packages on the same machine you can get odd behaviours.
The lx module uses libmenu-cache and does show notepad++ in a special Wine directory.
I did however find that libmenu-cache also struggled with the backlashes, so have implemented a fix. So whilst, bunsenlabs ships the lx module, for the purposes of what your doing, you have to build it until we upversion.
./configure --prefix=$HOME --with-lx
make
make install
Alternatively, if you want to stick with the apps module (my recommendation), you create a schema with a Wine directory as follows:
Add the following to ~/.local/share/applications/wine/Programs/Notepad++.desktop
Categories=Wine
Copy data/schema to ~/.config/jgmenu/schema and add a wine category:
Name=Accessories
Icon=applications-accessories
Categories=Accessibility;Core;Utility;
Name=Development
Icon=applications-development
Categories=Development;
Name=Education
Icon=applications-science
Categories=Education;
Name=Games
Icon=applications-games
Categories=Game;
Name=Graphics
Icon=applications-graphics
Categories=Graphics;
Name=Multimedia
Icon=applications-multimedia
Categories=Audio;Video;AudioVideo;
Name=Internet
Icon=applications-internet
Categories=Network;
Name=Office
Icon=applications-office
Categories=Office;
Name=Other
Icon=applications-other
Name=Settings
Icon=preferences-desktop
Categories=Settings;Screensaver;
Name=System
Icon=applications-system
Categories=Emulator;System;
Name=Wine
Icon=wine
Categories=Wine;
Online
because the spec is so complicated and I don't like it
lol
my recommendation
you the boss
After editing the desktop files in question as instructed
Add the following to...
Categories=Wine
and rebuilding and launching your program per previous instructions of
git clone https://github.com/johanmalm/jgmenu
cd jgmenu
./scripts/install-debian-dependencies.sh
make
./jgmenu-apps | ./jgmenu --simple
which, as an aside, just for posterity's sake, did require for me a ./configure command, and so read in entirety as
git clone https://github.com/johanmalm/jgmenu
cd jgmenu
./scripts/install-debian-dependencies.sh
./configure
make
./jgmenu-apps | ./jgmenu --simple
and creating ~/.config/jgmenu/schema as instructed
Copy data/schema to ~/.config/jgmenu/schema and add a wine category...
both pinball and notepad++ are now visible and launching under the jgmenu applications menu category entitled "Wine."
try the lx module
After recompiling as instructed
./configure --prefix=$HOME --with-lx make make install
As far as I could tell, everything seemed to be working as well. It was difficult for me as an inexperienced user to tell if I was using the new compilation with the lx module instead of the apps module or not.
until we upversion
I'll be more than happy to test again at a later date.
May I say it's been an absolute pleasure working with you. Thanks for your quick and attentive responses, a developer could do no more
I never knew pinball could be so fun
Offline
Thanks. I'm delighted it's working and thanks for your help with tracking down these bugs.
Online