← Back to team overview

clicompanion-devs team mailing list archive

Re: OS-specific commands in the command library

 

On 11/17/2011 02:27 AM, bdfhjk wrote:

> I think that now user will simply use Ubuntu functions - most of
> they should work in Debian. If You know, that some command not work -
> please report it and then we think about disabling it.


Didn't you test each of the commands in a default-install on a  Debian
machine or VM, as part of working towards getting clicompanion into
Debian?  If not, I suggest your test process for the port is lacking.

I gave two kinds of example already, commands using sudo, and commands
using ufw :)

Unless the user installs the sudo package and configures themselves to
have full sudo rights, all commands in the .clicompanion file that use
sudo will fail in a default Debian installation.  That is 13 out of 48
commands in the current library, or more than 25% of the library.

Since clicompanion is intended for beginners, is it OK to "assume" that
such users will know how to install and configure sudo in Debian, and
will know that they need to do this to make use of those commands?  I
suspect not.

> In the future, we will add system detecting and commands, which not
> work, will not appear.


I'm not sure this is sufficient, or simple.

When exactly would you test for command presence?  What happens if I
install Debian, run clicompanion, and then look at this list (it should
have no sudo commands in it, by your reasoning).  Then, in clicompanion,
I do

  gksu apt-get install sudo
  gksu visudo # edit the file appropriately to add my user

Now, in the same instance of clicompanion, on the same OS, those
commands starting with sudo *should* appear!  But testing every command
for presence dynamically before/after every command could be a
significant performance drain, for little benefit to most users.

If you really want to baby your users, perhaps trying to use a command
starting with sudo on a Debian machine without sudo installed should pop
up a clicompanion dialog asking if you want to install sudo and add
yourself to the /etc/sudoers file, and if you click Yes, do it for you?
 Going further, perhaps trying to use a command starting with "sudo ufw"
should offer to install both sudo and ufw?

One easy improvement to think about: would it be worth considering
switching all these sudo commands to use gksu instead, which defaults to
running sudo underneath it in Ubuntu, but defaults to using su
underneath it in Debian (and which one it uses is configurable, using a
gconf key, if you want to change things around)...?

Of course, some minimalist installations of Debian may not install gksu,
either :)

There are many variations possible for dealing with this; saying "we
will add system detecting and commands, which not work, will not appear"
seems as though you have already decided exactly which approach
clicompanion will take... with no discussion with the rest of the team,
no public evaluation of the options, no attempt to reach consensus??

> Please report it as bug.


Well, it's not exactly a bug, if we expect clicompanion users to be
knowledgeable about the two different approaches of su and sudo, and how
to set up and use either one on their OS of choice.  It's more of an
enhancement request, isn't it?  Is it worth making an LP blueprint for?

Jonathan



Follow ups

References