The path to launch-scripts like opera etc

I installed Mate on a new NVMe, and used the existing /home partition on my old hard drive.
On my desktop I have a panel with my most used apps. The icons exec a "name %U" to launch. But the %U does not point to the right path now so all the icons are missing and they do not launch. Tried to find the path but that seams impossible. I was looking for Opera's launch script, where is it?
There must be a simple way to ad a path pointing to the /home partition on the old hard drive and all should be fine. But though I can do this in UNIX it has so far been impossible with Linux Mate.
Any suggestions are appreciated.

Welcome back to Ubuntu MATE community!

So, you have installed Opera.
Probably from their APT/deb-repository by using commands like shown below:

wget https://deb.opera.com/archive.key -O /tmp/key
sudo apt-key add /tmp/key
sudo apt-add-repository "deb https://deb.opera.com/opera-stable/ stable non-free"
sudo apt-get install opera-stable

The above commands will install needed desktop shortcut file as /usr/share/applications/opera.desktop which has some opera (the full path is /usr/bin/opera if you are interested in details) commands with some arguments.
You can simply copy this launcher from Applications menu and paste it to any of your Panels or pin it in Plank Dock.


Some details about UNIX-way, or how do you want to call it.
You are running Ubuntu MATE, an Ubuntu flavor, which is based on Debian.
Both primarily use deb-packages to distribute and install software. These deb-packages are controlled by APT (Advanced Packaging Tool).

Every deb-package is registered in the special database. So for our case the package name is opera-stable, you can query this database by using some commands.
For example dpkg -L opera-stable | grep -E "\.desktop|/bin/" will list package contents, especially requested desktop-file path and binary executable file path:

$ dpkg -L opera-stable | grep -E "\.desktop|/bin/"
/usr/share/applications/opera.desktop
/usr/bin/opera

Usually the /usr/bin is contained in $PATH variable, so all shells will know /usr/bin/opera as opera.

Useful stuff to read:

Thank you for answering.
I have mate running on my hd (old-mate) and on my NVMe (new-mate), both using the same /home.
The old-mate is running fine and here I did a

~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

Searched them but did not find the file/script or whatever "Opera %U" points to.
In /usr/bin (where I would have expected it to be, like Firefox is) I find a 160 Mb library.
I am sure that if I reinstall Opera from the new-mate it will work, but I want to understand what is going on and then just fix the links so it works.
If you read the /usr/share/applications/opera file it has the Exec=opera %U I wrote in my first request. It does not have the actual path which was why I tried to find it with echo $PATH.

You have to add Opera repository to new-mate and install the opera-stable package to its root filesystem (/).
The home folder does not contain Opera installation.

1 Like

The reason I did not do that but wanted to do it manually. That is copy it from old-mate to the new is that I expect it will over ride my customization on /home. Which I have done for Opera, Blender, Eclipse etc. But if there is no other way I will have to do that. I will try with Opera and then see what happens on /home. Thanks.

When I talk about UNIX I mean IBM Xenix which I ran back in the 1985-90's.

Does there exist a flow chart or similar that shows which programs/scripts does what? (in Mate or Ubuntu)