Linux Oeck desktop shortcut for Linux

Messages
6
Upvote score
1
Question from a novice linux user. I'm trying to create a desktop launcher for linux mint 19 but not having much luck.
I use it for a HTPC and a launcher would be better than trying to teacher the wife to navigate to /opt/oeck/launcher.sh

I've tried tried the following in the make launcher command line box,
/opt/oeck/launcher.sh
sh /opt/oeck/launcher.sh
sudo /opt/oeck/launcher.sh
sudo sh /opt/oeck/launcher.sh

At a guess it's a permission issue?
Any help appreciated

James
 

Cameron

Staff member
Messages
52
Upvote score
6
Hi James,

Linux uses .desktop files to make shortcuts on the desktop.
To make a shortcut to run Oeck I just did this on my Ubuntu desktop:
1. Use your text editor to make a file in your home directory with the following in it:

[Desktop Entry]
Type=Application
Name=Oeck
Terminal=false
Path=/opt/oeck
Exec=/opt/oeck/launcher.sh

2. Save it as oeck.desktop
3. Make it executable by:
chmod +x ~/oeck.desktop

4. Using the file browser, copy the oeck.desktop file to your desktop.

That's it. The first time you run it, it will probably ask you to trust it. After that, you're good to go.

Cameron @ Oeck
 
Messages
10
Upvote score
8
And if you want a nice Oeck icon, put the attached 256x256 .png in /usr/share/icons/hicolor/256x256/apps/ (copying it there will require sudo)
and then run sudo update-icon-caches /usr/share/icons/*

Put Icon=oeck.png in the .desktop file.
 

Attachments

Messages
10
Upvote score
8
And if you want to add the .desktop file to the cinnamon menu in Mint, create oeck.desktop with these contents:

[Desktop Entry]
Type=Application
Name=Oeck
Path=/opt/oeck
Exec=/opt/oeck/launcher.sh
Comment=Oeck
Terminal=false
Icon=oeck.png
Categories=Network;Application;
Keywords=vpn;oeck;openvpn;security;network
chmod +x to make it executable


and put the file in /usr/share/applications, copying will require sudo.

It will be under 'Internet' in the menu.
 
Messages
6
Upvote score
1
Thanks Cameron & AtramentousFlux all done.

I'll will have to change the icon as Mint has a black background which I like. This renders the icon invisible on the desktop. No big deal, however it is still prompting me for the elevated password each time I run it. Another VPN that I've used overcame this by adding their launcher to the sudo group. Some people on their forum thought this was a security issue. What do you think?

Regards
James
 

Cameron

Staff member
Messages
52
Upvote score
6
Pretty sure you will have to live with the password.
The backend needs sudo to run, but the frontend needs regular user.

It's possible to set up sudo without password (google sudo without password), but for my 2c, I think it's a bad idea generally. Cant' say it will work either - I've never played around with it on my machine.


Just out of interest - why do you need to start and stop it? Why not just leave the VPN connected?

Cameron.
 
Messages
6
Upvote score
1
Cameron,
I can live with the password prompt just thought there might have been an easy work around. The PC is not left on, it usage is a bit random mainly for UK TV streaming when something interesting is on.

Regards,
James.