This is a static archive of the old Zorin Forum.

The information below may be outdated. Visit the new Zorin Forum here ›

If you have registered on the old forum, you will need to create an account on the new forum.

Adding a Launcher to Plank - SOLVED

kay-dee

Wed Jul 03, 2019 6:05:48 pm

New to Zorin and to Gnome. Installed release “15” a week ago and have enjoyed my limited amount of time with it. Got it set up pretty much as I please and am using Plank (Dock), as my desktop interface. But I want to add a PowerOff Launcher. In other distros I would click on the System Logo in the Panel to configure the menu, add the PowerOff function and then add it to Plank.
Not so, it would seem, in Gnome.
In Software I see a package called Menu Editor. Maybe that’s what I need to configure the Menu.
Thank you to anyone who can shed some light on this topic for a dimwitted Linux user.
Best,
Katie

Swarfendor437

Wed Jul 03, 2019 10:09:59 pm

OK, This is frustrating ... as I have created one that works and can't remember how I came up with the 'hybrid' solution! Basically I used initial information from here:

https://community.linuxmint.com/tutorial/view/1113

and then from here:

https://linuxconfig.org/how-to-create-d ... aver-linux

and lastly here:

https://askubuntu.com/questions/86376/h ... ical-shutd

and here is the proof (but I can't upload a video!):

PowerButton.jpg

Swarfendor437

Wed Jul 03, 2019 10:41:50 pm

OK, opened the shortcut with 'other application' to get the script I used:

ScriptForPowerButton.jpg


:D :D :D

kay-dee

Fri Jul 05, 2019 7:00:13 pm

Thanks for this, Swarfendor. Sorry for the delay... 4th of July and, unbelievably, all the wifi bars were closed yesterday here in the DR.
What you provided is a little over my head. I have added a PowerOff Launcher to Plank many times but never in Gnome. Gnome seems to make it awkward. I have copied your links and will have to experiment a little. Hopefully I'll learn something in the process. Wish me luck.
Best,
Katie

Swarfendor437

Fri Jul 05, 2019 9:29:11 pm

Hi,

All you need to do is install gedit (suspect nano would have done the job) and type the exact same information I provided to you in that second image. This then creates an icon on the desktop that you have to give it 'trusted' status. I then changed the 'notepad' like icon for the power one and then simply dragged it to the plank - I left the original on the desktop.

You can now sing along to this:

http://www.popularyoutube.com/video/_BR ... The-power/ ;) :D

Here's that script 'how-to' in a more readable format:

Install 'gedit'
Code:
sudo apt install gedit


After installing gedit and whilst still in Terminal enter:

Code:
gedit ~/Desktop/shutdown.desktop


now copy and paste the code below by clicking on 'Select All' - this copies all of the code to your clipboard for pasting into the new gedit txt file:

Code:
#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=shutdown -Ph now
Name=Power
Comment=Power
Icon=/usr/share/icons/hicolor/scalable/actions/system-shutdown.svg


It will create a 'txt' icon on your desktop and when selecting it it asks if you want to trust it - of course you do!

Right-clicking the icon, select properties and choose the icon of your choice - forgotten where I got mine from and then I just dragged it to the plank. ;) :D

kay-dee

Sun Jul 07, 2019 6:29:48 pm

Thanks, let me work on that....
Best
Katie

kay-dee

Fri Jul 19, 2019 7:15:57 pm

Had to go out of town for a few days, Swarfendor, but didn't forget you.
Installed Uget, though I use Extreme Download Manager. I pasted your commands in the terminal and got the Shutdown File on the desktop. Now if I read your instructions correctly, I should be able to open it and, mark it as trusted and copy and past the commands you provided into it.
But I can't open it. Please see the attachment. I'm doing something wrong, something silly, I'm sure...
Any more suggestions appreciated.
Katie

Oops... attachment too large to post.

Aravisian

Sat Jul 20, 2019 1:43:19 am

kay-dee wrote:Had to go out of town for a few days, Swarfendor, but didn't forget you.
Installed Uget, though I use Extreme Download Manager. I pasted your commands in the terminal and got the Shutdown File on the desktop. Now if I read your instructions correctly, I should be able to open it and, mark it as trusted and copy and past the commands you provided into it.
But I can't open it. Please see the attachment. I'm doing something wrong, something silly, I'm sure...
Any more suggestions appreciated.
Katie

Oops... attachment too large to post.

You mention something about Uget Download manager,but I am not sure how that applies. Swarfendor had mentioned downloading and using Gedit. Maybe I am misunderstanding what has been said but could it be you were thinking Uget instead of Gedit?

Swarfendor437

Sat Jul 20, 2019 10:36:28 am

Aravisian wrote:
kay-dee wrote:Had to go out of town for a few days, Swarfendor, but didn't forget you.
Installed Uget, though I use Extreme Download Manager. I pasted your commands in the terminal and got the Shutdown File on the desktop. Now if I read your instructions correctly, I should be able to open it and, mark it as trusted and copy and past the commands you provided into it.
But I can't open it. Please see the attachment. I'm doing something wrong, something silly, I'm sure...
Any more suggestions appreciated.
Katie

Oops... attachment too large to post.

You mention something about Uget Download manager,but I am not sure how that applies. Swarfendor had mentioned downloading and using Gedit. Maybe I am misunderstanding what has been said but could it be you were thinking Uget instead of Gedit?


Aravision, uget is a download manager and is not required for this exercise. ;)

kay-dee

Sun Jul 21, 2019 6:23:33 pm

Uget ...Getit... Yeah. I got all that confused. And I was kinda wondering about how a video download manager entered into this exercise. But I wasn't about to question the Experts. That being said, let me uninstall Uget and install Getit. I assume it is in Software.
I did say I was a newbie, didn't I? :D
I am terribly busy right now with a writing project and a pending deadline so please forgive me if it takes a day or two to respond.
Thanks you guys, you're great...
Katie

Swarfendor437

Sun Jul 21, 2019 9:19:08 pm

Hi its 'gedit' = gnome text editor. ;) :D

Aravisian

Mon Jul 22, 2019 12:54:19 am

kay-dee wrote:Uget ...Getit... Yeah. I got all that confused. And I was kinda wondering about how a video download manager entered into this exercise. But I wasn't about to question the Experts. That being said, let me uninstall Uget and install Getit. I assume it is in Software.
I did say I was a newbie, didn't I? :D
I am terribly busy right now with a writing project and a pending deadline so please forgive me if it takes a day or two to respond.
Thanks you guys, you're great...
Katie

Yep, you can find Gedit in the Software Channel. Looking at mine, for some reason, "Gedit" was the forth option down listed on the search. I have no idea why it was not the first option on a search that specifically said "Gedit..."

kay-dee

Mon Jul 22, 2019 7:01:10 pm

Hi guys,
Spent some time on this and Uget and Getit aside, I managed an easy solution that seems to be working.

Click on the Zorin logo in the Task Bar. In the Search Bar type Menu. A traditional desktop menu opens and in the bar to the right you can Add New Item. In the Launcher window that opens, name it PowerOff. The command is PowerOff 60, (this gives you 60 seconds to add the PowerOff Launcher to Plank). In Comments: Shuts down computer, and check the Open In Terminal box. Close everything up.

Now when you open the usual Zorin Menu, you will have a PowerOff Icon. Click it and you will have 60 seconds to add the PowerOff function to Plank by right clicking and adding to the dock. Add Launcher to Plank. Re-open the Launcher from the menu, select PowerOff and hit Properties and remove the “60” from the command line. Reboot computer for changes to take place.

Change the PowerOff Icon: Download an icon from the internet and add to Pictures. Open the Menu again and select the PowerOff Launcher window you created, click on Properties to bring up the window and click on the icon to the left and open Pictures. You can install your new Icon from there.
Wow! That was a struggle but, like I said, it seems to be working.

Hope that is of interest and may help someone else.

This might work with Cairo Dock as well as Plank, but that’s for someone else to figure.
All best and much thanks,
Katie

Aravisian

Tue Jul 23, 2019 11:28:37 am

Kay-dee, that is a great walk-through.

Could you please hit EDIT on your first post and add "Solved" to the Title line to help others find your solution?
I do use Cairo-Dock and it's pretty easy on there. Right click, select CairoDock, Configure, Add-ons and the item is listed there, just check mark it.