**** BEGIN LOGGING AT Thu Apr 06 03:00:03 2017 Apr 06 03:07:45 As for "If you want a new kernel, I wonder why", afaik we're sort of forced to use really old software with our current kernel. Apr 06 03:08:27 Since recent versions of glibc don't support a kernel this old, and that's what distributors are targetting. Apr 06 05:25:05 maxd: for distro makers, maybe. for users there will always be an image with old, smelly kernel, see allwinner situation in case of unsupported socs Apr 06 05:34:25 KotCzarny: well, users use what distro makers distribute. Apr 06 06:12:44 and sometimes take what they distribute, add some changes and distribute own images Apr 06 06:26:27 Right, but you don't want to depend on that, since those are always outdated and usually only get more outdated. Apr 06 06:27:26 There are already people maintaining the up-to-date systems, which you should be using so you don't have to find some other system that someone has hacked together every few months/years. Apr 06 16:20:56 any idea how I can get XDG_..._DIR from c code without calling system("xdg-user-dir $DIR"); ? Apr 06 16:25:05 bencoh: KotCzarny: merlin1991: ^^^? Apr 06 16:42:04 fmg, is that env var? Apr 06 16:42:31 freemangordon: getenv? Apr 06 16:47:55 no, it is not env var Apr 06 16:48:07 what is it then? Apr 06 16:48:25 see $HOME/.config/user-dirs.dirs Apr 06 16:49:30 if it's custom defined by software and not env var, you would have to mimic the logic to generate them Apr 06 16:50:18 KotCzarny: there are tools to read and update those files, see xdg-user-dirs package Apr 06 16:50:21 maybe there is a dir? Apr 06 16:50:27 s/dir/lib/ Apr 06 16:50:42 but I can;t find a library to read them :) Apr 06 16:51:38 there is libxdg-basedir1, but it doesn;t seem to support custom dirs Apr 06 16:51:50 or I don;t understand how it works Apr 06 16:52:54 rip the source code out of it? Apr 06 16:53:32 this is hackish :( Apr 06 16:54:19 I thought the values in there had to evaluated on start, so they'd end up in the environment Apr 06 16:55:46 doesn't seem to work like that Apr 06 16:56:35 for example there is no XDG_DOWNLOAD_DIR in the env Apr 06 16:57:56 https://wiki.archlinux.org/index.php/XDG_user_directories Apr 06 16:58:04 seems you have few predefined dirs Apr 06 16:58:04 the same goes for music, videos etc dirs Apr 06 16:58:22 yes, you have, but how to get them by C code? Apr 06 16:58:25 parse the ~/.config/user-dirs.dirs ? Apr 06 16:58:29 hehe Apr 06 16:58:34 it should be easy enough Apr 06 16:58:49 and what if the format changes? Apr 06 16:59:04 I'd prefer to use a library if any Apr 06 17:00:17 the way I do it in my software: if it is not in the env, use the default value Apr 06 17:00:34 yeah, and if format changes, update Apr 06 17:00:46 That doesn't happen very often, though... Apr 06 17:01:52 you can also start your own lib too Apr 06 17:02:00 that's how they often are created ;) Apr 06 17:10:28 well, seems no other way but to call xdg-user-dir :( Apr 06 17:11:58 oh, and to make things even works, seems xdg-user-dir returns $HOME if there is no definition for what you look for, so you can;t distinguish between no definition for a directory and it is defined as $HOME Apr 06 17:12:03 WTF?!? Apr 06 17:25:12 freemangordon: I think there's something wrong with your setup if it doesn't end up in your environment Apr 06 17:25:46 The way I understood it, it was as simple as: Check if in env, if not in env, go for the specified default Apr 06 17:26:12 I don't have the file in my .config, so I cannot test it, but can't it simply be evaluated from the shell? Apr 06 17:26:31 It looks like this should be in /etc/profile or .profile Apr 06 17:27:06 $XDG_DATA_HOME defines the base directory relative to which user specific data files should be stored. If $XDG_DATA_HOME is either not set or empty, a default equal to $HOME/.local/share should be used. Apr 06 17:27:10 https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html Apr 06 17:27:39 Exactly Apr 06 17:27:46 it's for DATA, there is another for CONFIG too Apr 06 17:28:03 $XDG_CONFIG_HOME defines the base directory relative to which user specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used. Apr 06 17:28:41 so according to standard, you can just getenv() and if empty, use defaults Apr 06 17:38:22 Wizzup: my setup is what Canonical have set :) Apr 06 17:38:48 then they just want you to default to the env variables :p Apr 06 17:38:50 so they've used defaults ;) Apr 06 17:38:55 (and if they are not set, set to defaults) Apr 06 17:39:13 no, because this is what I have in the config fie Apr 06 17:39:40 https://pastebin.com/HpBL6FPX Apr 06 17:39:52 The freedesktop.org spec tells -developers- to use the env, and if it is not in the env, use the defaults. They don't tell you to read the config files Apr 06 17:40:09 XDG_NOKIA_CAMERA_DIR is set by me Apr 06 17:40:11 If the configuration does not end up in the enviroment, that's not -your- problem, but the distro issue Apr 06 17:40:15 the other are "stock" Apr 06 17:40:28 Is that specified by the XDG standard? Apr 06 17:40:33 Or is it what maemo uses? Apr 06 17:42:30 If you want the variables in the env and the distro does not set them, try some wrapper script like: #!/bin/sh source .config/xdg-thingie && exec my_program ? Apr 06 17:48:13 Wizzup: this is what Ubuntu uses Apr 06 17:48:34 What do you mean? I don't understand Apr 06 17:48:42 Do you mean the XDG_NOKIA_CAMERA_DIR? Apr 06 17:48:45 Wizzup: pastebin ^^^ is from my PC Apr 06 17:48:59 I realise; but I think we're not communicating well Apr 06 17:49:19 The *proper* (afaik) way to read any XDG setting from a program is to read the environment and fallback to hardcoded defaults Apr 06 17:49:21 that one I set manually by using xdg-user-dirs-update --set NOKIA_CAMERA Apr 06 17:49:35 If they don't end up in the environment, that's a bash profile issue, but an issue in the program Apr 06 17:49:48 e.g. the fix is not to call system() on the xdg-user-dir program, AFAIK Apr 06 17:50:02 But instead to have the environment variables be set before your program is started Apr 06 17:50:10 s/but an/but not an/ Apr 06 17:52:28 hmm, ok Apr 06 17:52:54 thanks, will see what can be done and why those vars are not there Apr 06 17:53:46 The other question is what ubuntu does with variables that start with XDG that are not defined by the XDG spec Apr 06 17:54:10 I don't know if XDG_NOKIA_CAMERA_DIR is defined in the xdg spec, and what the fd.o website says about vars that start with XDG but are not in the XDG spec Apr 06 17:54:15 Perhaps ubuntu somehow filters unknown ones Apr 06 18:04:05 Wizzup: nokia_camera is deffinitely out of specs Apr 06 18:07:36 nokia, the former leader of setting standards! Apr 06 18:11:39 it just follows alt-specs Apr 06 19:47:55 is XDG_NOKIA_CAMERA_DIR for storing camera pictures? Apr 06 19:53:23 yes Apr 06 20:26:32 SailfishOS uses $XDG_PICTURES_DIR/Camera **** ENDING LOGGING AT Fri Apr 07 03:00:00 2017