chrys87 / fenrir

An TTY screenreader for Linux.
GNU Lesser General Public License v3.0
47 stars 13 forks source link

Log failed accesses to /dev/vcsa so they appear by default #48

Closed ndarilek closed 5 years ago

ndarilek commented 5 years ago

I attempted to launch Fenrir and it didn't work, nor did it output anything to the console. When I ran it with -dp to display debug logs, I saw a failed attempt to access /dev/vcsa6.

This is easy to resolve, but it seems like Fenrir should loudly log the failure rather than just not work. It may also make sense to just exit, since at that point it doesn't make sense to keep running.

Thanks a bunch.

chrys87 commented 5 years ago

not sure if i want to speak every error. i can add an -D (capital d) to let fenrir speak the error messages too. i would not exit because on many systems only VCSA1 - 6 exists (on 7 is typical X11). but if there is no X and you switch to TTY7 it will just error out and stop then. this is not wanted. i still want fenrir want to work if you switch to an other TTY (where the VCSA file exist for or you have read access).

chrys87 commented 5 years ago

currently fenrir needs for daemon mode on many systems root. i wanted to changes this in future.

ndarilek commented 5 years ago

To be clear, I don't mean speak the error, but print it to the screen.

I understand that in many cases these are the same. However, in this instance where Fenrir fails to open up /dev/vcsa6 because of a permissions error, I get absolutely nothing until I enable debug logging. In that instance, I think it makes sense to tell the user that the screen reader is in fact working fine, they just don't have the correct permissions set up.

Thanks.

chrys87 commented 5 years ago

Print them always on screen is an bad idea. since the errors can flood the screen with a lot of text (and events, what are fenrir ties to process), That flood can result in creating new debug messages what increases the number of events exponentially (what is a recursion to death ;) ). there is a -p flag to print issues on the screen. by default fenrir only logs to file to prevent from that recursion.