On Thu, May 18, 2017 at 01:24:28AM +0000, aforete wrote: > Hello, I was wondering if there is a way of starting an application > automatically on starting a vm in qubes. Say I want to start thunderbird > once the 'work' vm starts up. I usually do this using a cronjob so I type > crontab -e > in a terminal in 'work' and add the line: > @reboot /usr/bin/thunderbird > I save and exit. I read the following page > https://www.qubes-os.org/doc/dom0-tools/qvm-service/ > So I typed > qvm-service -e work crond > But either restarting the vm in 'Qubes vm manager' or stopping and > starting, or rebooting the laptop doesn't make thunderbird start when > 'work' does. > Am I doing something wrong here? is there any other way to start > applications once a vm starts?
I've never understood using cron for this sort of thing. If you try a simple logging script you will see that the cron job is being triggered on reboot. I suspect that what's happening here is that the cronjob is triggered before the gui is set up. You have the usual start up alternatives - try adding the command in .profile (although I think this will get called 3 times, which may or may not affect the target application). Or .bash_profile. If you are concerned about the multiple system calls just use a calling script that checks to see if the application is running and only starts it if it isn't running. An alternative approach would be to call the application that you want to start with 'qvm-run -a' - this will start the qube and launch the application. This is, of course, how the menu items work. unman -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/20170520221524.GA891%40thirdeyesecurity.org. For more options, visit https://groups.google.com/d/optout.
