Score:1

Launch .desktop file from bash script and await exit

ba flag

I need to execute a .desktop file with a java version different from what I usually use. To do that, I decided to write a bash script that uses update-alternatives to set the java version to the required one, start the application and to reset the java version after the application has been exited.

I use gtk-launch to launch the application, but it does not wait for it to exit. Thus the java version reset takes place too early.

I need a way to wait for the app to exit before resuming code. How is it possible?

Score:0
cn flag

You could try the below, in a bash script:
command2 is executed only if command1 returns an exit status of zero.

command1 && command2
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.