shirleyian / pentoo

Automatically exported from code.google.com/p/pentoo
1 stars 1 forks source link

Improvement to genmenu.py #155

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
One of the annoyances of using the Pentoo desktop menu items is that after it 
runs -h, it drops you to a shell prompt (using either bash -l or sudo -s) with 
no ability to quickly replay the command that was launched from the menu.

This path adds a feature (currently for bash users only) that will inject the 
program command into the $HOME/.bash_history file before it runs command -h, 
and will allow the user to simply "up-arrow" in the terminal to recall the 
command that was invoked from the menu.

This makes life worth living again.

Original issue reported on code.google.com by i...@neopwn.com on 7 Jul 2013 at 2:26

Attachments:

GoogleCodeExporter commented 9 years ago
*stamp*  Approved.

Original comment by sidhayn on 7 Jul 2013 at 2:33

GoogleCodeExporter commented 9 years ago
I like your sarcasm ;-) I've submitted a patch which implements your idea.
However, it does not work with "sudo -s". Some more work need to be done to 
make it HUGE.

Original comment by blshkv on 9 Jul 2013 at 3:06

GoogleCodeExporter commented 9 years ago
I'm not entirely concerned with running as a user yet.  I don't know if we will 
be able to have that implemented in this release cycle.  If it works great, if 
not, it isn't a blocker for me.

swc|666, if you want to take a look at improving your patch to work with sudo 
that would be great, it shouldn't be terribly difficult but I need to focus on 
the blockers at this time so I won't be doing it.

Original comment by sidhayn on 9 Jul 2013 at 3:16

GoogleCodeExporter commented 9 years ago
My first thought would be to implement a shell wrapper script (invoked via sudo 
in Exec), and giving the command the NOPASSWD option in /etc/sudoers to some 
group that a regular Pentoo user would belong to. 

I'm not a huge fan of the idea. On my system, in my typical workflow - I launch 
a program with the menu as a regular user, then just up-arrow in the terminal 
and preface the command in my history with sudo. 

Keep in mind that not all of the commands even require sudo.

Thoughts?

Original comment by i...@neopwn.com on 9 Jul 2013 at 3:26

GoogleCodeExporter commented 9 years ago
I'm not entirely against that idea, but the question is would the average user 
have issues?  Sadly, the answer is almost certainly yes.  I think we need a way 
to inject into root's bash history.

Original comment by sidhayn on 9 Jul 2013 at 8:39

GoogleCodeExporter commented 9 years ago
it has been working with regular users for years. You need to be in the wheel 
group (by default), and our pentoo-installer adds it properly.

I've added 4 more lines for this HUGE improvements =)

Original comment by blshkv on 10 Jul 2013 at 12:53