edit "log off"/lock/"power off"

edit "log off"/lock/"power off"

Postby erikw » Tue Jan 07, 2020 12:43 am

Hi,
recently i changed my home (lenovo) laptop from W10 to zorinOS 15 core
linux on my desktop is just recently (after trying some other distros in VM for some time) so i'm kind of newbe with that
( my job is AIX/Unix sysadmin, so i'm not afraid of CLI :D ) but on the other hand, when not at work i want it simple and not too much troubles :p

I have been busy tweaking some styles and appearences
i've been searching a while now how i can edit the "log off"/lock/power off" (at the bottem right next to the search
but unfortunately haven't found how to do that savely
my goal: change lock funtion to suspend function

bc i dont want the laptop to suspend when closing lid of laptop i installed gnome tweak and disabled this option
i dont need the lock option, (i'm used to use super+l (made a shortcut for that under keyboard settings))
as workaround for suspend i also made shortcut (super+s) for suspend (with command systemctl suspend), but also want to be able to use the menu
the "power off" dialog doesn give suspend option neither
i found a file widget.js which seem to have that functionality
but before i break my system by editing it ;) i'd like to know how to edit those functions and replace lock by suspend in a safe way
(and if not possible easily, how to add it to the "Power Off" dialog (now only has cancel, restart and "power off")

thanks in advance
User avatar
erikw
 
Posts: 7
Joined: Thu Jan 02, 2020 8:16 pm

Re: edit "log off"/lock/"power off"

Postby Aravisian » Tue Jan 07, 2020 1:33 am

The Zorin Menu is the Arc menu modified with Graeme Gott and the Zorin Team. It's pretty tough to edit that lil sucker...
Arc menu operates off binary and Shared Object files.
Right off the bat, have you tried using the GUI Alacarte Menu Editor? I am not really sure if it CAN do what you want it to do in this instance. I avoid Gnome like it is plague (Because it IS Plague.) So I do not remember off the top of my head what all Alacarte allows you to do.
Code: Select all
sudo apt-get install alacarte
User avatar
Aravisian
 
Posts: 1786
Joined: Sun Dec 30, 2018 6:51 am

Re: edit "log off"/lock/"power off"

Postby Swarfendor437 » Tue Jan 07, 2020 1:59 am

Main Menu is what it appears as (alacarte).

MainMenu.jpg


Menu | System Tools | Main Menu ;) :D
https://vimeo.com/user15592214
https://www.deviantart.com/swarfendor437
https://trisquel.info/

Machine: ASUS X470-PRO, AMD Ryzen 7 1700X 8 Core, 16 Gb RAM, ZOTAC Geforce GT1030 (2 Gb)
User avatar
Swarfendor437
 
Posts: 11869
Joined: Wed Sep 18, 2013 5:51 pm

Re: edit "log off"/lock/"power off"

Postby Swarfendor437 » Tue Jan 07, 2020 2:01 am

Having looked closely at that, Main Menu just edits the Applications not the actual menu settings. There was a similar post and I found on askubuntu or similar that someone had written a script or edited some settings in one of the system sub-folders that controls this. ;) :D
https://vimeo.com/user15592214
https://www.deviantart.com/swarfendor437
https://trisquel.info/

Machine: ASUS X470-PRO, AMD Ryzen 7 1700X 8 Core, 16 Gb RAM, ZOTAC Geforce GT1030 (2 Gb)
User avatar
Swarfendor437
 
Posts: 11869
Joined: Wed Sep 18, 2013 5:51 pm

Re: edit "log off"/lock/"power off"

Postby erikw » Tue Jan 07, 2020 7:54 pm

Swarfendor437 wrote:Having looked closely at that, Main Menu just edits the Applications not the actual menu settings. There was a similar post and I found on askubuntu or similar that someone had written a script or edited some settings in one of the system sub-folders that controls this. ;) :D


thank you for your suggestion, i forgot to mention i already looked there too and unfortunately it wasn in the "Main Menu" as you discovered too :)

in /usr/share/gnome-shell/extensions/zorin ... orinos.com/ I found a widget.js script in which is seems the buttons are programmed
i will look on askubuntu too to find out if it was the same script
User avatar
erikw
 
Posts: 7
Joined: Thu Jan 02, 2020 8:16 pm

Re: edit "log off"/lock/"power off"

Postby erikw » Tue Jan 07, 2020 8:27 pm

Aravisian wrote:The Zorin Menu is the Arc menu modified with Graeme Gott and the Zorin Team. It's pretty tough to edit that lil sucker...
Arc menu operates off binary and Shared Object files.
Right off the bat, have you tried using the GUI Alacarte Menu Editor? I am not really sure if it CAN do what you want it to do in this instance. I avoid Gnome like it is plague (Because it IS Plague.) So I do not remember off the top of my head what all Alacarte allows you to do.
Code: Select all
sudo apt-get install alacarte


thanks for your suggestion!
it seemed i already had alacarte installed (as part of the distro)
and already had looked in "main menu" for this option.
(i.e when i start alacarte from CLI (as found with dpkg -L ) i get the "men menu" i already looked in )

in /usr/share/gnome-shell/extensions/zorin ... orinos.com/ i found a script widget.js in which is seems the buttons are programmed.
i'm afraid i have to edit that script ... or have to choose another distro, or forget my wish to have a suspend button :p
User avatar
erikw
 
Posts: 7
Joined: Thu Jan 02, 2020 8:16 pm

Re: edit "log off"/lock/"power off"

Postby Aravisian » Tue Jan 07, 2020 8:52 pm

erikw wrote:
Aravisian wrote:The Zorin Menu is the Arc menu modified with Graeme Gott and the Zorin Team. It's pretty tough to edit that lil sucker...
Arc menu operates off binary and Shared Object files.
Right off the bat, have you tried using the GUI Alacarte Menu Editor? I am not really sure if it CAN do what you want it to do in this instance. I avoid Gnome like it is plague (Because it IS Plague.) So I do not remember off the top of my head what all Alacarte allows you to do.
Code: Select all
sudo apt-get install alacarte


thanks for your suggestion!
it seemed i already had alacarte installed (as part of the distro)
and already had looked in "main menu" for this option.
(i.e when i start alacarte from CLI (as found with dpkg -L ) i get the "men menu" i already looked in )

in /usr/share/gnome-shell/extensions/zorin ... orinos.com/ i found a script widget.js in which is seems the buttons are programmed.
i'm afraid i have to edit that script ... or have to choose another distro, or forget my wish to have a suspend button :p

OR us e a different menu.
The Arc Menu is one of my favorites, too. But we all must admit, it is not very customizable.

In the meantime, we can look at that javascript file you found. let me jump on the test computer for that...be a few minutes...
User avatar
Aravisian
 
Posts: 1786
Joined: Sun Dec 30, 2018 6:51 am

Re: edit "log off"/lock/"power off"

Postby erikw » Tue Jan 07, 2020 9:46 pm

Aravisian wrote:
erikw wrote:
Aravisian wrote:The Zorin Menu is the Arc menu modified with Graeme Gott and the Zorin Team. It's pretty tough to edit that lil sucker...
Arc menu operates off binary and Shared Object files.
Right off the bat, have you tried using the GUI Alacarte Menu Editor? I am not really sure if it CAN do what you want it to do in this instance. I avoid Gnome like it is plague (Because it IS Plague.) So I do not remember off the top of my head what all Alacarte allows you to do.
Code: Select all
sudo apt-get install alacarte


thanks for your suggestion!
it seemed i already had alacarte installed (as part of the distro)
and already had looked in "main menu" for this option.
(i.e when i start alacarte from CLI (as found with dpkg -L ) i get the "men menu" i already looked in )

in /usr/share/gnome-shell/extensions/zorin ... orinos.com/ i found a script widget.js in which is seems the buttons are programmed.
i'm afraid i have to edit that script ... or have to choose another distro, or forget my wish to have a suspend button :p

OR us e a different menu.
The Arc Menu is one of my favorites, too. But we all must admit, it is not very customizable.

In the meantime, we can look at that javascript file you found. let me jump on the test computer for that...be a few minutes...



using a differentt menu seems also a good solution..(stil in the learning curve :p )
how can i switch to a diffferent menu?
User avatar
erikw
 
Posts: 7
Joined: Thu Jan 02, 2020 8:16 pm

Re: edit "log off"/lock/"power off"

Postby Swarfendor437 » Tue Jan 07, 2020 9:51 pm

I don't know if it will solve your issue but you can download Gno Menu in Gnome - Shell Extensions:

https://extensions.gnome.org/extension- ... 9rlEtg.png

Alternatives:

https://www.slant.co/options/1124/alter ... ternatives

Enlightenment has only ever been successfully deployed in E-live but I was concerned that auto-install uses Reiser FS written by a German Linux file system creator for SuSE Linux who murdered his wife, and on electronic documentation is a link to a dodgy site that reviews **** sites - eugh!
https://vimeo.com/user15592214
https://www.deviantart.com/swarfendor437
https://trisquel.info/

Machine: ASUS X470-PRO, AMD Ryzen 7 1700X 8 Core, 16 Gb RAM, ZOTAC Geforce GT1030 (2 Gb)
User avatar
Swarfendor437
 
Posts: 11869
Joined: Wed Sep 18, 2013 5:51 pm

Re: edit "log off"/lock/"power off"

Postby Aravisian » Tue Jan 07, 2020 10:04 pm

erikw wrote:i found a file widget.js which seem to have that functionality

You would need to import that at the top of the menu.js after confirming it is the function that you need.
Then write in it's use.
I took a look at the script and I don't think we would break the system trying to edit it. I think we both would need help to edit it Properly, however.
I could get it sorted out given a couple days. ( I will continue to look at this project anyway as it may help me to figure out an example to a problem that I created for Swarfendor:D)
Or...
erikw wrote:using a differentt menu seems also a good solution..(stil in the learning curve :p )
how can i switch to a diffferent menu?

Swarf gave some suggestions just above and if you do not like those, we can make others.
User avatar
Aravisian
 
Posts: 1786
Joined: Sun Dec 30, 2018 6:51 am
Next

Return to Help and Support

Who is online

Users browsing this forum: Google [Bot] and 16 guests