[BRLTTY] Brltty and virtual environments.

Samuel Thibault samuel.thibault at ens-lyon.org
Sun May 5 17:15:36 EDT 2013


Hello,

Anders Holmberg, le Fri 19 Apr 2013 08:17:50 +0200, a écrit :
> I have vmware player installed on my vinux desktop here and want to use windows 7 sometimes and therefore need my display to work properly under windows.
> I know i can use the release command before starting windows but can this be done automatically via some script or something?

Here is such a script. You would run

brlrun vmware blabla

and the braille device would then kept released while vmware is running.
When vmware exits, the brltty braille driver is resumed.

Dave, I'd say this could be shipped along BRLTTY.  This version will only
build & work on unices, not on dos/windows.

Ideally vmware would rather implement a virtual braille device, as is
done in kvm, and render it via brlapi.  That way the switch back & forth
VT or X window would be automatic. I don't know how such feature could
be pushed to them.

Samuel
-------------- next part --------------
#include <stdlib.h>
#include <brlapi.h>
#include <unistd.h>
#include <sys/wait.h>

int main(int argc, char *argv[]) {
  char buffer[128];
  int res;
  pid_t pid;
  int status;

  brlapi_openConnection(NULL, NULL);
  res = brlapi_getDriverName(buffer, sizeof(buffer));
  if (res < 0) {
    brlapi_perror("getDriverName");
    exit(EXIT_FAILURE);
  }
  res = brlapi_suspendDriver(buffer);
  if (res != 0) {
    brlapi_perror("suspendDriver");
    exit(EXIT_FAILURE);
  }

  pid = fork();
  if (!pid) {
    execvp(argv[1], argv+1);
    perror("Could not execute program");
    exit(EXIT_FAILURE);
  }

  waitpid(pid, &status, 0);
  brlapi_resumeDriver();
  return WEXITSTATUS(status);
}


More information about the BRLTTY mailing list