change program install directory

Contribute ideas for future releases.
Forum rules
No support questions here please.
Suggestion & new ideas for Cinnamon go on GitHub.

change program install directory

Postby ddavid123 on Fri Mar 18, 2011 2:00 am

I posted this on the community website, but I could not post the screenshots.

"Instead of installing user apps to the "/usr" directory, install them into "/home/user/Programs" and or "/home/Programs". When a user installs an app like say chromium, why should it be installed in "/usr". By installing it in the "/home/Programs" or "/home/user/Programs" directory, a user will have quicker access to their apps. Each program is contained within a directory with the same name as the app. It would be like "/home/user/Programs/chromium/" then for say Nexuiz it would be "/home/user/Programs/nexuiz/"

If the user wants to install for all users to run, then install it to "/home/Programs/nexuiz/" then when another user logs in a pop up will ask if they want the app listed in the menu, if not they will not see the entry in their menu. In this way, if a person has a separate "/home" partition, they keep their apps from being destroyed by a fresh install. Also the system can be configured to reduce the privilege of the apps to have read/write permissions within the install directory only! Also this will allow user to install software without requiring to enter the sudo password!"

Below are the screenshots

Image

Image
Image

Microsoft Windows, as easy to break as it's name suggests!

Linux, as cool as cool can get!
User avatar
ddavid123
Level 2
Level 2
 
Posts: 65
Joined: Mon Dec 03, 2007 4:26 pm
Location: Dawson Texas

Linux Mint is funded by ads and donations.
 

Re: change program install directory

Postby vincent on Fri Mar 18, 2011 5:23 am

First of all, this would violate Debian Policy; packages are NOT supposed to install any files to a user's home directory, and debhelper and associated tools for Debian packaging do not have the capability to do so while retaining such files in APT's control. Second of all, this would violate the Filesystem Hierarchy Standard (http://en.wikipedia.org/wiki/Filesystem ... _structure). In addition, package handling by APT is always done with root permissions, and as such, you would end up with root-owned files within an user-owned directory. This is not technically feasible, it is highly unlikely to ever be implemented, nor is it actually desirable at all.

Install packages with user privileges (as opposed to properly doing so with root privileges) is highly discouraged; it's possible, (see http://askubuntu.com/questions/339/how-can-i-install-a-package-without-root-access; read the first post carefully). Yes, you can run programs and executables from your Home directory (assuming your Home partition isn't marked as "noexec" in /etc/fstab), but do not expect APT to cooperate with you. As a side note, I remember that Fedora 12 initially let users install software without the need for root privileges; this provoked such an outcry that the decision was reversed (see https://bugzilla.redhat.com/show_bug.cgi?id=534047). I'll quote a H-Online article here...(http://www.h-online.com/open/news/item/ ... 63623.html)

The change has upset many who believe that this is opening up the system to a new range of possible attacks, from a denial of service by just installing as much software as possible to fill up the hard disk, to a privilege escalation exploit where an attacker could download a package from a repository which has a known vulnerability and then exploiting that vulnerability. Some Fedora developers say that these scenarios are mitigated by the fact that the user must be on the physical console of the system for the privilege to be automatically granted and that the change only affects the desktop versions of Fedora 12. Other developers have pointed out that this could still allow for an attack, for example, where the user's browser is compromised, allowing the attacker to then attempt to install a vulnerable package and use that to get administrator privileges.


I cannot stress how dangerous it would be to allow software to be installed within a package manager and integrated with the rest of the system, without requiring root privileges to do so.
Debian Testing x64/LM9 Main x64/Windows 7 x64 - LG R580 laptop w/ Intel Core 2 Duo T6500 2.1 GHz, 4 GB DDR2 RAM, Nvidia Geforce G 105M, Ralink rt2860 802.11n, 300 GB WD HD 5400 rpm
vincent
Level 8
Level 8
 
Posts: 2220
Joined: Tue Feb 09, 2010 4:10 am

Re: change program install directory

Postby ddavid123 on Fri Mar 18, 2011 2:46 pm

I do understand that is not the way Linux does things. All I am saying is that after 20+ years of the same directory structure, a little change would be beneficial. If it is not feasible to have separate install directory in the user's directory, then why not move the "/usr" directory to the "/home" directory and create a symbolic link to /. So when you want to load firefox, the /usr symlink will redirect to "/home/usr"

Just an idea. I am tired of having to reinstall all my apps from scratch every six months to a year. I know you can back up your .deb files, but after six months of use, there is so much .deb files in the apt cache directory, it is hard to select only the apps you want, without all the updates too! This is why I am so excited about LMDE!
Image

Microsoft Windows, as easy to break as it's name suggests!

Linux, as cool as cool can get!
User avatar
ddavid123
Level 2
Level 2
 
Posts: 65
Joined: Mon Dec 03, 2007 4:26 pm
Location: Dawson Texas

Re: change program install directory

Postby vincent on Fri Mar 18, 2011 8:12 pm

ddavid123 wrote:All I am saying is that after 20+ years of the same directory structure, a little change would be beneficial.


I'm sorry, but I'm highly against the idea of "change for the sake of change". The filesystem structure originating from UNIX has lasted through the trials of time, and there's no reason to change it now. Why needlessly derivate from the Linux Standards Base and POSIX-compliance (and the bunch of other less-known standards out there)? Why fix something that isn't broken? If you'd like to debate this on the premise that the current filesystem structure is fundamentally broken...well, it would be a debate between you vs. thousands of very knowledgable UNIX/Linux sysadmins.

If you insist, you can setup a different filesystem structure on your own computer, and experiment to see what works for you. However, Debian and Ubuntu are not going to completely revamp both APT and their filesystem structures, just to make it easier for a user to re-install his/her system. And on that note, APT was designed so that upgrading between distro releases works, and works well enough. In fact, Debian has very extensive documentation on how to upgrade between one stable release and the next, e.g. from Lenny to Squeeze. See http://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.en.html. You should not have to do a clean install every time a new release is made (yes, I know I'm countering Clem's advice here). It's just that many users use external repositories or PPAs that conflict with Debian/Ubuntu's repos, or other external factors out of the control of Debian/Ubuntu...
Debian Testing x64/LM9 Main x64/Windows 7 x64 - LG R580 laptop w/ Intel Core 2 Duo T6500 2.1 GHz, 4 GB DDR2 RAM, Nvidia Geforce G 105M, Ralink rt2860 802.11n, 300 GB WD HD 5400 rpm
vincent
Level 8
Level 8
 
Posts: 2220
Joined: Tue Feb 09, 2010 4:10 am

Re: change program install directory

Postby purgatoroid on Thu Jul 26, 2012 4:38 pm

I, for one, would love to see this change.

On a certain system, I am a user without su privilege. I would like to be able to install Google Desktop for Linux from the .deb file, but I can't because it wants to install to /opt. Why on earth would it need to do that? Why can't I just install it to my home directory?
purgatoroid
Level 1
Level 1
 
Posts: 8
Joined: Fri Feb 24, 2012 6:34 pm


Return to Suggestions & New Ideas

Who is online

Users browsing this forum: No registered users and 3 guests