Diffstat (limited to 'noncore/settings/sshkeys/main.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/sshkeys/main.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/noncore/settings/sshkeys/main.cpp b/noncore/settings/sshkeys/main.cpp index 37be8bf..a7b1d56 100644 --- a/noncore/settings/sshkeys/main.cpp +++ b/noncore/settings/sshkeys/main.cpp @@ -1,14 +1,30 @@ #include <qpe/qpeapplication.h> #include "sshkeys.h" +#include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <sys/ioctl.h> +#include <unistd.h> + int main(int argc, char *argv[]) { QPEApplication a(argc, argv); SSHKeysApp app; + int fd; + + /* If we had a controlling TTY, detach from it. + This is to ensure the SSH uses ssh-askpass */ + fd = open("/dev/tty", O_RDONLY); + if (fd != -1) { + ioctl(fd, TIOCNOTTY, NULL); + close(fd); + } a.showMainWidget(&app); return a.exec(); } |