trinity-users@lists.pearsoncomputing.net

Message: previous - next
Month: May 2017

Re: [trinity-users] Setting up power-off icon

From: Lisi Reisz <lisi.reisz@...>
Date: Thu, 1 Jun 2017 00:39:01 +0100
On Thursday 01 June 2017 00:21:16 Slávek Banko wrote:
> On Thursday 01 of June 2017 00:56:18 Lisi Reisz wrote:
> > On Monday 29 May 2017 12:41:36 Dr. Nikolaus Klepp wrote:
> > > Hi Lisi!
> > >
> > > The easy way:
> > >
> > > Add this line to /etc/sudoers:
> > >
> > > %users ALL=(root) NOPASSWD: /sbin/poweroff
> > >
> > > You might want to change change "%users" to the name of the user.
> > > Otherwise anybody in the "users"-group is allowed to do power off.
> >
> > I'll worry about this later - I looked and everything seems to be
> > allowed, and I haven't yet got as far as being asked for a password!!
> >
> > > Now crate a Shortcut on the Desktop that executes "sudo
> > > /sbin/poweroff"
> >
> > I got this far (see below), but it isn't working for various different
> > reasons.  Corrections?  Anyone?
> >
> > I get an icon (the wrong one!) and the launcher opens up and asks for
> > an application or a URL.  (I started with Type=Command, and that was an
> > even deader loss.)
> >
> > I shall cross-post to the Debian list, because I am up against time,
> > but I promise to report solutions!  (If I am offered any!)
> >
> > [Desktop Entry]
> > Name=Shut_down
> > Comment=Log out and power off
> > Icon=/usr/share/pixmaps/power-button-off_318-42222.jpg
> > Exec=sudo /sbin/poweroff
> > Type=Application
> > Encoding=UTF-8
> > Terminal=false
> > Categories=No
> >
> > Thanks,
> > Lisi
> >
> > > Test ... but be aware, that the session is not saved!
> > >
> > > Nik
> > >
> > > Am Montag, 29. Mai 2017 schrieb Lisi Reisz:
> > > > I want to set up a large power-off button, with an icon, preferably
> > > > on the desktop but on the panel would do.  The ordinarily available
> > > > one will not do because this is for someone with very poor sight
> > > > and the ordinary power-off button is inextricably linked with lock
> > > > screen.  Well, I can't extricate it.
> > > >
> > > > I THINK I can manage the three other large icons that are needed on
> > > > the desktop, but this one has stymied me.
> > > >
> > > > I could rephrase the question: how do I produce an icon that, when
> > > > clicked, operates /sbin/poweroff.
> > > >
> > > > Jessie with TDE 14, installed from Slávek's repositories.
> > > >
> > > > Replacing a badly scammed Windows 7!
> > > >
> > > > Help!!
> > > >
> > > > Lisi
>
> I'm not sure if you've noted my link to using dcop:
>
>   dcop ksmserver ksmserver logout 0 2 2
>
> See
> https://andrejserafim.wordpress.com/2008/05/16/kde-shutdown-logout-restart/

Thanks, Slávek.  I noted it but didn't understand it. :-(  Sorry.  So I 
googled and got myself in a mess.

I have just been trying with the links offered on the desktop, which I 
understand a bit better now that I have been struggling with that script.

I'll definitely look at your suggestion now.  But as I am in fact almost there 
with the desktop link via the right-click on the desktop approach (I have 
just successfully shut it down by clicking on an icon!  Just the wrong icon.) 
I might try to finish that for now and look at this as well!  Especially now 
you have given me more information.

Thank you very much.
Lisi

I am just not icon-minded. And my scripting days seem to be behind me. :-(