Announcement

Collapse
No announcement yet.

[Solved] TurnOff icon on desktop - bypass root password?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [Solved] TurnOff icon on desktop - bypass root password?

    How to create TurnOff icon on the desktop or in the quick launch ? - without sudo password needed?
    There is command: shudown -h -now. But it needed root password.
    how to bypass it? (Like in K-Menu)

    #2
    Re: TurnOff icon on desktop?

    shutdown/lock plasmoid is not what are you looking for?
    Kubuntu 16.04 on two computers and Kubuntu 17.04 on DELL Latitude 13

    Comment


      #3
      Re: TurnOff icon on desktop?

      Not exactly.
      It has Leave button - but I need my default action for leave = restart.
      I want one - click button for TurnOff, another for LogOff, and for restart I have already .

      Comment


        #4
        Re: TurnOff icon on desktop?

        You can create an icon this way, but still you are asked to set root password:
        - Bring to plasma the widget Desktop if you do not have it
        - Right click inside the window Desktop > Create New > Link to Application > Application > Command: shutdown .... > Advanced possibilities > Run as root
        Kubuntu 16.04 on two computers and Kubuntu 17.04 on DELL Latitude 13

        Comment


          #5
          Re: TurnOff icon on desktop?

          Yes, this works, but the root pasword.... >
          How they made it in kmenu?, there it dont want the pasw...

          Comment


            #6
            Re: TurnOff icon on desktop?

            So the title of the topic should be: How to bypass root password prompt?

            I don't know, but I googled a little and found that you are not alone, it looks like it is necessary to change /etc/sudoerrs file, for example here http://ubuntuforums.org/showthread.php?t=478936
            Kubuntu 16.04 on two computers and Kubuntu 17.04 on DELL Latitude 13

            Comment


              #7
              Re: TurnOff icon on desktop?

              When searching the Kubuntu Forums with the "shutdown command kde4". One of the hits is: http://kubuntuforums.net/forums/inde...opic=3103016.0. Maybe it will help ?

              Comment


                #8
                Re: TurnOff icon on desktop?

                Read here : http://ubuntuku.org/32/how-to-create...eboot-restart/
                ASROCK Z87 Pro4 - i5 4670K - R9 270x ☞ Triple Boot: KDE NEON ★ Windows 10 ★ Windows 7

                Comment


                  #9
                  Re: TurnOff icon on desktop?

                  Supr! This commands is what I need:

                  Shutdown:
                  Code:
                  qdbus --system org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
                  Restart:
                  Code:
                  qdbus --system org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart

                  Now I am lookig for similar command for LogOut, I guess it must be something like this, but it dont work:
                  Code:
                  qdbus --system org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Logout

                  Comment


                    #10
                    Re: TurnOff icon on desktop?

                    .... And found this:

                    LogOut:
                    Code:
                    qdbus org.kde.ksmserver /KSMServer logout 0 0 0

                    One problem resist: I use two panels - one at bottom of screen containing task manager and system tray, an second one at the top of screen containing quick launch widget, time, etc... But I am not able to add an icon from desktop to this top panel, I can only add icon to bottom panel using app-editor.
                    Is it possible to add icon to top panel?

                    Comment


                      #11
                      Re: TurnOff icon on desktop?

                      Finally! It want to reload desktop, now I have all needed icons where I want!

                      Thanks to all!!

                      Comment

                      Working...
                      X