FedeDP / ncursesFM

Ncurses File Manager for linux
GNU General Public License v3.0
85 stars 2 forks source link

Impossible to hide battery monitor #21

Closed JujuLand closed 6 years ago

JujuLand commented 7 years ago

Hi, I have modified syinfo_layout line (uncommented and remobe B => "CP", and the battery monitor is always displayed.

What do I made wrong ?

Another thing, I confirm that fr.mo works too ...

A+

FedeDP commented 7 years ago

I cannot reproduce it here: screenshot_20170919_230331

Can you share with me your conf file?

JujuLand commented 7 years ago

I suppose it works for you ;)


Fallback editor in case there's no xdg-open, or ncursesFM is executed from a tty. editor = "/usr/bin/nano";

show_hidden: 0 to hide hidden files. Anything else to show them. show_hidden = 0;

starting_directory: directory where the program will start by default. If blank or commented, program will start in the directory where it is launched. starting_directory = "/home/_YourUsername";

Not 0 to use starting_directory for second tab too. 0 to use current directory. use_default_starting_dir_second_tab = 0;

Not 0 to inhibits power management functions through sd-bus, only while a list of job is running. Defaults to 0. Only for systemd systems. inhibit = 0;

Not 0 to open a helper window explaining shortcuts after program started. starting_helper = 1;

Not 0 to enable external disk/usb sticks automount support. Requires libudev support and systemd(sd-bus) support. automount = 0;

0 to only log errors, 1 to log warnings too, 2 to log info messages too. 3 disables log. loglevel = 0;

Not 0 to have a persistent log across program restarts. persistent_log = 0;

Set low battery threshold. When battery reaches a level < threshold, battery level will be printed in red. bat_low_level = 15;

Set ui cursor chars cursor_chars = "->";

Sysinfo line layout use: C -> clock P -> process/ram monitor B -> battery monitor sysinfo_layout = "CP";

Safety level: 0 -> full unsafe (does not ask anything even for installing packages, removing files, print) 1 -> ask before removing / printing / installing packages 2 -> ask before doing everything (that needs user input) safe = 2;

silent: 0 -> to show libnotify notifications !0 -> to avoid showing libnotify notifications silent = 0;

Thanks A+

JujuLand commented 7 years ago

Hum, it's not cool to paste some text ...

FedeDP commented 7 years ago

Yes, please edit your comment and use dpaste.com :) Btw your config seems ok. I don't understand where is the bug... Can you try with "C P" (with space in the middle) ?

Edit: is this your user config or global config? May be this is global config and your user config is overwriting it?

FedeDP commented 7 years ago

Can you paste me your $HOME/.ncursesfm.log? Thanks!

JujuLand commented 7 years ago

Sysinfo line layout use: C -> clock P -> process/ram monitor B -> battery monitor sysinfo_layout = "CP";


annie@xubuntu-IMEDIA:~$ cat .ncursesfm.log 2017-9-20 14:54:59

NcursesFM v3.1 Commit: 04cd447f35cd9620b1089aaf6f760f3cfcc061b4 Build time: mardi 19 septembre 2017, 22:39:10 (UTC+0200)

Build options: CONFDIR: /etc/default BINDIR: /usr/bin LOCALEDIR: /usr/share/locale LIBX11_PRESENT: false LIBCUPS_PRESENT: false LIBCONFIG_PRESENT: false SYSTEMD_PRESENT:false

Starting options: Editor: Starting directory: Second tab starting dir: 0 Starting with helper window: 1 Log level: 0 Log persistency: 0 Low battery threshold: 15 Cursor chars: "->" Sysinfo layout: "CPB" Safe level: 2


I have uncommented 'Editor' too, and as you can see, Editor is empty log

Since I have replaced "CP" by "C P", and always now, even if I revert it or comment the line, Battery state is always displayed, but process/ram monitor is no more displayed.

It's very curious ... it seems that a few lines in conf file aren't read (but works for start folder).

A+

JujuLand commented 7 years ago

Well, I find that all the prerequites wheren't installed:

libcups-dev => seems not to exist for xubuntu libconfig-dev => added libx11-dev => already installed libsystemd-dev => added

Now there is some improvements, but some miss:


Build options: CONFDIR: /etc/default BINDIR: /usr/bin LOCALEDIR: /usr/share/locale LIBX11_PRESENT: false LIBCUPS_PRESENT: false LIBCONFIG_PRESENT: true SYSTEMD_PRESENT:true


I have uncommented all the param lines of .conf, and change the values to see what works and what not:


editor = "/usr/bin/nano"; show_hidden = 1; starting_directory = "/home/annie"; use_default_starting_dir_second_tab = 1; inhibit = 1; starting_helper = 0; automount = 1; loglevel = 2; persistent_log = 1; bat_low_level = 30; cursor_chars = "=>"; sysinfo_layout = "CP"; safe = 1; silent = 1;


Here is the log file:


Starting options: Editor:/usr/bin/nano see comment above show-hidden (not in log) ok Starting directory:/home/annie ok Second tab starting dir: 1 NO Inhibition: 1 ok Automount: 1 see comment above Starting with helper window: 0 ok Log level: 2 ok Log persistency: 1 ok Low battery threshold: 30 ?? Cursor chars: "=>" ok Sysinfo layout: "CP" see comment above Safe level: 1 not tested


It seems now I have installed libsystemd and/or libconfig-dev that it's better, but not all works correctly:

1- I seems definivelly have loose sysinfo P 2- If automount seems to be enabled, I have these messages in log, and I don't know how to find my USB stick


(W) thread: 15175, 18:27:31, no editor defined. Trying to get one from env. config.c:149 (config_checks) (W) thread: 15175, 18:27:31, no editor env var found. config.c:155 (config_checks) (W) thread: 15175, 18:27:31, Could not open bookmarks file. bookmarks.c:32 (get_bookmarks) (I) thread: 15175, 18:27:31, started time/battery monitor. sysinfo.c:29 (start_timer) (I) thread: 15175, 18:27:31, checking for udisks2 devices.c:359 (check_udisks) (I) thread: 15175, 18:27:31, found udisks2. devices.c:311 (init_mbus) (I) thread: 15175, 18:27:31, New device connected. devices.c:681 (add_device) (I) thread: 15175, 18:27:31, New device connected. devices.c:681 (add_device) (I) thread: 15175, 18:27:31, New device connected. devices.c:681 (add_device) (I) thread: 15175, 18:27:31, New device connected. devices.c:681 (add_device) (I) thread: 15175, 18:27:31, started device monitor. devices.c:286 (start_monitor) (I) thread: 15175, 18:29:37, freeing device monitor resources... devices.c:640 (free_device_monitor) (I) thread: 15175, 18:29:37, freed. devices.c:650 (free_device_monitor) (I) thread: 15175, 18:29:37, program exited without errors. quit.c:27 (program_quit)


It works better, but there are always some troubles ...

Thanks A+

JujuLand commented 7 years ago

1- I seems definivelly have loose sysinfo P

Ok after reboot !!!

A+

JujuLand commented 7 years ago

I tried on another computer under Xubuntu 16.04, and in the log, it gives: LIBCUPS_PRESENT: true

It seems there is no difference about installed cups packet.

The only difference is that the first computer where I made my tests was a clean Xubuntu 16.04 install, and the second is a Ubuntu 12.04 where I have installed xfce, and I upgrade form internet. I forgot to use deborphan, and I think there are perhaps some packets or config files which haven't have been cleaned, and which perhaps help ? I had another program (I don't remember which) working on the second computer but crashing on another Xubuntu 16.04 computer (clean install).

On the first computer inhibition must be set to hide battery state, on the second, removing B in sysinfo_layout is enough.

On the two computers, I can't access to usb stick

A+

JujuLand commented 7 years ago

ok, I find for devices, i didn't understand about 'Device mode'

On the second computer when quitting, I have a message: Config file /home/alain/.config/ncursesFM.conf not found.

I think I had a version 3.0 which had been installed before, but I'm not sure, and I don't know where it find the path

A+

FedeDP commented 7 years ago

Sorry i was away for a couple of days. Btw when you install a needed package, you should rebuild ncursesFM (not sure you did that). Please try to build ncursesFM with all of its dep installed, and let me know if evereything's fine. (install https://github.com/FedeDP/ncursesFM/wiki/Dependencies#build-requirements and https://github.com/FedeDP/ncursesFM/wiki/Dependencies#optional-compile-time-dependencies)

JujuLand commented 7 years ago

Obviously, I did it ...

A+

FedeDP commented 7 years ago

Have you got pkg-config installed?

EDIT: yes you should be forced to have that installed...

FedeDP commented 7 years ago

About "Config file /home/alain/.config/ncursesFM.conf not found.": it means you are using global config only (ie: you did not copy global config to your local user config folder). I cannot reproduce your behaviour about sysinfo_layout; with libconfig enabled, config file is parsed. Btw next ncursesFM version will have libconfig as a mandatory dependency.

JujuLand commented 7 years ago

On the fresh Xubuntu 16.04, and the upgraded Xubuntu 16.04, all the needed packets are installed, but I don't know what can be theses:

I resume what doesn't work:

1) On fresh Xu16.04: LIBCUPS_PRESENT: false When making: alain@aupeix-GX723:/opt/TuxPrograms/trunks/ncurseFM$ make libcups support enabled. libconfig support enabled. libsystemd support enabled. ` annie@xubuntu-IMEDIA:/opt/TuxPrograms/trunks/ncurseFM$ make libconfig support enabled. libsystemd support enabled.` Perhaps because I haven't installed any printer ?

2) On the two computers : LIBX11_PRESENT: false I don't know which troubles it can make

3) On the two computers, in log: Starting options: Editor: /usr/bin/nano ... (W) thread: 18590, 12:05:53, no editor defined. Trying to get one from env. config.c:149 (config_checks) (W) thread: 18590, 12:05:53, no editor env var found. config.c:155 (config_checks)

4) On upgraded Xu16.04, a warning message when quitting: Config file /home/alain/.config/ncursesFM.conf not found.

Just a little typo in fr.po: Aucun info sur l'alimentation disponible must be: Aucune info sur l'alimentation disponible

A+

FedeDP commented 7 years ago

1) Libcups_present gives false on xubuntu because it cannot find libcups-dev at compile time. Have you tried installing libcups2-dev and retrying to compile?

2) Not an issue since that line has no meaning since some versions (leftover line, libx11 is not needed anymore)

3) the only thing that can be happened here is that /usr/bin/nano does not exist or it is not executable (the check ncursesfm makes is: "if (!strlen(config.editor) || (access(config.editor, X_OK) == -1))" It seems that for you, config.editor is properly setted to /usr/bin/nano, but then it is not found executable (or not found at all)

4) fixed (on my local git repo); i am working on some huge rework of ncursesFM, it will take a while but it will help speed up further improvements (practically it is quite a rewrite)

JujuLand commented 7 years ago

1) ok 2) ok 3) alain@aupeix-GX723:~$ ls -ail /bin/nano 577367 -rwxr-xr-x 1 root root 208480 févr. 15 2017 /bin/nano When I use visudo, it's nano which is used, so I think it is set as config config editor. How can I control it ? 4) ok, I presume ;)

A+

FedeDP commented 7 years ago

But you setted /usr/bin/nano and not /bin/nano as editor, right?

JujuLand commented 7 years ago

Yes, I must forget my glasses :)

Thanks A+