Opened 10 years ago

Closed 10 years ago

#23 closed defect (fixed)

setup.py - create desktop icon fails when run via `su -c`

Reported by: flip Owned by: flip
Priority: major Milestone:
Component: install Version:
Keywords: Cc:

Description

Under the Linuxes I've tried (Ubuntu & Fedora), the directory where Python modules are installed (e.g. site-packages) requires privileged write access. As a result, when one installs Vespa on one of these systems, one must run python setup.py install as a privileged user.

Under Ubuntu, the idiom for running a command as root is to preface it with sudo.

Under Fedora, one typically uses su -c, such as:
su -c "python setup.py install"

Both get the job done as far as writing to site-packages. However the latter doesn't set the SUDO_USER environment variable. post_install.py relies on that environment variable to determine if it should create the desktop launcher somewhere other than $HOME/Desktop. When run under su -c, post_install.py attempts to create the launcher in /root/Desktop/ which doesn't exist, and the command fails.

Offhand, I can't think of a workaround for this other than to wrap the creation of the launcher in a try/except and put instructions on the Wiki for creating a Desktop launcher manually.

Change History (1)

comment:1 Changed 10 years ago by flip

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r1697.

Note: See TracTickets for help on using tickets.