[SOLVED] changing starting or prefix path for Xfce
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Normally most desktop environments like KDE and Xfce reference various files in the "/usr/share" directory, such as the "applications" subdirectory. What I would like to do is divert Xfce completely to another directory, such as "${HOME}/share" (or whatever I choose), which will contain a replica (with modifications) of "/usr/share" with just what I need (to be determined). One big important point is for Xfce when run this way, it will not reference the original "/usr/share" directly at all. If any files being replicated make reference to "/usr/share" I can change those to reference the new path (sed is usually handy for that). Hopefully this would be as easy to do as invoking the Xfce system from .xinitrc with a particular environment variable set (what might that be ... "XFCE_PREFIX" or "XFCE_PATH" ?).
Part of the reason for doing this is to more extensively customize the setup, per user, without literally changing anything in "/usr" at all (users share it, users, can't change it, and it may be mounted read/only). And another part of the reason is because different desktop environments are mixing their menus together.
Laziest thing is to install in /opt, or maybe /usr/local. There is a root=/somewhere option in both installpkg (slackware) and rpm. Dunno about Debian systems. I would recompile xfce from source, personally. There are caveats.
From work on Kevux, it appears xfce writes/wrote to your homedir on startup.(~/.config/xfce4/ & ~/.config/xfce-session/)
It will definitely land 'jammy side down.' if you install a package. It will have to reference all the standard X directories, and some of slackware's are certainly in /usr/share. Window managers like to think they own all bits of the pc, and will get truculent if you try to box them into a corner.
If you have spare disk space, you may wish to pull the trick I use. I have an uncommitted 15G partition formatted ext3. As space is closing in on / a bit, occasionally I need more than is available. I just mount the spare partition on /tmp, delete anything over a gig in it, and do my job. If you had a gig spare, or a cdrw, you could mount it on /usr/share/xfce4 :-D.
I'm not sure if I understand what you are suggesting. Would this involve a separate install of Xfce, compiled from source, for each user that wants to re-arrange things differently?
Sure, if "/usr/share" is hardcoded into binaries, that can be a problem and probably need a recompile to adjust. But if the only choice is to substitute "/usr/share" with another hardcoded path, it would not work. Had it been pre-packaged to use another path like "/opt/desktop/share" or such, I'd have asked my original question in terms of changing that.
If it can pick up the prefix path from an environment variable, or a user settable config file, that's the solution. It needs to be that dynamic.
Otherwise, what I would probably end up having to do ... and would not until BTRFS gets stable enough to trust (maybe after the release of Fedora 16 shakes it out) ... is make separate CoW system root volumes for each user in BTRFS using the CoW volume cloning feature (something that looks quite promising for Linux Containers, too). Then figure out how to let each user tweak their own "system" (probably inside one of those Linux Containers set up per user).
I'm not sure if I understand what you are suggesting. Would this involve a separate install of Xfce, compiled from source, for each user that wants to re-arrange things differently?
yes, or one non standard version
Quote:
Originally Posted by Skaperen
Sure, if "/usr/share" is hardcoded into binaries, that can be a problem and probably need a recompile to adjust. But if the only choice is to substitute "/usr/share" with another hardcoded path, it would not work. Had it been pre-packaged to use another path like "/opt/desktop/share" or such, I'd have asked my original question in terms of changing that.
If it can pick up the prefix path from an environment variable, or a user settable config file, that's the solution. It needs to be that dynamic.
I don't know, and frankly I think xfce developers are about the only guys who would. Your choice may be to fork xfce or accept what's there.
Someone on IRC suggested the environment variable name to use is XDG_DATA_DIRS, and by default it will be "/usr/share", at least on the systems I've looked on (in terms of where I have found the files). I have yet to try this (because other testing has left the test machines in a non-pristine state for the test to be valid). But I will eventually. I've done a recursive grep for XDG_DATA_DIRS and found it to be in extenstive use, so it looks hopeful. And this seems to be defined by the FreeDesktop.Org project that some desktop environments like KDE and Xfce adhere to.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.