Bottles icon indicating copy to clipboard operation
Bottles copied to clipboard

[Request]: Autorun application

Open zDEFz opened this issue 1 year ago • 11 comments

Tell us the problem or your need

I'd like to autostart a program I always need

Describe the solution you'd like

To run the bottle at startup

Other solutions?

No response

Additional context and references

No response

zDEFz avatar Aug 12 '22 15:08 zDEFz

Please provide more info

mirkobrombin avatar Aug 13 '22 06:08 mirkobrombin

What info do you need? For instance, if you want to autorun any bottle program, how would you do that? I know how it works in wine commandline, but how do you call a bottle from the commandline and run it?

zDEFz avatar Aug 13 '22 11:08 zDEFz

I'm missing the "autorun" concept. I mean, are you talking about like running apps automatically when opening a bottle?

mirkobrombin avatar Aug 13 '22 12:08 mirkobrombin

I'm missing the "autorun" concept. I mean, are you talking about like running apps automatically when opening a bottle?

No. I'd like the host (Linux) to start a bottle of my choice automatically on bootup. Not programs in the bottle to start other programs. Linux Starts program X in bottle X automatically. Application starts appears. Me happy.

zDEFz avatar Aug 14 '22 20:08 zDEFz

A (temporary) solution is to just create a desktop entry with bottles of the application and then move the generated .desktop file in ~/.local/share/applications to ~/.config/autostart, you may have to create the directory if it doesn't exist

axtloss avatar Aug 14 '22 20:08 axtloss

I think this is the way to go, avoiding using a service. It seems to me a very specific feature, I don't know if it should be implemented or let the users create Desktop entries on their own.

mirkobrombin avatar Aug 15 '22 06:08 mirkobrombin

I might add that the autostart directory depends. Is there a way to detect which autostart directory is currently the right one and give an option to save the .desktop file into that folder? might require temporary sudo access.

zDEFz avatar Aug 15 '22 08:08 zDEFz

Every de should follow the ~/.config/autostart directory since I'm pretty sure that it's a desktop standard, the only extra permission bottles would need for that is read-write access to that directory if it's a flatpak. Additionally you could just use the tools of the de (gnome-tweaks if it's gnome) to add the application to autostart, assuming you've created the desktop entry.

axtloss avatar Aug 15 '22 09:08 axtloss

Every de should follow the ~/.config/autostart directory since I'm pretty sure that it's a desktop standard, the only extra permission bottles would need for that is read-write access to that directory if it's a flatpak. Additionally you could just use the tools of the de (gnome-tweaks if it's gnome) to add the application to autostart, assuming you've created the desktop entry.

it depends. With xdg, its /etc/xdg/autostart https://wiki.archlinux.org/title/autostarting

Scroll all the way down to see different behaviors for different WM's

But wait, my ~/.config/autostart folder is populated as well. Why are some in /etc/xdg/autostart and some in ~/.config/autostart?

Arch based Distros like EndeavourOS seem to have /usr/share/applications for menu entries, /etc/xdg/autostart if used i3, and ~/.config/autostart folder which can be used, too

zDEFz avatar Aug 15 '22 10:08 zDEFz

/etc/xdg/autostart is for system wide stuff, ~/.config/autostart is only for the user.

/usr/share/applications are desktop entries that are system wide, while ~/.local/share/applications is only for the user

axtloss avatar Aug 15 '22 11:08 axtloss

I prefer to document the process in our documentation and avoid more holes in the flatpak

mirkobrombin avatar Aug 21 '22 07:08 mirkobrombin