LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices



Reply
 
Search this Thread
Old 08-18-2011, 12:07 PM   #1
Skaperen
Senior Member
 
Registered: May 2009
Location: WV, USA
Distribution: Slackware, CentOS, Ubuntu, Fedora, Timesys, Linux From Scratch
Posts: 1,777
Blog Entries: 20

Rep: Reputation: 116Reputation: 116
changing starting or prefix path for Xfce


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.
 
Old 08-19-2011, 05:22 AM   #2
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,615

Rep: Reputation: 584Reputation: 584Reputation: 584Reputation: 584Reputation: 584Reputation: 584
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.
 
Old 08-19-2011, 10:29 AM   #3
Skaperen
Senior Member
 
Registered: May 2009
Location: WV, USA
Distribution: Slackware, CentOS, Ubuntu, Fedora, Timesys, Linux From Scratch
Posts: 1,777
Blog Entries: 20

Original Poster
Rep: Reputation: 116Reputation: 116
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).
 
Old 08-20-2011, 05:40 AM   #4
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,615

Rep: Reputation: 584Reputation: 584Reputation: 584Reputation: 584Reputation: 584Reputation: 584
Quote:
Originally Posted by Skaperen View Post
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 View Post
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.
 
Old 08-23-2011, 12:31 PM   #5
Skaperen
Senior Member
 
Registered: May 2009
Location: WV, USA
Distribution: Slackware, CentOS, Ubuntu, Fedora, Timesys, Linux From Scratch
Posts: 1,777
Blog Entries: 20

Original Poster
Rep: Reputation: 116Reputation: 116
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
removing path prefix from filesnames AndrewJS Linux - General 7 06-10-2011 11:18 AM
Building .deb with customized prefix path SamTim74 Debian 0 01-22-2008 08:08 PM
./configure problems: changing prefix? huangyongqiang Linux - Newbie 5 10-05-2007 01:22 PM
xfce acting weird; starting w/out desktop background and icons,changing file managers sAbEr Ubuntu 11 04-18-2007 04:39 PM
Default prefix path when installing from source jrdioko Linux - Newbie 5 01-05-2006 10:40 PM


All times are GMT -5. The time now is 05:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration