Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] Need create shortcut feature #115

Closed
gunduzhan opened this issue Jan 30, 2021 · 17 comments
Closed

[Request] Need create shortcut feature #115

gunduzhan opened this issue Jan 30, 2021 · 17 comments

Comments

@gunduzhan
Copy link
Contributor

Need shortcut feature for Programs tabs.
And also I'm using same bottle for smilar design apps two maybe three apps.

Thanks.

@mirkobrombin
Copy link
Member

mirkobrombin commented Jan 30, 2021

Hi, I don't know what you need. A shortcut to reach the program tab?

Please follow the issue template for the feature request:

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@gunduzhan
Copy link
Contributor Author

Hi, I don't know what you need. A shortcut to reach the program tab?

Sorry for my bad explanation. I forgot to say, need desktop or application menu shortcuts for bottles.
Like "Create Desktop Shortcut" or Create Application Menu Shortcut
Ex. i've installed two apps in my Bottle "Photoshop" and "Illustrator". I'm always start apps with the main interface. Maybe it can be asked for first install. Then when I install next app I need to create a shortcut again.

@mirkobrombin
Copy link
Member

mirkobrombin commented Jan 30, 2021

Hi, I don't know what you need. A shortcut to reach the program tab?

Sorry for my bad explanation. I forgot to say, need desktop or application menu shortcuts for bottles.
Like "Create Desktop Shortcut" or Create Application Menu Shortcut
Ex. i've installed two apps in my Bottle "Photoshop" and "Illustrator". I'm always start apps with the main interface. Maybe it can be asked for first install. Then when I install next app I need to create a shortcut again.

Now I get it, thanks for reporting this.
I don't know if I can offer this function without too many complications, the installation is controlled by Bottles only through the official Installers. I'll think about it.

@wsdfhjxc
Copy link

Maybe OP is using the Flatpak version? If I'm not mistaken, the native/AppImage build already lets winemenubuilder throw its junk inside the ~/.local's subdirectories, so the application shortcuts should work. However, the Flatpak version is missing some permissions in the manifest file, so incidentally the host system isn't polluted after installing a bottled program.

I'm not sure whether you want to fix this for the Flatpak version or not, but I'm... glad that it's not working. Personally, I'd rather have an extra button for manually exporting a menu shortcut (a single .desktop file) for a given program inside the Programs tab.

@mirkobrombin
Copy link
Member

mirkobrombin commented Jan 31, 2021

Maybe OP is using the Flatpak version? If I'm not mistaken, the native/AppImage build already lets winemenubuilder throw its junk inside the ~/.local's subdirectories, so the application shortcuts should work. However, the Flatpak version is missing some permissions in the manifest file, so incidentally the host system isn't polluted after installing a bottled program.

I'm not sure whether you want to fix this for the Flatpak version or not, but I'm... glad that it's not working. Personally, I'd rather have an extra button for manually exporting a menu shortcut (a single .desktop file) for a given program inside the Programs tab.

Yes theoretically wine creates a new desktop file for each installation but having no control over this thing i can't be entirely sure.
My idea is to turn this off somehow and enable it only for our installers and in the contextual menu of the program tab.

@wsdfhjxc
Copy link

Yes theoretically wine creates a new desktop file for each installation but having no control over this thing i can't be entirely sure. My idea is to turn this off somehow and enable it only for our installers and in the contextual menu of the program tab.

There's a related discussion in Lutris' repo about disabling that behavior.

Application menu shortcuts managable/controllable within Bottles would be really awesome.

@Nokia808
Copy link

Nokia808 commented Feb 17, 2021

Hi all. Just now I see this thread. I think it is related to this discussion:
flathub/com.usebottles.bottles#4
I'm correct or not?

If yes, then:

  1. @wsdfhjxc commented the following:

"I'm not sure whether you want to fix this for the Flatpak version or not, but I'm... glad that it's not working."

I'm fully agree with @wsdfhjxc that it MUST NEVER FIXED ON FLATPAK because this will be very dangerous & allow viruses to run from behind flatpak.

  1. I'm fully agree with both @wsdfhjxc who commented:
    "I'd rather have an extra button for manually exporting a menu shortcut (a single .desktop file) for a given program inside the Programs tab."

This will be more secure for flatpak, & should be disabled by default. Since version 6+ WineHQ became very dangerous regarding run viruses & this will be very very very bad thing on Linux.
More over the developer must be very very careful when he will add this feature to be very very sure that the the Windows applications (including viruses & spyware & other bad program) will never be able to unitize this option FROM BEHIND user (I mean Windows application can enable new planned option by itself without knowledge of user & thus can utilize the new option as a backdoor through it can penetrate the very cute flatpak's sandbox feature.

  1. question for developer @mirkobrombin :
    Dear @mirkobrombin the @wsdfhjxc said "......... but I'm... glad that it's not working". He mean flatpak version. So, does this mean that the current flatpak is safe from risk to run viruses (safe from risk of run Windows application from behind it) ??

@mirkobrombin
Copy link
Member

I'll see this after updating v3 with the new UI. I would like to find a compromise.

@Eonfge
Copy link

Eonfge commented Feb 24, 2021

I've been using Q4Wine quite a bit and it has two options that really set it apart for daily use:

  • You can manually create shortcut (icons in their vernacular) based on any executable within a prefix/bottle. This makes is a lot easier to use this application outside of happy flows: We all like .msi installers that do everything properly, but if you want to install an old game or you're stuck with a custom installer, then you can later manually add shortcuts. Also relates a bit to [Request] Being able to open programs in a file manager #132

  • Q4Wine can automatically regenerate .dekstop shortcuts based on your icons, allowing you to have some extra control over the visual representation of applications within the rest of the desktop. It can also import wine shortcuts which it then bundles in their respective prefixes, so that you can use one application to manage other prefixes as well.

This makes the application a lot more pleasent to use than Mini Galaxy. While I like Mini Galaxy in concept, at the end of the day it creates a lot of shortcuts for GOG related functions, uninstallers and documentation. While the Mini Galaxy UI is quite crisp and HIG conscious, its one-size-fits-all installer leaves a surprising amount of threads bungling.

I've experimented quite a bit with different tools, Lutris, Mini Galaxy, Play On Linux and Q4Wine, and for some reason Q4Wine strikes the best balance between manageable and powerful. That said, Bottles looks like a good contender in the race for a proper Wine UI

@mirkobrombin
Copy link
Member

I've been using Q4Wine quite a bit and it has two options that really set it apart for daily use:

  • You can manually create shortcut (icons in their vernacular) based on any executable within a prefix/bottle. This makes is a lot easier to use this application outside of happy flows: We all like .msi installers that do everything properly, but if you want to install an old game or you're stuck with a custom installer, then you can later manually add shortcuts. Also relates a bit to [Request] Being able to open programs in a file manager #132
  • Q4Wine can automatically regenerate .dekstop shortcuts based on your icons, allowing you to have some extra control over the visual representation of applications within the rest of the desktop. It can also import wine shortcuts which it then bundles in their respective prefixes, so that you can use one application to manage other prefixes as well.

This makes the application a lot more pleasent to use than Mini Galaxy. While I like Mini Galaxy in concept, at the end of the day it creates a lot of shortcuts for GOG related functions, uninstallers and documentation. While the Mini Galaxy UI is quite crisp and HIG conscious, its one-size-fits-all installer leaves a surprising amount of threads bungling.

I've experimented quite a bit with different tools, Lutris, Mini Galaxy, Play On Linux and Q4Wine, and for some reason Q4Wine strikes the best balance between manageable and powerful. That said, Bottles looks like a good contender in the race for a proper Wine UI

Shortcut management is a function I would like to work on but not immediately. I still don't know how to develop it, I haven't thought about it but I know that I'll put my hand to it.

At the moment my main goal is to release v3 and update it with bugfixes and small improvements, committing my energies to v4, which consists in a rewriting of the code from scratch, favoring extensibility in the future, thus avoiding having to mess with some ugly code. The v2 was born as a nice remake of v1 but at the exit there were many (perhaps too many) reports that led me to play with the code, dirtying it and perhaps taking it to its limit.

@jkatzmewing
Copy link

jkatzmewing commented Apr 10, 2021

Seconding this. It's kind of a big deal because many installers don't create shortcuts within the Bottles GUI, and the command prompt feature doesn't work either in the Flatpak; for programs that have to be launched with a CLI argument, there's not really any good way of invoking them short of e.g. flatpak --command=bash run com.usebottles.bottles and setting a whole slew of Wine env vars. Which is doable, but not at all friendly for newbies.

@sonnyp
Copy link
Contributor

sonnyp commented Aug 5, 2021

I was also looking for this after running my first app with Bottles.

A few thoughts on implementation

It's legal to create desktop files under xdg-data/applications/arbitrary-folder-name so Bottles could create them under ~/.local/share/applications/com.usebottles.Bottles.


Then the flatpak could use the somewhat restricted permission

--filesystem=xdg-data/applications/com.usebottles.Bottles:rw

It would allow Bottles to break the sandbox but if I didn't trust it I wouldn't use it.

Care has to be given so that windows app themselves cannot break the sandbox with malicious app name/description/... Maybe flatpak-builder .desktop file creation logic can help there.


Not sure what's the .desktop equivalent on Windows (.ini?) but perhaps there is a window desktop file to freedesktop desktop file converter?

Or simply let Wine create the file, then steal it.

Instead of rewriting this logic that surely already exists.

Specially for advanced use cases like "I want to be able to use this windows program to open that type of file"


Also related to flatpak, a while ago I made something similar sonnyp/Tangram#22 and was bit by a bug in GNOME Shell. It looks like it's fixed now.

@mirkobrombin mirkobrombin added this to Todo in 2021.8.28 Aug 14, 2021
@mirkobrombin
Copy link
Member

mirkobrombin commented Aug 20, 2021

As the desktop file is generated by winemenubuilder and cannot be controlled, I think we should generate these files on our way, then running applications using the Bottles CLI https://docs.usebottles.com/bottles/run-.exe-.msi-.bat-.lnk-files#launch-from-cli-supports-lnk

winemenubuilder is blacklisted in Bottles because the generated files doesn't use the bottle configuration, also the Exec run out of the sandbox.

In my opinion the best option is to give the user the ability to generate a valid desktop entry that uses the Bottles CLI to start the program:

bottles -b MyBottle -e file.exe
bottles -b MyBottle -l file.lnk

This process is automatically performed using our installers, so when it hit its first stable release, we can start building installers for common used programs.

@mirkobrombin mirkobrombin moved this from Todo to Postponed in 2021.8.28 Aug 20, 2021
@mirkobrombin
Copy link
Member

Tracking on 2021.12.14 but will not be available in the Flatpak due to lack of permissions.

@AsciiWolf
Copy link
Contributor

This could help: flatpak/xdg-desktop-portal#696

@jclsn
Copy link

jclsn commented Apr 5, 2022

The feature doesn't work for me. It doesn't run the application, but just opens bottles. The icon is also not correct.

@gitthangbaby
Copy link

The feature doesn't work for me. It doesn't run the application, but just opens bottles. The icon is also not correct.

my shortcut wasn't even created it's just saying "Desktop entry created <...>". I've spend some time checking where is the file, adding permission via Flatseal, only to realize the code outputs the message and then performs it without checking.
Once you study the commit above, you can create the shortcut manually by grabbing the executable from the shortcut, changing --command=bottles-cli, and using "run -b BOTTLE_NAME -p APP_NAME" (as you see in the GUI) to the end. Then grab icon with the Dolphin plugin. It works in flatpak mode too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
2021.8.28
  
Postponed
Development

No branches or pull requests

10 participants