LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Question: Application launchers, Mate desktop (https://www.linuxquestions.org/questions/linux-desktop-74/question-application-launchers-mate-desktop-4175586503/)

haertig 08-07-2016 01:36 PM

Question: Application launchers, Mate desktop
 
LinuxMint18, Mate desktop

I have a desktop launcher with the command:

env WINEPREFIX="/home/myusername/.wine" wine C:\\Program\ Files\ \(x86\)\\DVD\ Shrink\\DVD\ Shrink\ 3.2.exe

This works just fine. It also works fine if I put it as a launcher on the taskbar using this exact same command.

But I want it as a launcher on the Mate menu. When adding launchers to the Mate menu you must choose a type of "Application" or "Application in terminal". No such choice is required (or even available) in a desktop or taskbar launcher. It works from the Mate menu if I chose "Application in terminal", but it leaves a terminal window displaying, which I would like to avoid. It does not work if I chose "Application" (nothing happens - the application does not launch).

Is there any way to make this work from the Mate menu, WITHOUT having to display the terminal window too? Similar to the way it works for desktop and taskbar launchers?

Thanks in advance for any suggestions!

[edit]spelling correction[/edit]

ondoho 08-08-2016 12:18 AM

just to get things straight, please post output of
(assuming your launcher is called "TheLauncher")
Code:

ls -al ~/Desktop/TheLauncher
cat ~/Desktop/TheLauncher


haertig 08-08-2016 01:04 AM

Code:

david@Davids-Linux-Desktop ~ $ cd Desktop
david@Davids-Linux-Desktop ~/Desktop $ ls -al
total 96
drwxr-xr-x  2 david david  4096 Aug  7 20:22 .
drwxr-xr-x 27 david david  4096 Aug  8 00:00 ..
-rwx------  1 david david  880 Aug  6 10:19 Chrome.desktop
-rwxr-xr-x  1 david david  244 Aug  7 12:17 DVD Shrink.desktop
-rwx------  1 david david  823 Aug  6 10:19 Firefox.desktop
-rwx------  1 david david 11059 Aug  5 20:15 gthumb.desktop
-rwx------  1 david david  345 Aug  6 09:08 keepassx.desktop
-rw-r--r--  1 david david  4985 Aug  6 16:13 new file
-rwx------  1 david david 10085 Aug  6 22:45 pix.desktop
-rwx------  1 david david  293 Aug  6 10:19 Scan.desktop
-rw-r--r--  1 david david 26786 Jul 29 11:54 Screenshot at 2016-07-29 11-54-37.png
-rwx------  1 david david  482 Aug  6 10:19 Screenshot.desktop
-rwx------  1 david david  634 Aug  6 10:19 Thunderbird.desktop
david@Davids-Linux-Desktop ~/Desktop $ cat DVD*
[Desktop Entry]
Name=DVD Shrink 3.2
Exec=env WINEPREFIX="/home/david/.wine" wine C:\\\\Program\\ Files\\ \\(x86\\)\\\\DVD\\ Shrink\\\\DVD\\ Shrink\\ 3.2.exe
Type=Application
StartupNotify=true
Icon=3BB5_DVD Shrink 3.2.0
Name[en_US]=DVD Shrink
david@Davids-Linux-Desktop ~/Desktop $


haertig 08-08-2016 01:09 AM

1 Attachment(s)
Here is right-click -> properties of the desktop icon:

haertig 08-08-2016 01:12 AM

Note: The desktop icon works 100%. So does the taskbar icon. It is the Mate menu launcher that doesn't work (unless it also displays the terminal window that I want to get rid of). I created the Mate menu launcher by cut-n-paste'ing the command from the right-click -> properties desktop icon.

ondoho 08-08-2016 03:02 PM

paste the command into a textfile, e.g. like this:
Code:

#!/bin/sh
env WINEPREFIX="/home/david/.wine" wine C:\\\\Program\\ Files\\ \\(x86\\)\\\\DVD\\ Shrink\\\\DVD\\ Shrink\\ 3.2.exe &

make the file executable and point mate menu to that instead.
hope it works.

haertig 08-08-2016 07:50 PM

I couldn't get Mate menu to execute that shell file. It kept popping up some error, although executing the shell file from the command line worked. So the file was OK, just something about Mate menu not being able to execute it.

Oh well. This is not a show-stopper issue for me. I can use things as they are.

Thanks for trying to help, I appreciate it!

ondoho 08-14-2016 04:07 AM

Quote:

Originally Posted by haertig (Post 5588187)
I couldn't get Mate menu to execute that shell file. It kept popping up some error, although executing the shell file from the command line worked.

i don't know if i already told you, but you really need to post
a) exactly what you did, commands issued, checkboxes checked etc.
b) exact and complete error messages.

if you adhere to that, we will get there evtl.

haertig 08-17-2016 05:45 PM

2 Attachment(s)
Sorry, I was out of town for a while and not able to respond.

I just went to recreate my last failed attempt, to show you the error message. But when I recreated that previous failure, IT WORKED! So, no telling what I did the first time when I attempted it. Must have been some typo or other user error on my part.

FWIW, below screenshots show what worked for me, exactly like I want it to work. The screenshot showing the launcher is a launcher from the MATE menu (not a launcher from the desktop or the taskbar, which are different). It was the MATE menu launcher that I could not get to work previously. Now it works!

@ondoho - Thanks for the help! :)

ondoho 08-18-2016 01:13 AM

that's all good and solved;

the next bit is optional, it's about cleaning your system and getting the best functionality:

you should rename /home/david/Bin to /home/david/bin.
IF ~/bin is in your $PATH, then you could e.g. execute DVDShrink.sh without having to enter the full path.

so do this: rename the folder to bin, log out and back in, then post the output of this command:
Code:

echo $PATH
(and please copy-paste the actual text, and use code tags here on the forum. don't make a screenshot)

haertig 08-18-2016 12:06 PM

Thanks for the suggestion. I know about $PATH, and that Bin is non-standard as compared to bin. I'm pretty old school, and don't normally use capital letters or spaces in file/directory names, having come from a C systems programming background in Unix back in the System V days in the early 80's.

I am in the process of rearranging my home desktop so it's shared across an SSD (for OS/application) and a WD Black harddrive (for media and other stuff that does not need fast SSD access). Under my $HOME directory, I have taken up the convention - temporarily - that subdirectories that exist in their final location (SSD vs HDD) are named in the conventional manner (lower case first letter of directory name). And things that still need to be moved to their final destination are named with a capital first letter. BTW, since I mentioned my old Unix days above, you might recognize this naming as a variation of the /etc/rcX.d files for init - the case of the first letter of the name determined if it would be executed or not. I'm using that same concept of first letter case here - the case tells me if I still need to do something with that directory or not.

In the end, all my directories will be named normally, starting with lower case letters, but I'm not to that point in the transition yet.


All times are GMT -5. The time now is 07:45 PM.