LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 11-17-2010, 08:38 AM   #1
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Rep: Reputation: 60
$XDG_CACHE_HOME relocation of it to another directory


I am working on a project to where I need to relocate the standard cache directory locations within Xubuntu. I read this article and It doesn't seem work for me.

http://blog.electronsmith.com/?p=191

I add this entry to my /home/test/.pam_environment file without success.

PHP Code:
#!/bin/bash
$XDG_CACHE_HOME=/tmp/.cache 
and I have also added this to my /etc/environment file as well without success.

PHP Code:
$XDG_CACHE_HOME=/tmp/.cache 
and without quotes

PHP Code:
XDG_CACHE_HOME="/tmp/.cache" 
no success! help!
 
Old 11-17-2010, 09:58 AM   #2
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
I may be on to something:

http://linux.die.net/man/5/pam_env.conf
 
Old 11-17-2010, 10:58 AM   #3
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
after examining the printenv output I noticed that my variable had a '$' in from of it and nothing else did so I put 2+2 together and resolved the issue. I just took away the '$' and now my user environment display what I want:

PHP Code:
XDG_CACHE_HOME=/tmp/various/.cache 
now my default caching in now placed in the specified path. Now instead of adding options to certain executable such as chromium to redirect my cache I just modify the default caching location:

PHP Code:
Exec=/usr/bin/chromium-browser %--disk-cache-dir=/dev/shm/chromium --disk-cache-size=524288000 --media-cache-size=5244288000 

Last edited by metallica1973; 11-17-2010 at 12:31 PM.
 
Old 11-17-2010, 12:31 PM   #4
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
Oddly once I fireup Chromium it worked and stored it cache under

PHP Code:
/tmp/various/.cache 
but the minute I close it, it resorts back to the old directory.

PHP Code:
~/.cache/chromium 
?????????????

Last edited by metallica1973; 11-17-2010 at 12:42 PM.
 
Old 11-17-2010, 02:47 PM   #5
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
I also tried creating a ~/.xprofile and adding this to that and it didnt work so I dug a little further and think that I have found a solution to my answer. instead of change the entire path of $XDG_CACHE_HOME, I decided to resort back to figuring out how to redirect the cache output of chromium so here is what I did:

http://code.google.com/p/chromium/is...etail?id=31424

I add some flags to /etc/chromium-browser/default

PHP Code:
CHROMIUM_FLAGS="--disk-cache-dir=/dev/shm/chromium --disk-cache-size=52428800 --media-cache-size=524428800" 
that did the trick so far. I am still testing. Though it is working now it still creates a directory under ~/.cache/chromium but fortunately it doesn't copy anything there.

???? I guess this work for now

Last edited by metallica1973; 11-17-2010 at 02:48 PM.
 
  


Reply



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
MRTG Relocation 0.o Linux - Software 1 02-11-2008 06:09 PM
mkisofs and directory relocation garion Linux - Software 6 10-02-2006 05:54 AM
relocation error otchie1 Linux - Software 2 11-12-2004 08:18 PM
relocation error? CPUguy387 Linux - Networking 3 10-26-2003 02:28 PM
Relocation error? CPUguy387 Linux - Newbie 0 10-26-2003 06:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 01:10 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
Open Source Consulting | Domain Registration