Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[solved] Trying to run two commands in .desktop menu file

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
bedtime
Posts: 146
Joined: 2012-12-16 19:34
Has thanked: 1 time
Been thanked: 6 times

[solved] Trying to run two commands in .desktop menu file

#1 Post by bedtime »

I have alacarte installed, and it seems to be able to run one command just fine, but I would like it to run two commands: one command, and then another once it has finished.

Here is the command I want to run:

Code: Select all

/bin/rm -rf /home/user/sandbox/epiphany/.[bcXl]*; /usr/bin/firejail --private=/home/user/sandbox/epiphany --dns=8.8.8.8 --dns=8.8.4.4 /usr/bin/epiphany -i
It deletes the contents of a ramfs directory each time it starts up, and then it opens epiphany up in a container. This works when executed from the terminal; I have confirmed that it deletes the contents as well, but it will not run when inserted in menu via alacarte or when I edit a .desktop file. Both commands do not run. I cannot see the output so I don't know what's going on.

Any ideas?
Last edited by bedtime on 2017-07-28 18:36, edited 1 time in total.

bedtime
Posts: 146
Joined: 2012-12-16 19:34
Has thanked: 1 time
Been thanked: 6 times

Re: Trying to run two commands in .desktop menu file

#2 Post by bedtime »

wizard10000 wrote:This should work in a .desktop file -

Code: Select all

bash -c "/bin/rm -rf /home/user/sandbox/epiphany/.[bcXl]*; /usr/bin/firejail --private=/home/user/sandbox/epiphany --dns=8.8.8.8 --dns=8.8.4.4 /usr/bin/epiphany -i"
Hope this helps -
Works like a charm! :D

I have used the command 'bash -c' in the past, but for some reason hadn't thought to use it in this case. Makes sense why it works!

SOLVED! :D

Post Reply