jschlatow / taskopen

Tool for taking notes and open urls with taskwarrior
GNU General Public License v2.0
363 stars 31 forks source link

Couldn't get a file descriptor referring to the console #156

Open bdbcohen opened 1 year ago

bdbcohen commented 1 year ago

Getting the following error when using taskopen. My system:

Description:    Ubuntu 18.04.6 2021.12.03 LTS (Cubic 2021-12-03 11:43)
Release:    18.04

Error:

Couldn't get a file descriptor referring to the console
Command "(cmd: "open $LAST_MATCH", env: {GJS_DEBUG_TOPICS: JS ERROR;JS LOG, XMODIFIERS: @im=ibus, _: /usr/bin/taskopen, TERM: xterm-256color, QT_ACCESSIBILITY: 1, XDG_DATA_DIRS: /usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop, ARGS: , TEXTDOMAIN: im-config, IM_CONFIG_PHASE: 2, TASK_TAGS: , PWD: /home/BOSDYN/bcohen/taskopen, TEXTDOMAINDIR: /usr/share/locale/, XDG_SESSION_ID: 4, SSH_AGENT_PID: 3724, WINDOWPATH: 2, PYTHONPATH: /home/BOSDYN/bcohen/bdi/rt/python, MANPATH: :/opt/puppetlabs/puppet/share/man, LOGNAME: bcohen, DBUS_SESSION_BUS_ADDRESS: unix:path=/run/user/1236805077/bus, XDG_CONFIG_DIRS: /etc/xdg/xdg-ubuntu:/etc/xdg, TASK_DESCRIPTION: do -- ACTION - IT Security Training!, ANNOTATION: https://mail.google.com/mail/u/0/?ogbl&zx=uqpoeba3vh2#all/FMfcgzGqQmVXVtZPCqNKrrZrgQBmhzTg, DESKTOP_SESSION: ubuntu, GDMSESSION: ubuntu, LANG: en_US.UTF-8, TASK_PROJECT: Misc, UUID: e38551b6-f727-41db-a6cc-d7ac700a4621, LS_COLORS: rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:, QT4_IM_MODULE: xim, LESSCLOSE: /usr/bin/lesspipe %s %s, TERMINATOR_DBUS_PATH: /net/tenshu/Terminator2, LAST_MATCH: https://mail.google.com/mail/u/0/?ogbl&zx=uqpoeba3vh2#all/FMfcgzGqQmVXVtZPCqNKrrZrgQBmhzTg, LABEL: , PATH: /usr/share/taskopen/scripts:/home/BOSDYN/bcohen/.nimble/bin:/home/BOSDYN/bcohen/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin:/home/BOSDYN/bcohen/bin:/home/BOSDYN/bcohen/bdi/rt/scripts:/opt/puppetlabs/bin, USER: bcohen, LESSOPEN: | /usr/bin/lesspipe %s, COLORTERM: truecolor, TERMINATOR_UUID: urn:uuid:bb0883fb-c07a-4bc6-84a4-80fbb7f80008, GIO_LAUNCHED_DESKTOP_FILE_PID: 8762, XDG_RUNTIME_DIR: /run/user/1236805077, CLUTTER_IM_MODULE: xim, GITHUB_TOKEN: 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, XDG_VTNR: 2, XDG_SESSION_DESKTOP: ubuntu, BDI: /home/BOSDYN/bcohen/bdi, QT_IM_MODULE: ibus, GIO_LAUNCHED_DESKTOP_FILE: /usr/share/applications/terminator.desktop, EDITOR: vim, TASK_PRIORITY: H, GJS_DEBUG_OUTPUT: stderr, XDG_CURRENT_DESKTOP: ubuntu:GNOME, XDG_SESSION_TYPE: x11, GPG_AGENT_INFO: /run/user/1236805077/gnupg/S.gpg-agent:0:1, USERNAME: bcohen, SSH_AUTH_SOCK: /run/user/1236805077/keyring/ssh, SHELL: /bin/bash, FILE: https://mail.google.com/mail/u/0/?ogbl&zx=uqpoeba3vh2#all/FMfcgzGqQmVXVtZPCqNKrrZrgQBmhzTg, GTK_MODULES: gail:atk-bridge, OLDPWD: /home/BOSDYN/bcohen, GNOME_SHELL_SESSION_MODE: ubuntu, HOME: /home/BOSDYN/bcohen, VTE_VERSION: 5202, SESSION_MANAGER: local/laptop-bcohen02:@/tmp/.ICE-unix/3627,unix/laptop-bcohen02:/tmp/.ICE-unix/3627, OS: Linux, TERMINATOR_DBUS_NAME: net.tenshu.Terminator20x1a6021154d881d, GNOME_DESKTOP_SESSION_ID: this-is-deprecated, CCACHE_DIR: /home/BOSDYN/bcohen/.ccache, SHLVL: 1, GTK_IM_MODULE: ibus, DISPLAY: :1, ID: 6, XDG_MENU_PREFIX: gnome-, XDG_SEAT: seat0, BDI_OS: linux, XAUTHORITY: /run/user/1236805077/gdm/Xauthority})" failed with exit code: 1
jschlatow commented 1 year ago

This seems to be a bug in the Makefile. Apparently, it detected the presence of an open binary (which is used instead of xdg-open on OS X). Yet in your case, the binary appears to be from openvt. As a workaround you can rebuild taskopen with make OPEN=xdg-open to override the auto-detection.

bdbcohen commented 1 year ago

I get this when I try:

cd taskopen
make OPEN=xdg-open
make: Nothing to be done for 'all'.
jschlatow commented 1 year ago

Please remove the taskopen file and try again.

bdbcohen commented 1 year ago

Same...

bcohen@laptop-bcohen02:~/taskopen$ rm taskopen
bcohen@laptop-bcohen02:~/taskopen$ make OPEN=xdg-open PREFIX=/usr
nim c -d:versionGit -d:release -d:pathext:/usr/share/taskopen/scripts -d:editor:vim -d:open:xdg-open --outdir:./ src/taskopen.nim
Hint: used config file '/home/BOSDYN/bcohen/.choosenim/toolchains/nim-1.6.8/config/nim.cfg' [Conf]
Hint: used config file '/home/BOSDYN/bcohen/.choosenim/toolchains/nim-1.6.8/config/config.nims' [Conf]
....................................................................................................................
/home/BOSDYN/bcohen/taskopen/src/exec.nim(11, 6) Hint: 'exec_filter' should be: 'execFilter' [Name]
/home/BOSDYN/bcohen/taskopen/src/exec.nim(14, 10) Hint: 'exec_inline' should be: 'execInline' [Name]
/home/BOSDYN/bcohen/taskopen/src/exec.nim(20, 6) Hint: 'exec_cmd' should be: 'execCmd' [Name]
/home/BOSDYN/bcohen/taskopen/src/exec.nim(25, 6) Hint: 'exec_all' should be: 'execAll' [Name]
....
/home/BOSDYN/bcohen/taskopen/src/taskwarrior.nim(14, 7) Hint: 'default_args' should be: 'defaultArgs' [Name]
/home/BOSDYN/bcohen/taskopen/src/taskwarrior.nim(29, 6) Hint: 'current_context' should be: 'currentContext' [Name]
...
/home/BOSDYN/bcohen/taskopen/src/core.nim(23, 6) Hint: 'build_env' should be: 'buildEnv' [Name]
/home/BOSDYN/bcohen/taskopen/src/core.nim(55, 10) Hint: 'match_actions_label' should be: 'matchActionsLabel' [Name]
/home/BOSDYN/bcohen/taskopen/src/core.nim(110, 10) Hint: 'match_actions_pure' should be: 'matchActionsPure' [Name]
/home/BOSDYN/bcohen/taskopen/src/core.nim(148, 6) Hint: 'find_actionable_items' should be: 'findActionableItems' [Name]
/home/BOSDYN/bcohen/taskopen/src/core.nim(155, 7) Hint: 'action_map' should be: 'actionMap' [Name]
/home/BOSDYN/bcohen/taskopen/src/taskopen.nim(266, 7) Hint: 'configfile_override' should be: 'configfileOverride' [Name]
Hint:  [Link]
Hint: gc: refc; opt: speed; options: -d:release
77204 lines; 1.093s; 116.934MiB peakmem; proj: /home/BOSDYN/bcohen/taskopen/src/taskopen.nim; out: /home/BOSDYN/bcohen/taskopen/taskopen [SuccessX]
bcohen@laptop-bcohen02:~/taskopen$ 
bcohen@laptop-bcohen02:~/taskopen$ sudo make PREFIX=/usr install
mkdir -p /usr/bin
mkdir -p /usr/share/man/man1
mkdir -p /usr/share/man/man5
install -m 0755 taskopen /usr/bin/taskopen
install -m 0644 doc/man/taskopen.1.gz /usr/share/man/man1/taskopen.1.gz
install -m 0644 doc/man/taskopenrc.5.gz /usr/share/man/man5/taskopenrc.5.gz
mkdir -p /usr/share/taskopen/scripts/
cp -r scripts/* /usr/share/taskopen/scripts/
chmod -R 755 /usr/share/taskopen/scripts
mkdir -p /usr/share/taskopen/examples
cp -r examples/* /usr/share/taskopen/examples
chmod -R 755 /usr/share/taskopen/examples
bcohen@laptop-bcohen02:~/taskopen$ 
bcohen@laptop-bcohen02:~/taskopen$ taskopen 10
Couldn't get a file descriptor referring to the console
Command "(cmd: "open $LAST_MATCH", env: {GJS_DEBUG_TOPICS: JS ERROR;JS LOG, XMODIFIERS: @im=ibus, _: /usr/bin/taskopen, TERM: xterm-256color, QT_ACCESSIBILITY: 1, XDG_DATA_DIRS: /usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop, ARGS: , TEXTDOMAIN: im-config, IM_CONFIG_PHASE: 2, TASK_TAGS: , PWD: /home/BOSDYN/bcohen/taskopen, TEXTDOMAINDIR: /usr/share/locale/, XDG_SESSION_ID: 4, SSH_AGENT_PID: 3724, WINDOWPATH: 2, PYTHONPATH: /home/BOSDYN/bcohen/bdi/rt/python, MANPATH: :/opt/puppetlabs/puppet/share/man, LOGNAME: bcohen, DBUS_SESSION_BUS_ADDRESS: unix:path=/run/user/1236805077/bus, XDG_CONFIG_DIRS: /etc/xdg/xdg-ubuntu:/etc/xdg, TASK_DESCRIPTION: clean up week 48 interventions, ANNOTATION: https://git.bostondynamics.com/BostonDynamics/spot_interventions/issues?q=is%3Aissue+label%3A%22week+48%22+is%3Aopen, DESKTOP_SESSION: ubuntu, GDMSESSION: ubuntu, LANG: en_US.UTF-8, TASK_PROJECT: Robustness, UUID: 714a91fd-43f3-4c2b-8e3f-1104f4393f11, LS_COLORS: rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:, QT4_IM_MODULE: xim, LESSCLOSE: /usr/bin/lesspipe %s %s, TERMINATOR_DBUS_PATH: /net/tenshu/Terminator2, LAST_MATCH: https://git.bostondynamics.com/BostonDynamics/spot_interventions/issues?q=is%3Aissue+label%3A%22week+48%22+is%3Aopen, LABEL: , PATH: /usr/share/taskopen/scripts:/home/BOSDYN/bcohen/.nimble/bin:/home/BOSDYN/bcohen/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin:/home/BOSDYN/bcohen/bin:/home/BOSDYN/bcohen/bdi/rt/scripts:/opt/puppetlabs/bin:/home/BOSDYN/bcohen/bin:/home/BOSDYN/bcohen/bdi/rt/scripts:/opt/puppetlabs/bin:/home/BOSDYN/bcohen/bin:/home/BOSDYN/bcohen/bdi/rt/scripts:/opt/puppetlabs/bin, USER: bcohen, LESSOPEN: | /usr/bin/lesspipe %s, COLORTERM: truecolor, TERMINATOR_UUID: urn:uuid:bb0883fb-c07a-4bc6-84a4-80fbb7f80008, GIO_LAUNCHED_DESKTOP_FILE_PID: 8762, XDG_RUNTIME_DIR: /run/user/1236805077, CLUTTER_IM_MODULE: xim, GITHUB_TOKEN: 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, XDG_VTNR: 2, XDG_SESSION_DESKTOP: ubuntu, BDI: /home/BOSDYN/bcohen/bdi, QT_IM_MODULE: ibus, EDITOR: vim, GIO_LAUNCHED_DESKTOP_FILE: /usr/share/applications/terminator.desktop, TASK_PRIORITY: M, GJS_DEBUG_OUTPUT: stderr, XDG_CURRENT_DESKTOP: ubuntu:GNOME, XDG_SESSION_TYPE: x11, GPG_AGENT_INFO: /run/user/1236805077/gnupg/S.gpg-agent:0:1, USERNAME: bcohen, SSH_AUTH_SOCK: /run/user/1236805077/keyring/ssh, SHELL: /bin/bash, FILE: https://git.bostondynamics.com/BostonDynamics/spot_interventions/issues?q=is%3Aissue+label%3A%22week+48%22+is%3Aopen, GTK_MODULES: gail:atk-bridge, OLDPWD: /home/BOSDYN/bcohen, GNOME_SHELL_SESSION_MODE: ubuntu, HOME: /home/BOSDYN/bcohen, VTE_VERSION: 5202, SESSION_MANAGER: local/laptop-bcohen02:@/tmp/.ICE-unix/3627,unix/laptop-bcohen02:/tmp/.ICE-unix/3627, OS: Linux, TERMINATOR_DBUS_NAME: net.tenshu.Terminator20x1a6021154d881d, GNOME_DESKTOP_SESSION_ID: this-is-deprecated, CCACHE_DIR: /home/BOSDYN/bcohen/.ccache, SHLVL: 1, GTK_IM_MODULE: ibus, DISPLAY: :1, ID: 10, XDG_MENU_PREFIX: gnome-, XDG_SEAT: seat0, BDI_OS: linux, XAUTHORITY: /run/user/1236805077/gdm/Xauthority})" failed with exit code: 1
bcohen@laptop-bcohen02:~/taskopen$ 
jschlatow commented 1 year ago

It seems that your taskopenrc requires adaptation as well. Please replace any 'open' with 'xdg-open' in your taskopenrc.