$ cat install.sh --help

 4402  cat install.sh 

#!/bin/sh

cd "$(dirname "$(readlink -f "$0")")"

if [ "$(id -u)" != 0 ]; then
    echo "* Building without elevated privileges"
    python2 setup.py build

    echo "* Acquiring permissions to perform system-wide install"
    exec sudo "$0" "$@"
fi

echo "* Attempting to remove old QuickTile installs"
pip2 uninstall quicktile -y
rm -f /usr/local/bin/quicktile{,.py}

echo "* Running setup.py install"
python2 setup.py install

echo "* Copying quicktile.desktop to /etc/xdg/autostart/"
sudo cp quicktile.desktop /etc/xdg/autostart/


2018y12m03d-12h01m04s+0100Z rc=0 





$ python2 setup.py install

 4403  python2 setup.py install

running install
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 13] Permission non accordée: '/usr/local/lib/python2.7/dist-packages/test-easy-install-23890.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /usr/local/lib/python2.7/dist-packages/

Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

  https://setuptools.readthedocs.io/en/latest/easy_install.html

Please make the appropriate changes for your system and try again.



2018y12m03d-12h01m14s+0100Z rc=1 






 4404  sudo python2 setup.py uninstall

[sudo] Mot de passe de stephane : 
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: invalid command 'uninstall'


2018y12m03d-12h01m27s+0100Z rc=1 




 4405  sudo python2 setup.py --help

Common commands: (see '--help-commands' for more)

  setup.py build      will build the package underneath 'build/'
  setup.py install    will install the package

Global options:
  --verbose (-v)      run verbosely (default)
  --quiet (-q)        run quietly (turns verbosity off)
  --dry-run (-n)      don't actually do anything
  --help (-h)         show detailed help message
  --no-user-cfg       ignore pydistutils.cfg in your home directory
  --command-packages  list of packages that provide distutils commands

Information display options (just display information, ignore any commands)
  --help-commands     list all available commands
  --name              print package name
  --version (-V)      print package version
  --fullname          print <package name>-<version>
  --author            print the author's name
  --author-email      print the author's email address
  --maintainer        print the maintainer's name
  --maintainer-email  print the maintainer's email address
  --contact           print the maintainer's name if known, else the author's
  --contact-email     print the maintainer's email address if known, else the
                      author's
  --url               print the URL for this package
  --license           print the license of the package
  --licence           alias for --license
  --description       print the package description
  --long-description  print the long package description
  --platforms         print the list of platforms
  --classifiers       print the list of classifiers
  --keywords          print the list of keywords
  --provides          print the list of packages/modules provided
  --requires          print the list of packages/modules required
  --obsoletes         print the list of packages/modules made obsolete

usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help



2018y12m03d-12h01m36s+0100Z rc=0 



 4406  sudo pip2 uninstall quicktile

The directory '/home/stephane/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Uninstalling QuickTile-0.3:
  /usr/local/lib/python2.7/dist-packages/QuickTile-0.3-py2.7.egg
Proceed (y/n)? ^COperation cancelled by user


2018y12m03d-12h03m06s+0100Z rc=1 


 4407  pip2 uninstall quicktile

Uninstalling QuickTile-0.3:
  /usr/local/lib/python2.7/dist-packages/QuickTile-0.3-py2.7.egg
Proceed (y/n)? y
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/uninstall.py", line 76, in run
    requirement_set.uninstall(auto_confirm=options.yes)
  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 346, in uninstall
    req.uninstall(auto_confirm=auto_confirm)
  File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 754, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/usr/lib/python2.7/dist-packages/pip/req/req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "/usr/lib/python2.7/dist-packages/pip/utils/__init__.py", line 267, in renames
    shutil.move(old, new)
  File "/usr/lib/python2.7/shutil.py", line 314, in move
    rmtree(src)
  File "/usr/lib/python2.7/shutil.py", line 261, in rmtree
    rmtree(fullname, ignore_errors, onerror)
  File "/usr/lib/python2.7/shutil.py", line 266, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "/usr/lib/python2.7/shutil.py", line 264, in rmtree
    os.remove(fullname)
OSError: [Errno 13] Permission non accordée: '/usr/local/lib/python2.7/dist-packages/QuickTile-0.3-py2.7.egg/quicktile/wm.py'


2018y12m03d-12h03m11s+0100Z rc=2 


 4408  sudo pip2 uninstall quicktile

The directory '/home/stephane/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Uninstalling QuickTile-0.3:
  /usr/local/lib/python2.7/dist-packages/QuickTile-0.3-py2.7.egg
Proceed (y/n)? y
  Successfully uninstalled QuickTile-0.3


2018y12m03d-12h03m20s+0100Z rc=0 




$ sudo rm /usr/local/bin/quicktile

 4409  sudo rm /usr/local/bin/quicktile



2018y12m03d-12h03m26s+0100Z rc=0 





$ locate -i "*"/bin/quicktile"

 4410  locate -i "*/bin/quicktile"

/usr/local/bin/quicktile


2018y12m03d-12h03m36s+0100Z rc=0 



 4411  sudo rm /usr/local/bin/quicktile

rm: impossible de supprimer '/usr/local/bin/quicktile': Aucun fichier ou dossier de ce type


2018y12m03d-12h03m43s+0100Z rc=1 




$ sudo rm /etc/xdg/autostart/quicktile.desktop

 4415  sudo rm /etc/xdg/autostart/quicktile.desktop



2018y12m03d-12h03m55s+0100Z rc=0 





$ sudo rm /usr/local/share/applications/quicktile.desktop

 4417  sudo rm /usr/local/share/applications/quicktile.desktop

rm: impossible de supprimer '/usr/local/share/applications/quicktile.desktop': Aucun fichier ou dossier de ce type


2018y12m03d-12h03m56s+0100Z rc=1 





$ find /usr/local/lib/python2.7 -iname 'quicktile*'

 4418  find /usr/local/lib/python2.7 -iname 'quicktile*'



2018y12m03d-12h04m10s+0100Z rc=0 



 4422  cat install.sh 

#!/bin/sh

cd "$(dirname "$(readlink -f "$0")")"

if [ "$(id -u)" != 0 ]; then
    echo "* Building without elevated privileges"
    python2 setup.py build

    echo "* Acquiring permissions to perform system-wide install"
    exec sudo "$0" "$@"
fi

echo "* Attempting to remove old QuickTile installs"
pip2 uninstall quicktile -y
rm -f /usr/local/bin/quicktile{,.py}

echo "* Running setup.py install"
python2 setup.py install

echo "* Copying quicktile.desktop to /etc/xdg/autostart/"
sudo cp quicktile.desktop /etc/xdg/autostart/


2018y12m03d-12h04m46s+0100Z rc=0 





$ sudo pip2 uninstall quicktile

 4423  sudo pip2 uninstall quicktile

The directory '/home/stephane/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Cannot uninstall requirement quicktile, not installed


2018y12m03d-12h05m01s+0100Z rc=1 





$ sudo rm /usr/local/bin/quicktile /usr/local/bin/quicktile.py

 4424  sudo rm /usr/local/bin/quicktile /usr/local/bin/quicktile.py

rm: impossible de supprimer '/usr/local/bin/quicktile': Aucun fichier ou dossier de ce type
rm: impossible de supprimer '/usr/local/bin/quicktile.py': Aucun fichier ou dossier de ce type


2018y12m03d-12h05m03s+0100Z rc=1 



 4425  bash -xv install.sh 

#!/bin/sh

cd "$(dirname "$(readlink -f "$0")")"
+++ readlink -f install.sh
++ dirname /somepath/quicktile/install.sh
+ cd /somepath/quicktile

if [ "$(id -u)" != 0 ]; then
    echo "* Building without elevated privileges"
    python2 setup.py build

    echo "* Acquiring permissions to perform system-wide install"
    exec sudo "$0" "$@"
fi
++ id -u
+ '[' 1000 '!=' 0 ']'
+ echo '* Building without elevated privileges'
* Building without elevated privileges
+ python2 setup.py build
running build
running build_py
+ echo '* Acquiring permissions to perform system-wide install'
* Acquiring permissions to perform system-wide install
+ exec sudo install.sh
sudo: install.sh : commande introuvable


2018y12m03d-12h05m25s+0100Z rc=1 





$ bash -xv install.sh ash -xv ./install.sh 

#!/bin/sh

cd "$(dirname "$(readlink -f "$0")")"
+++ readlink -f ./install.sh
++ dirname /somepath/quicktile/install.sh
+ cd /somepath/quicktile

if [ "$(id -u)" != 0 ]; then
    echo "* Building without elevated privileges"
    python2 setup.py build

    echo "* Acquiring permissions to perform system-wide install"
    exec sudo "$0" "$@"
fi
++ id -u
+ '[' 1000 '!=' 0 ']'
+ echo '* Building without elevated privileges'
* Building without elevated privileges
+ python2 setup.py build
running build
running build_py
+ echo '* Acquiring permissions to perform system-wide install'
* Acquiring permissions to perform system-wide install
+ exec sudo ./install.sh
* Attempting to remove old QuickTile installs
The directory '/home/stephane/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Cannot uninstall requirement quicktile, not installed
* Running setup.py install
running install
running bdist_egg
running egg_info
deleting QuickTile.egg-info/requires.txt
writing QuickTile.egg-info/PKG-INFO
writing top-level names to QuickTile.egg-info/top_level.txt
writing dependency_links to QuickTile.egg-info/dependency_links.txt
writing entry points to QuickTile.egg-info/entry_points.txt
reading manifest file 'QuickTile.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'QuickTile.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/quicktile
copying build/lib.linux-x86_64-2.7/quicktile/util.py -> build/bdist.linux-x86_64/egg/quicktile
copying build/lib.linux-x86_64-2.7/quicktile/dbus_api.py -> build/bdist.linux-x86_64/egg/quicktile
copying build/lib.linux-x86_64-2.7/quicktile/keybinder.py -> build/bdist.linux-x86_64/egg/quicktile
copying build/lib.linux-x86_64-2.7/quicktile/__main__.py -> build/bdist.linux-x86_64/egg/quicktile
copying build/lib.linux-x86_64-2.7/quicktile/gtkexcepthook.py -> build/bdist.linux-x86_64/egg/quicktile
copying build/lib.linux-x86_64-2.7/quicktile/commands.py -> build/bdist.linux-x86_64/egg/quicktile
copying build/lib.linux-x86_64-2.7/quicktile/version.py -> build/bdist.linux-x86_64/egg/quicktile
copying build/lib.linux-x86_64-2.7/quicktile/__init__.py -> build/bdist.linux-x86_64/egg/quicktile
copying build/lib.linux-x86_64-2.7/quicktile/layout.py -> build/bdist.linux-x86_64/egg/quicktile
copying build/lib.linux-x86_64-2.7/quicktile/wm.py -> build/bdist.linux-x86_64/egg/quicktile
byte-compiling build/bdist.linux-x86_64/egg/quicktile/util.py to util.pyc
byte-compiling build/bdist.linux-x86_64/egg/quicktile/dbus_api.py to dbus_api.pyc
byte-compiling build/bdist.linux-x86_64/egg/quicktile/keybinder.py to keybinder.pyc
byte-compiling build/bdist.linux-x86_64/egg/quicktile/__main__.py to __main__.pyc
byte-compiling build/bdist.linux-x86_64/egg/quicktile/gtkexcepthook.py to gtkexcepthook.pyc
byte-compiling build/bdist.linux-x86_64/egg/quicktile/commands.py to commands.pyc
byte-compiling build/bdist.linux-x86_64/egg/quicktile/version.py to version.pyc
byte-compiling build/bdist.linux-x86_64/egg/quicktile/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/quicktile/layout.py to layout.pyc
byte-compiling build/bdist.linux-x86_64/egg/quicktile/wm.py to wm.pyc
installing package data to build/bdist.linux-x86_64/egg
running install_data
creating build/bdist.linux-x86_64/egg/share
creating build/bdist.linux-x86_64/egg/share/applications
copying quicktile.desktop -> build/bdist.linux-x86_64/egg/share/applications
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying QuickTile.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying QuickTile.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying QuickTile.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying QuickTile.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying QuickTile.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
quicktile.gtkexcepthook: module MAY be using inspect.getinnerframes
creating 'dist/QuickTile-0.3-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing QuickTile-0.3-py2.7.egg
creating /usr/local/lib/python2.7/dist-packages/QuickTile-0.3-py2.7.egg
Extracting QuickTile-0.3-py2.7.egg to /usr/local/lib/python2.7/dist-packages
Adding QuickTile 0.3 to easy-install.pth file
Installing quicktile script to /usr/local/bin

Installed /usr/local/lib/python2.7/dist-packages/QuickTile-0.3-py2.7.egg
Processing dependencies for QuickTile==0.3
Finished processing dependencies for QuickTile==0.3
* Copying quicktile.desktop to /etc/xdg/autostart/


2018y12m03d-12h05m34s+0100Z rc=0