I was wondering if there’s a way, to find the root path of my EOS/cernbox synchronization on my machine from the SWAN notebooks. So I’m looking for the local folder (C:\…) of my cernbox from the SWAN notebooks.
Maybe anyone has an idea if there exists an environment variable or some other work-around?
The path that you use to synchronize CERNBox in your computer is configurable (you decide where to put it) and that information is not stored anywhere on our servers (it stays in your local configuration file). So there is no automatic way to know from SWAN where you decided to put this folder.
But why are you trying to do that? You can use relative paths from Python.
Thanks for your answer! I already thought that this might be more tricky.
I would like to write from my notebook automatically a path [in C:\ terms] into a configuration file, that is used by other software on my machine. So far I use relative paths to find the file in my CERNBox, but struggle with replacing my eos root-directory with the equivalent of my local machine. The issue is, that this should be done automatically for arbitrary users… and as you say, everyone has it stored somewhere else.
You mention there is a local configuration file. Where is this stored? Maybe I could maneuver to this, open it, extract the path and use it?
If your are using the CERNBox client, the configuration should live in:
System
Location
Linux
$HOME/.config/CERNBox/cernbox.cfg
Microsoft Windows
%APPDATA%\CERNBox\cernbox.cfg
macOS
$HOME/Library/Preferences/CERNBox/cernbox.cfg
But you don’t have access to these files from SWAN either. So you will always need to ask your users to run some script, which they can do from CERNBox, and at that point you can use relative paths.