Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 16 Dec 2017, 09:22
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Derivatives
Light-Debian-Core-Live-CD-Wheezy + Porteus-Wheezy
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 270 of 283 [4236 Posts]   Goto page: Previous 1, 2, 3, ..., 268, 269, 270, 271, 272, ..., 281, 282, 283 Next
Author Message
saintless


Joined: 11 Jun 2011
Posts: 3882
Location: Bulgaria

PostPosted: Tue 16 Dec 2014, 08:34    Post subject:  

Hi, Fred.
fredx181 wrote:
For openbox version adding this to ~/.config/openbox/rc.xml works for pressing power button:
Code:
    <keybind key="XF86PowerOff">
      <action name="Execute">
        <command>obshutdown</command>
      </action>
    </keybind>

I think I have it working as root for Jwm and iceWm. I will test it for puppy user later. It will be added in next version.
Maybe you will like also PrintScreen to start scrotdlg? I have this also working for Jwm and IceWM.
Code:
<Key key="Print">exec: scrotdlg</Key>

Code:
key "Print"       scrotdlg


Toni

_________________
Farewell, Nooby, you will be missed...
Back to top
View user's profile Send private message MSN Messenger 
saintless


Joined: 11 Jun 2011
Posts: 3882
Location: Bulgaria

PostPosted: Tue 16 Dec 2014, 11:57    Post subject:  

Hi, Fred.
fredx181 wrote:
I run DD always as root but if I would run it as normal use I would like to be able to shutdown without having to type password, so I am for for making that standard behaviour in DD.

I suggest a compromise if you agree.
We add group wheel in DebianDog next version:
Code:
sudo groupadd wheel

Then we add wheel line in sudoers:
Code:
sudo visudo

Code:
%wheel ALL= NOPASSWD: /sbin/shutdown, /sbin/reboot, /sbin/poweroff, /usr/bin/save2flash

And stop here.

Then all needed for user puppy (and any other user) to shutdown without password will be:
Code:
sudo adduser puppy wheel


Edit: Maybe we can make menu entry to activate/deactivate shutdown without password for the user.
Then the instruction post will be only for older DD versions.

Toni
Back to top
View user's profile Send private message MSN Messenger 
anikin

Joined: 10 May 2012
Posts: 968

PostPosted: Tue 16 Dec 2014, 14:27    Post subject:  

saintless wrote:
Remove puppy user account: ...
Thank you, Toni.
An excellent tutorial!
Would be nice to have in the howto section.
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 2641
Location: holland

PostPosted: Tue 16 Dec 2014, 14:41    Post subject:  

Hi Toni,
Quote:
I suggest a compromise if you agree.
We add group wheel in DebianDog next version:

Great, loving you even more now Toni Smile

Quote:
Edit: Maybe we can make menu entry to activate/deactivate shutdown without password for the user.

Yes, good idea.

Quote:
First test shows I'm wrong. Changes on exit works without removing the gsu line from save2flash. The first part of the instruction post (valid for live-boot Jwm version) needs only adding /usr/bin/save2flash in wheel line in sudoers.


Let me understand, Do you mean when shutting down as user and the gsu line is on top of save2flash the gsu prompt for password will appear?
If so then save2falsh is not needed on wheel line in sudoers, I think.
I'm working already on similar way of check-for-password-needed as in wmpoweroff or wmreboot for save2flash but I first need to understand why you think it's ok already like it is now.

Fred
Back to top
View user's profile Send private message 
saintless


Joined: 11 Jun 2011
Posts: 3882
Location: Bulgaria

PostPosted: Tue 16 Dec 2014, 15:19    Post subject:  

fredx181 wrote:
Quote:
First test shows I'm wrong. Changes on exit works without removing the gsu line from save2flash. The first part of the instruction post (valid for live-boot Jwm version) needs only adding /usr/bin/save2flash in wheel line in sudoers.


Let me understand, Do you mean when shutting down as user and the gsu line is on top of save2flash the gsu prompt for password will appear?
If so then save2falsh is not needed on wheel line in sudoers, I think.
I'm working already on similar way of check-for-password-needed as in wmpoweroff or wmreboot for save2flash but I first need to understand why you think it's ok already like it is now.

Hi, Fred.
Tested only in Jwm version yet but just checked again now to be sure. Here is what I do:
Login as puppy user and changes=EXIT:/live/.
Copy/paste your new wmreboot and wmpoweroff in /usr/bin.
Code:
sudo groupadd wheel

Code:
sudo visudo

Adding this line:
Code:
%wheel ALL= NOPASSWD: /sbin/shutdown, /sbin/reboot, /sbin/poweroff, /usr/bin/save2flash

Code:
sudo adduser puppy wheel

The changes are not active before logout and login again.
Now before I do anything else I check reboot and shutdown from menu and typing in terminal save2flash. I get sudo password prompt for all.
Then logout and login and typing again in terminal save2flash does not ask for password and saves changes. See the picture:



I think this is what we need. But much more testing we have to do.

Edit: Tested also with xdm activated and seems to work with changes=EXIT:
I remember you wrote xdm creates some problems before but I don't see problem yet. I will test more with active xdm.

Toni

_________________
Farewell, Nooby, you will be missed...
Back to top
View user's profile Send private message MSN Messenger 
fredx181


Joined: 11 Dec 2013
Posts: 2641
Location: holland

PostPosted: Tue 16 Dec 2014, 16:49    Post subject:  

Hi Toni,

Quote:
Then logout and login and typing again in terminal save2flash does not ask for password and saves changes. See the picture

Can you explain that? It's really strange, at least "sudo save2flash" should be run (adding /usr/bin/save2flash to 'wheel' line causes only that you don't need to type password, still need to use sudo, right?)
I cannot reproduce what you got, btw, with wheel line in sudoers including save2flash, puppy added to group wheel and gsu line on top of save2flash I got this (see pictures):
Which is the behaviour I expect.

Fred
2014-12-16-213236_828x392_scrot.png
Description 
png

 Download 
Filename  2014-12-16-213236_828x392_scrot.png 
Filesize  27.76 KB 
Downloaded  134 Time(s) 
2014-12-16-211527_824x394_scrot.png
Description 
png

 Download 
Filename  2014-12-16-211527_824x394_scrot.png 
Filesize  31.53 KB 
Downloaded  108 Time(s) 
Back to top
View user's profile Send private message 
saintless


Joined: 11 Jun 2011
Posts: 3882
Location: Bulgaria

PostPosted: Wed 17 Dec 2014, 02:03    Post subject:  

Hi, Fred.

This is what happens when you keep using yad for everything and you don't like my simple xterm solution Smile If I use your gsu with yad I get the same result as you.
Try with /opt/bin/gsu insluded in Jwm version. Works for save2flash without sudo for me:
Code:
#!/bin/sh

if [ "`whoami`" != "root" ]; then
xterm -T "gsu" -si -sb -fg white -bg SkyBlue4 -geometry 65x14 -e sudo "$@"
else
"$@"
fi

I leave you to decide what is better. Changing gsu to xterm solution in both versions or using yad gsu for both and you have more work with save2flash.

Edit: Attached archive with example scripts to activate/deactivate password on shutdown by removing/adding user to group wheel. I'm sure you can make them better if you prefer something different, Fred. We need to choose the same name and same menu entries for activating/deactivating password prompt in both DD versions.

Toni
activate-deactivate-shutdown-password.zip
Description 
zip

 Download 
Filename  activate-deactivate-shutdown-password.zip 
Filesize  610 Bytes 
Downloaded  110 Time(s) 
Back to top
View user's profile Send private message MSN Messenger 
saintless


Joined: 11 Jun 2011
Posts: 3882
Location: Bulgaria

PostPosted: Wed 17 Dec 2014, 05:28    Post subject:  

anikin wrote:
Would be nice to have in the howto section.

Hi, Anikin.
I don't like the idea removing multiuser function but even if I do - It will not work anyway adding the information in howto thread.
We keep adding more and more user account extras in DebianDog like deactivating the password prompt on shutdown we discuss now with Fred.
We also modding the included packages preventing conflicts with official Debian packages and adding dependencies like sudo, gsu, gksu needed for user account. This will make them work not only in DD but in most Debian based systems using apt-get or synaptic.
This means after next DD update removing sudo or gsu will remove much more packages (like mount-wizard for example) just because sudo or gsu is added as dependency.
I'm afraid after removing sudo you will have to mod DebianDog packages in the future if you want to skip installing again sudo (or to skip installing dependencies like gsu, gksu, ktsuss).
With sure many official Debian and Ubuntu packages also have sudo as dependency and installing some of them with apt-get will install sudo anyway.

Toni

_________________
Farewell, Nooby, you will be missed...
Back to top
View user's profile Send private message MSN Messenger 
anikin

Joined: 10 May 2012
Posts: 968

PostPosted: Wed 17 Dec 2014, 08:47    Post subject:  

Hi Toni,

I don't disagree with you, my only concern is that a valuable piece of information will be lost in this huge thread. Something that even Google doesn't have easily available. Do a search and you'll get fragments at best. Maybe, adding a couple lines, like "do it at your own risk" plus your recommendations would be a better decision? Personally, I'm OK, I got what I wanted from you.
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 2641
Location: holland

PostPosted: Wed 17 Dec 2014, 15:17    Post subject:  

Hi Toni,

Quote:
This is what happens when you keep using yad for everything and you don't like my simple xterm solution Smile If I use your gsu with yad I get the same result as you.
.....


Smile Ah, That explains it, I thought you had new gsu installed.

I thought that the best thing to do is changing gsu to make it behave exactly like sudo (checking if password is needed or not) which is a good thing anyway, I think.
So this way there's no need to change save2flash and gsu works with any command added to wheel line.
Also made some other useful changes IMO:
- shows message when password is empty (not only when wrong)
- improved "command not found" check.
Attached new gsu.tar.gz
Btw, the reason for the most that I don't like the "xterm gsu" is because the xterm window doesn't disappear after entering password, I've tried to accomplish that in the past, but with no success.

Quote:
Edit: Attached archive with example scripts to activate/deactivate password on shutdown by removing/adding user to group wheel. I'm sure you can make them better if you prefer something different, Fred.


Thanks, Toni! I will look at it, maybe add some YAD dialogs Smile

Fred
gsu.tar.gz
Description  New gsu script
gz

 Download 
Filename  gsu.tar.gz 
Filesize  642 Bytes 
Downloaded  93 Time(s) 
Back to top
View user's profile Send private message 
saintless


Joined: 11 Jun 2011
Posts: 3882
Location: Bulgaria

PostPosted: Wed 17 Dec 2014, 16:20    Post subject:  

fredx181 wrote:
I thought that the best thing to do is changing gsu to make it behave exactly like sudo (checking if password is needed or not) which is a good thing anyway, I think.

Hi, Fred.
Quick test shows new gsu works the same way as xterm version. The deb in testing repository replaced with this new gsu.

Toni

_________________
Farewell, Nooby, you will be missed...
Back to top
View user's profile Send private message MSN Messenger 
fredx181


Joined: 11 Dec 2013
Posts: 2641
Location: holland

PostPosted: Wed 17 Dec 2014, 17:04    Post subject:  

Edit; Post deleted, not important.

Fred
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 2641
Location: holland

PostPosted: Wed 17 Dec 2014, 17:45    Post subject:  

Hi Toni,

Quote:
Quick test shows new gsu works the same way as xterm version. The deb in testing repository replaced with this new gsu.

Just an idea:
This gives another, perhaps more simple and compatible option (for older DD versions also):
To make wheel line in /etc/sudoers like this:

Code:
%wheel ALL= NOPASSWD: /sbin/shutdown, /sbin/reboot, /sbin/poweroff, /usr/bin/wmpoweroff, /usr/bin/wmreboot

Or maybe just:
Code:
%wheel ALL= NOPASSWD: /sbin/shutdown, /sbin/halt, /usr/bin/wmpoweroff, /usr/bin/wmreboot


This way only gsu script and /etc/sudoers needs to be changed in new release (and adding wheel group), nothing else (not sure, it's late, need sleep now Smile ).

Fred
Back to top
View user's profile Send private message 
saintless


Joined: 11 Jun 2011
Posts: 3882
Location: Bulgaria

PostPosted: Thu 18 Dec 2014, 02:59    Post subject:  

Hi, Fred.

Yes, we can try to make poweroff without password simple as possible. I will test your suggestion later but I think /usr/bin/save2flash shoud be added also in sudoers. It will be good if we can skip editing wmpoweroff and wmreboot.

Edit: Yes, Fred. Seems to work well.
Fresh Jwm version, porteus-boot, changes on exit in save flolder /live/changes, xdm is active. Login as user puppy and install latest gsu deb package. Then:
Code:
sudo groupadd wheel

Code:
sudo visudo

Code:
%wheel ALL= NOPASSWD: /sbin/shutdown, /sbin/reboot, /sbin/poweroff, /usr/bin/wmpoweroff, /usr/bin/wmreboot, /usr/bin/save2flash

Code:
sudo adduser puppy wheel

Logout and login and I can shutdown, reboot, save2flash without password prompt.
It will work also for any older DD version. Nice Smile

Toni

_________________
Farewell, Nooby, you will be missed...
Back to top
View user's profile Send private message MSN Messenger 
saintless


Joined: 11 Jun 2011
Posts: 3882
Location: Bulgaria

PostPosted: Thu 18 Dec 2014, 15:33    Post subject:  

Hi, Fred.

fredx181 wrote:
I've tried menumaker and ffconvert on my full install and no problems.
Only for menumaker a warning that defaultbrowser is not found.

Although I couldn't reproduce the menumaker error you had I've removed a section (mostly about default-browser)
So it's just a guess but maybe it helps.
Attached menumaker.tar.gz

Solved at Last Smile
Nothing to do with defaultbrowser line but this is the real problem in menumaker:
Code:
#define gtkdialog
if [ "`which gtkdialog4`" ]; then
   GTKDIALOG=gtkdialog4
elif [ "`which gtkdialog3`" ]; then
   GTKDIALOG=gtkdialog3
else
   GTKDIALOG=gtkdialog
fi

I'm sure you do not have problem because pburn is also installed in your official Debian Wheezy.
Pburn has included link /usr/bin/gtkdialog4
Menumaker searches for gtkdialog4 (which after installing pburn is link to /usr/bin/gtkdialog). gtkdialog4 is missing when pburn is not installed and menumaker searches for gtkdialog3 (but /usr/bin/gtkdialog3 is different version from /usr/bin/gtkdialog instead link to gtkdialog) and does not start.

Solved by:
Removing /usr/bin/gtkdialog4 from pburn package.
Adding /usr/bin/gtkdialog4 to gtkdialog package.
Both uploaded in testing repository.

I'm not sure this is the best way to fix it. Maybe we need to separate gtkdialog versions /usr/bin/gtkdialog and /usr/bin/gtkdialog3 in different packages depending what version is gtkdialog. And then adding the correct gtkdialog version as dependency.
Or easier fix will be just to edit menumaker to use /usr/bin/gtkdialog and keep in mind checking for the same problem in other scripts.

FFconvert works with fresh installed standard Debian. The problem was something I did while testing I guess.

Toni

_________________
Farewell, Nooby, you will be missed...
Back to top
View user's profile Send private message MSN Messenger 
Display posts from previous:   Sort by:   
Page 270 of 283 [4236 Posts]   Goto page: Previous 1, 2, 3, ..., 268, 269, 270, 271, 272, ..., 281, 282, 283 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Derivatives
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1278s ][ Queries: 13 (0.0594s) ][ GZIP on ]