How to autostart a program in an appVM?

49 na pagtingin
Lumaktaw sa unang mensaheng hindi pa nababasa

jrg.d...@gmail.com

hindi pa nababasa,
Ene 14, 2019, 8:46:02 PM1/14/19
para kayqubes-users
I am sure almost everyone has one or more appVMs in which they autostart programs. That is, how do I set things up so that when a particular appVM is automatically launched at boot time (or I manually start it), one or more programs get started automatically? For example, in my "personal" Qube, I want Thunderbird, Slack (the collaboration tool) and Dropbox to start automatically.

This is another thing I did under "straight" Linux, that I cannot see how to do under Qubes. I did the RTFM and attempted to find something relevant in the qubes-users forum -- no luck (or I missed seeing anything).

Ivan Mitev

hindi pa nababasa,
Ene 15, 2019, 1:31:00 AM1/15/19
para kayqubes...@googlegroups.com


On 1/15/19 3:46 AM, jrg.d...@gmail.com wrote:
> I am sure almost everyone has one or more appVMs in which they autostart programs. That is, how do I set things up so that when a particular appVM is automatically launched at boot time (or I manually start it), one or more programs get started automatically? For example, in my "personal" Qube, I want Thunderbird, Slack (the collaboration tool) and Dropbox to start automatically.
>
> This is another thing I did under "straight" Linux, that I cannot see how to do under Qubes. I did the RTFM and attempted to find something relevant in the qubes-users forum -- no luck (or I missed seeing anything).

You'll have to use .desktop files (as per the freedesktop "standard" [1])

For a given VM create (or copy/symlink) the .desktop file of the
application you want to autostart in $HOME/.config/autostart/

Eg. to start thunderbird:

mkdir -p $HOME/.config/autostart/ # in case it doesn't exist yet

ln -s /usr/share/applications/mozilla-thunderbird.desktop \
$HOME/.config/autostart/

You can of course create custom .desktop files to (auto)run arbitrary stuff.

As a side note the system-wide folder (that you'd customize in your
templateVMs) is /etc/xdg/autostart.


[1] https://specifications.freedesktop.org/desktop-entry-spec/latest/

Alex

hindi pa nababasa,
Ene 15, 2019, 1:32:26 AM1/15/19
para kayqubes...@googlegroups.com
On 1/15/19 2:46 AM, jrg.d...@gmail.com wrote:
> I am sure almost everyone has one or more appVMs in which they autostart programs. That is, how do I set things up so that when a particular appVM is automatically launched at boot time (or I manually start it), one or more programs get started automatically? For example, in my "personal" Qube, I want Thunderbird, Slack (the collaboration tool) and Dropbox to start automatically.

I did exactly that, with the fedora template, setting the programs to
auto-start with gnome-tweaks (in previous fedora versions it was named
gnome-tweak-tool). There's a section that conveniently allows you to
manage the .desktop file links to have programs auto-start at boot.

This was the tool I used to fix font appearance (antialiasing mode,
hinting) with older fedora versions that had problems (23-24-25).

--
Alex

John Goold

hindi pa nababasa,
Ene 15, 2019, 12:48:19 PM1/15/19
para kayqubes-users

@Ivan: Thanks, that worked just fine. I vaguely remember messing with .desktop files before my Linux distributions included GUI settings that handled autostart.

By the way, how do I "Mark as complete"?

@Alex: Thanks for responding. If I do not have to add programs for one-off tasks, I would rather not do so. But I will keep your suggestion in mind.

Ivan Mitev

hindi pa nababasa,
Ene 15, 2019, 1:48:44 PM1/15/19
para kayqubes...@googlegroups.com


On 1/15/19 7:48 PM, John Goold wrote:
> On Tuesday, January 15, 2019 at 12:31:00 AM UTC-6, Ivan Mitev wrote:
>> On 1/15/19 3:46 AM, jrg.d...@gmail.com wrote:
>>> I am sure almost everyone has one or more appVMs in which they autostart programs. That is, how do I set things up so that when a particular appVM is automatically launched at boot time (or I manually start it), one or more programs get started automatically? For example, in my "personal" Qube, I want Thunderbird, Slack (the collaboration tool) and Dropbox to start automatically.
>>>
>>> This is another thing I did under "straight" Linux, that I cannot see how to do under Qubes. I did the RTFM and attempted to find something relevant in the qubes-users forum -- no luck (or I missed seeing anything).
>>
>> You'll have to use .desktop files (as per the freedesktop "standard" [1])
>>
>> For a given VM create (or copy/symlink) the .desktop file of the
>> application you want to autostart in $HOME/.config/autostart/
>>
>> Eg. to start thunderbird:
>>
>> mkdir -p $HOME/.config/autostart/ # in case it doesn't exist yet
>>
>> ln -s /usr/share/applications/mozilla-thunderbird.desktop \
>> $HOME/.config/autostart/
>>
>> You can of course create custom .desktop files to (auto)run arbitrary stuff.
>>
>> As a side note the system-wide folder (that you'd customize in your
>> templateVMs) is /etc/xdg/autostart.
>>
>>
>> [1] https://specifications.freedesktop.org/desktop-entry-spec/latest/
>
> @Ivan: Thanks, that worked just fine. I vaguely remember messing with .desktop files before my Linux distributions included GUI settings that handled autostart.

Happy to help. It took me a bit of time too to figure those things when
I switched to Qubes OS since VMs don't run a full fledged VM with easily
found GUI settings apps. You then have to find out how things run "under
the hood".

As a side note you can also prevent system-wide autostart apps from
starting by putting the following two lines .desktop file in
$HOME/.config/autostart/ (the file has to be named exactly like the one
that is defined in /etc/xdg/autostart/ and that you want to override):

[Desktop Entry]
Hidden=true

(That's what the GUIs do when you deselect applications in
startup/autostart.)


> By the way, how do I "Mark as complete"?

No need !
Tumugon sa lahat
Sumagot sa may-akda
Ipasa
0 bagong mensahe