Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 07-01-2010, 10:42 PM   #1
ryanlee
Junior Member
ryanlee began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jun 2010
Device: none
How Can I set CALIBRE_CONFIG_DIRECTORY ?

Hi all!

I'm using ubuntu 10.04

I'm having this problem when I using PHP shell_exec()

"OSError: [Errno 13] Permission denied: '/root/.config'"

so I could get answer like that "set enviornment CALIBRE_CONFIG_DIRECTORY"

But I don't know where can I set this enviornment well..

I've been googling since got above answer but I couldn't understand their cases b/c I'm a newbie about ubuntu..

Could you let me know how to resolve that problem for me?
ryanlee is offline   Reply With Quote
Old 07-01-2010, 11:37 PM   #2
ryanlee
Junior Member
ryanlee began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jun 2010
Device: none
echo $XDG_CONFIG_HOME
/root/.config

echo $CALIBRE_CONFIG_DIRECTORY
/home/myhome/.config/calibre


So I did

export XDG_CONFIG_HOME=/home/myhome/.config
export CALIBRE_CONFIG_DIRECTORY=/home/myhome/.config

Then still show me this error
OSError: [Errno 13] Permission denied: '/root/.config


what's wrong?

Last edited by ryanlee; 07-02-2010 at 12:17 AM.
ryanlee is offline   Reply With Quote
 
Enthusiast
Old 07-02-2010, 04:02 AM   #3
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 4,968
Karma: 802238
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by ryanlee View Post
echo $XDG_CONFIG_HOME
/root/.config

echo $CALIBRE_CONFIG_DIRECTORY
/home/myhome/.config/calibre


So I did

export XDG_CONFIG_HOME=/home/myhome/.config
export CALIBRE_CONFIG_DIRECTORY=/home/myhome/.config

Then still show me this error
OSError: [Errno 13] Permission denied: '/root/.config


what's wrong?
Are you starting calibre from the process where you did the export?

Export works only for the process doing the export and all sub-processes. If you are using the GUI to start calibre, you will need to set the variable and export it using the GUI environment tool.

However, as you are using PHP, I assume there is a web server involved somewhere. Assuming it is apache, you need to ensure that apache has the correct setting of the environment variable when it starts, so that PHP sees it, so that Calibre sees it. See http://httpd.apache.org/docs/1.3/env.html.

Alternatively, set the environment variable in your PHP script. See 'putenv' in the PHP manual.

Alternatively squared: instead of directly executing a calibre program, exec a shell that sets the environment appropriately, then execs the calibre program.
chaley is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRS set up help nunu2010 Sony Reader 4 12-27-2009 12:05 AM
Almost able to set up library, but .. AlexBell Kindle Formats 6 08-01-2008 05:56 PM
Is it possible to set margins? diabloNL Bookeen 9 12-20-2007 12:01 PM
Hello - Set to get a Reader (?) alreds Introduce Yourself 8 09-22-2007 08:31 AM
How to set margins? susall Sony Reader 6 11-23-2006 01:18 PM


All times are GMT -4. The time now is 01:29 AM.


MobileRead.com is a privately owned, operated and funded community.