How to extend a desktop file for adding new Actions

I want to add some extra Actions to the shortcut that starts LibreOffice Writer, for quickly opening some of my documents by right clicking on the Favorite icon of Writer.

To do this, I copied the file /usr/share/applications/libreoffice-writer.desktop to my ~/.local/share/applications/ with a different name, simplified its contents, changed its Name= and Comment= lines, and added some new Actions=. (I do not want to change the system-wide original desktop file, since my additions should be done per user basis.)

The new shortcut appears under Activities and menus and I can start an instance of Writer by selecting it. However, after Writer starts, the right-click menu of its icon is still the original one: My extra Actions do no appear. And if I add it to Favorites, not any of my new Actions are added.

What is the correct method of adding some new Actions to a desktop file?

Note: My new desktop file named ~/.local/share/applications/libreoffice-writer-xxx.desktop is something like this:

[Desktop Entry] Version=1.0 Terminal=false Icon=libreoffice-writer Type=Application Exec=libreoffice --writer %U Name=LibreOffice Writer Shortcuts Comment=Local copy of desktop file StartupNotify=true Actions=NewDocument1;doc1;doc2;  [Desktop Action doc1] Name=Open doc1.odt Exec=libreoffice --writer /home/xxx/Documents/doc1.odt  [Desktop Action doc2] Name=Open doc2.odt Exec=libreoffice --writer /home/xxx/Documents/doc2.odt  [Desktop Action NewDocument1] Name=Start New Document Exec=libreoffice --writer 

Adding Dialogue with AR (Swift)

I want to create an application that involves AR with dialogue on screen. The interaction will be similar to woebot and will include questions with button style answers. I am also using ARkit with unity, which makes it more challenging to figure out how to lay out the foundation for my application. Currently I have a cube floating in the air.

Adding shipping total during checkout

I’ve a custom shipping module which has a drop-down list options for choosing an option to add some cost for shipping amount, i only successfully to use preference to override Magento\Quote\Model\Quote\Address\Total\Shipping

in the collect method:

$  total->setBaseShippingAmount($  rate->getPrice()+$  fee); $  total->setShippingAmount($  amountPrice+$  fee); 

is there any better practice which i can make use?

Modifying and adding data is not asynchronous

My adding and updating data is not asynchronous. Because of this, in the process of updating data, there is a hang. And then it completely fails (just the process is interrupted without errors). What am I doing wrong? And how to fix it?

... for (var i = 0; i < db.rows.length; i++) {     is_find = false     for (var j = 0; j < api.rows.length; j++) {         if (db.rows[i].NAME === api.rows[j].Name) {             (async function() {                 is_find = true                 var options = {                     url: url,                     method: 'POST',                     form: {                         Name: db.rows[i].NAME                     },                     headers: {                         'Cookie': cookies                     }                 };                 try {                     var patch = await request(options);                     console.log('patch:', patch.body);                 } catch (err) {                     console.log('Error:', err);                 }             })();             break         }     }     if (!is_find) {         (async function() {             var options = {                 url: url,                 method: 'POST',                 form: {                     Name: db.rows[i].DOLG_NAME                 },                 headers: {                     'Cookie': cookies                 }             };             try {                 var post = await request(options);                 console.log('post:', post.body);             } catch (err) {                 console.log('Error:', err);             }         })();     } } ... 

Adding Constraint to Paragraph field

I have a Content Type with a field that references 6 different paragraph types. The field is set up to accept unlimited values. For one of the types I would like to have exactly four values added. I’ve been trying to add a Constraint but it seems that Constraints are built to check if a fields values are valid and not if there are only four items

Is using hook_entity_bundle_field_info_alter the correct hook or should I be focused on using hook_entity_type_alter or maybe even some other method?

The adding up of numbers isn’t working right in my food ordering system

prices=print("Mushroom Pies:£1.20     Vegtable Pies:£0.80     Spiced Lentil Pies:£1.40") vegetablepies=0.80 mushroompies=1.20 spicedpies=1.40 total=vegetablepies+mushroompies+spicedpies vegetablepies=input("How many vegtable pies do you want?") mushroompies=input("How many mushroom pies do you want?") spicedpies=input("How many spiced lentil pies do you want?") print(total) 

This is my code i have been working on it for a bit but this one part doesn’t work and I’m unsure why the maths isn’t working

after adding bridge, services on host are no longer reacheable from other hosts

Before adding the bridge, different http services were reachable from other hosts.

After adding the brnoidge, only ssh is reachable from other hosts. All other services are only reachable from the host itself, over localhost or the IP of the bridge adapter.

On the host, NO firewall is active, other hosts can ping the host and connect via ssh and scp, but the different web services are not rechargeable from other machines. other services are http based, on non interfering ports: 9090, 8001, 7070

#/etc/network/interfaces auto lo iface lo inet loopback auto lo iface lo inet loopback   auto br0 iface br0 inet dhcp         bridge_ports enp0s25         bridge_stp off         bridge_fd 0         bridge_maxwait 0  iface enp0s25 inet manual  auto br0 iface br0 inet dhcp     bridge_ports enp0s25     bridge_stp off     bridge_fd 0     bridge_maxwait 0  iface enp0s25 inet manual 

output of: ifconfig

br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500     inet 10.203.114.247  netmask 255.255.0.0  broadcast 10.203.255.255     inet6 fe80::221:ccff:fe4b:313a  prefixlen 64  scopeid 0x20<link>     ether 00:21:cc:4b:31:3a  txqueuelen 1000  (Ethernet)     RX packets 23803  bytes 23963479 (23.9 MB)     RX errors 0  dropped 0  overruns 0  frame 0     TX packets 7365  bytes 806013 (806.0 KB)     TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0  docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500     inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255     ether 02:42:02:a9:df:4e  txqueuelen 0  (Ethernet)     RX packets 0  bytes 0 (0.0 B)     RX errors 0  dropped 0  overruns 0  frame 0     TX packets 0  bytes 0 (0.0 B)     TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0  enp0s25: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500     ether 00:21:cc:4b:31:3a  txqueuelen 1000  (Ethernet)     RX packets 559347  bytes 511837384 (511.8 MB)     RX errors 0  dropped 325  overruns 0  frame 0     TX packets 94679  bytes 8350357 (8.3 MB)     TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0     device interrupt 20  memory 0xd2600000-d2620000    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536     inet 127.0.0.1  netmask 255.0.0.0     inet6 ::1  prefixlen 128  scopeid 0x10<host>     loop  txqueuelen 1000  (Local Loopback)     RX packets 2722645  bytes 766563500 (766.5 MB)     RX errors 0  dropped 0  overruns 0  frame 0     TX packets 2722645  bytes 766563500 (766.5 MB)     TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0  virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500     inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255     ether 52:54:00:db:37:1d  txqueuelen 1000  (Ethernet)     RX packets 323  bytes 45009 (45.0 KB)     RX errors 0  dropped 0  overruns 0  frame 0     TX packets 170  bytes 13961 (13.9 KB)     TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0 

The bridge is now using the same DCHP config as the enp0s25 before and also has the same IP. This worked on other hosts without issues. Outside machines and their services can be reached from the host OS or VMs without issues. Inbound, ONLY ssh is reacheable, even if services are configured to run on 0.0.0.0.

Any ideas, whats blocking the other services ?