Your message dated Fri, 30 Dec 2016 20:42:12 -0700
with message-id 
<CAJabFbj2XzV797_qsq6z8h2Mby1cEgHrBsAckZ+LXWvH=_d...@mail.gmail.com>
and subject line Re: fvwm: FvwmScript-Quit better should use "sudo" commands 
for shutdown and reboot
has caused the Debian Bug report #501845,
regarding fvwm: FvwmScript-Quit better should use "sudo" commands for shutdown 
and reboot
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
501845: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=501845
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: fvwm
Version: 1:2.5.26-1
Severity: normal
Tags: patch

The FvwmScript-Quit script contains the following lines to shutdown and reboot 
the computer as a (normal) user:

[...]
        Begin
          If $ToDo == Logout Then
            Do {Exec sync}
            Do {Exec /sbin/shutdown -r now}
            Quit
            End
          Else
            Begin
            Do {Exec sync}
            Do {Exec /sbin/shutdown -h now}
            Quit
            End
[...]


I don't know how the author thought it should be used by a user. In 
/usr/share/doc/fvwm/docs/FAQ.gz one can read:


"3.16  How do I set up an fvwm menu item that shuts down my Linux machine?

A:      Write a little shell script to run the shutdown command.

        Install sudo on your system [...]

        Set up the sudoers config file to allow you [...] to run that script 
with root permissions.

        Add a menu item to your fvwm root menu [...] that invokes 'sudo 
/my/script/name'."


I solved the problem for me by editing the sudoers file and the FvwmScript-Quit 
file.
I attached my version of FvwmScript-Quit to let you include it in future 
versions of fvwm, if you like.
In fact, I just put a "sudo" before every shutdown command. So, it was not that 
much work.
But it's my first patch for debian and I'm so proud... :)


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages fvwm depends on:
ii  libc6                  2.7-13            GNU C Library: Shared libraries
ii  libcairo2              1.6.4-6           The Cairo 2D vector graphics libra
ii  libfontconfig1         2.6.0-1           generic font configuration library
ii  libfreetype6           2.3.7-2           FreeType 2 font engine, shared lib
ii  libfribidi0            0.10.9-1          Free Implementation of the Unicode
ii  libglib1.2ldbl         1.2.10-19         The GLib library of C routines
ii  libglib2.0-0           2.16.5-1          The GLib library of C routines
ii  libgtk1.2              1.2.10-18.1       The GIMP Toolkit set of widgets fo
ii  libgtk2.0-0            2.12.11-3         The GTK+ graphical user interface 
ii  libice6                2:1.0.4-1         X11 Inter-Client Exchange library
ii  libncurses5            5.6+20080830-1    shared libraries for terminal hand
ii  libpng12-0             1.2.27-2          PNG library - runtime
ii  libreadline5           5.2-3             GNU readline and history libraries
ii  librplay3              3.3.2-11.1        Shared libraries for the rplay net
ii  librsvg2-2             2.22.2-2          SAX-based renderer library for SVG
ii  libsm6                 2:1.0.3-2         X11 Session Management library
ii  libstroke0             0.5.1-6           mouse strokes library -- runtime f
ii  libx11-6               2:1.1.5-2         X11 client-side library
ii  libxcursor1            1:1.1.9-1         X cursor management library
ii  libxext6               2:1.0.4-1         X11 miscellaneous extension librar
ii  libxft2                2.1.12-3          FreeType-based font drawing librar
ii  libxi6                 2:1.1.3-1         X11 Input extension library
ii  libxinerama1           2:1.0.3-2         X11 Xinerama extension library
ii  libxpm4                1:3.5.7-1         X11 pixmap library
ii  libxrender1            1:0.9.4-2         X Rendering Extension client libra
ii  zlib1g                 1:1.2.3.3.dfsg-12 compression library - runtime

Versions of packages fvwm recommends:
ii  fvwm-icons                  2001.08.13-6 XPMs icons from fvwm development s

Versions of packages fvwm suggests:
ii  cpp                           4:4.3.2-2  The GNU C preprocessor (cpp)
pn  fvwm-themes                   <none>     (no description available)
pn  libx11-protocol-perl          <none>     (no description available)
ii  m4                            1.4.11-1   a macro processing language
ii  menu                          2.1.40     generates programs menu for all me
pn  perl-tk                       <none>     (no description available)
pn  wm-icons                      <none>     (no description available)

-- no debconf information
WindowTitle {Quit}
WindowSize 400 265              # Taille
WindowPosition 191 143          # Position
#ForeColor      {black}
#BackColor      {grey85}
#ShadowColor    {grey55}
#HilightColor   {grey100}
#Font           -adobe-helvetica-bold-r-*-*-12-*

Init
 Begin
  WarpPointer 1
  Set $ToDo = Logout
  ChangeValue 6 1
  ChangeValue 7 0
  ChangeValue 8 0
  ChangeValue 9 0
  ChangeValue 10 0
 End

Widget 1
Property
 Position 40 40
 Flags NoReliefString NoFocus
 Type ItemDraw
 Icon shutdown.xpm
Main
 Case message of
  SingleClic :
  Begin
  End
End

Widget 2
Property
 Size 370 200
 Position 15 15
 Type Rectangle
Main
 Case message of
  SingleClic :
  Begin
  End
End

Widget 3
Property
 Title { What do you want to do? }
 Position 100  8
 Flags NoReliefString NoFocus
 Type ItemDraw
 Value 0
 Font -adobe-helvetica-bold-r-*-*-12-*
Main
 Case message of
  SingleClic :
  Begin
  End
End

Widget 4
Property
 Title {OK}
 Size 60 28
 Position 300 225
 Flags NoReliefString
 Type PushButton
 Value 1
Main
 Case message of
  SingleClic :
  Begin
   If $ToDo == Logout Then
    Do {Quit}
   Else
   Begin
    If $ToDo == Restart Then
     Do {Restart}
    Else
    Begin
     If $ToDo == RestartWith Then
      Do {Restart } (GetTitle 11)
     Else
     Begin
     If $ToDo == Reboot Then
      Begin
      Do {Exec sync}
      Do {Exec sudo /sbin/shutdown -r now}
      Quit
      End
     Else
      Begin
      Do {Exec sync}
      Do {Exec sudo /sbin/shutdown -h now}
      Quit
      End
     End
    End
   End
  End
End

Widget 5
Property
 Title {Cancel}
 Size 60 28
 Position 40 225
 Flags NoReliefString
 Type PushButton
 Value 1
Main
 Case message of
  SingleClic :
  Begin
   Quit
  End
End

Widget 6
Property
 Title {Logout}
 Position 90 45
 Flags NoReliefString
 Type RadioButton
 Value 0
Main
 Case message of
  SingleClic :
  Begin
   ChangeValue 7 0
   ChangeValue 8 0
   ChangeValue 9 0
   ChangeValue 10 0
   Set $ToDo = Logout
  End
End

Widget 7
Property
 Title {Restart fvwm}
 Position 90 75
 Flags NoReliefString
 Type RadioButton
 Value 0
Main
 Case message of
  SingleClic :
  Begin
   ChangeValue 6 0
   ChangeValue 8 0
   ChangeValue 9 0
   ChangeValue 10 0
   Set $ToDo = Restart
  End
End

Widget 8
Property
 Title {Restart with:}
 Position 90 105
 Flags NoReliefString
 Type RadioButton
 Value 0
Main
 Case message of
  SingleClic :
  Begin
   ChangeValue 6 0
   ChangeValue 7 0
   ChangeValue 9 0
   ChangeValue 10 0
   Set $Todo = RestartWith
  End
End

Widget 11
Property
 Position 215 100
 Size 120 15
 Type TextField
 Title {}
Main
 Case message of
  SingleClic :
  Begin
  End
End


Widget 9
Property
 Title {Shut down the computer}
 Position 90 135
 Flags NoReliefString
 Type RadioButton
 Value 0
Main
 Case message of
  SingleClic :
  Begin
   ChangeValue 6 0
   ChangeValue 7 0
   ChangeValue 8 0
   ChangeValue 10 0
   Set $ToDo = Halt
  End
End

Widget 10
Property
 Title {Restart the computer}
 Position 90 165
 Flags NoReliefString
 Type RadioButton
 Value 1
Main
 Case message of
  SingleClic :
  Begin
   ChangeValue 6 0
   ChangeValue 7 0
   ChangeValue 8 0
   ChangeValue 9 0
   Set $ToDo = Reboot
  End
End

--- End Message ---
--- Begin Message ---
Closing this feature request as it won't be added to fvwm for various reasons.

jaimos

--- End Message ---

Reply via email to