kitty icon indicating copy to clipboard operation
kitty copied to clipboard

Error message in .xsession-errors file

Open bthiebault opened this issue 5 years ago • 2 comments

Describe the bug

The following error message is printed at each session start in the ~/.xsession-errors file:

Traceback (most recent call last):
  File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/bin/../lib/kitty/__main__.py", line 127, in <module>
    main()
  File "/usr/bin/../lib/kitty/__main__.py", line 123, in main
    func(sys.argv[1:])
  File "/usr/bin/../lib/kitty/__main__.py", line 23, in remote_control
    rc_main(args)
  File "/usr/bin/../lib/kitty/kitty/remote_control.py", line 188, in main
    response = do_io(global_opts.to, send, no_response)
  File "/usr/bin/../lib/kitty/kitty/remote_control.py", line 132, in do_io
    with io:
  File "/usr/bin/../lib/kitty/kitty/utils.py", line 429, in __enter__
    self.tty_fd, self.original_termios = open_tty(True)
OSError: Failed to open controlling terminal: /dev/tty (identified with ctermid()) with error: No such device or address

To Reproduce Login

Expected behavior No error message

Screenshots If applicable, add screenshots to help explain your problem.

Environment details OS: Arch Linux

Output of kitty --debug-config

kitty 0.19.3 created by Kovid Goyal Linux Solgaleo 5.10.16-arch1-1 #1 SMP PREEMPT Sat, 13 Feb 2021 20:50:18 +0000 x86_64 Arch Linux \r (\l) LSB_VERSION=1.4 DISTRIB_ID=Arch DISTRIB_RELEASE=rolling DISTRIB_DESCRIPTION="Arch Linux" Loaded config files: /home/ben/.config/kitty/kitty.conf Running under: X11

Config options different from defaults: active_border_color Color(red=88, green=110, blue=117) allow_remote_control y background Color(red=0, green=43, blue=54) background_opacity 0.8 bold_font Fira Mono Bold click_interval 0.5 color0 Color(red=7, green=54, blue=66) color1 Color(red=220, green=50, blue=47) color10 Color(red=88, green=110, blue=117) color11 Color(red=101, green=123, blue=131) color12 Color(red=131, green=148, blue=150) color13 Color(red=108, green=113, blue=196) color14 Color(red=147, green=161, blue=161) color15 Color(red=0, green=0, blue=0) color2 Color(red=133, green=153, blue=0) color3 Color(red=181, green=137, blue=0) color4 Color(red=38, green=139, blue=210) color5 Color(red=211, green=54, blue=130) color6 Color(red=42, green=161, blue=152) color7 Color(red=253, green=246, blue=227) color8 Color(red=0, green=43, blue=54) color9 Color(red=220, green=50, blue=47) cursor Color(red=253, green=246, blue=227) cursor_blink_interval 0.4 cursor_stop_blinking_after 4.0 enable_audio_bell False focus_follows_mouse True font_family Fira Mono font_size 12.0 foreground Color(red=253, green=246, blue=227) open_url_modifiers 3 remember_window_size False scrollback_lines 10000 scrollback_pager ['less', '+G', '-R'] select_by_word_characters :@-./_~?&=%+# selection_background Color(red=101, green=123, blue=131) selection_foreground Color(red=131, green=148, blue=150) url_color Color(red=131, green=148, blue=150) window_border_width (0, 'pt') window_padding_width FloatEdges(left=12.0, top=12.0, right=12.0, bottom=12.0) Changed shortcuts: shift+control+minus KeyAction(func='decrease_font_size', args=()) shift+control+equal KeyAction(func='increase_font_size', args=()) shift+control+o KeyAction(func='pass_selection_to_program', args=['google-chrome']) shift+control+backspace KeyAction(func='restore_font_size', args=())

Additional context I use BSPWM as my window manager

bthiebault avatar Feb 21 '21 17:02 bthiebault

You are using a remote control command in a context where there is no tty device. Dont do that and you will be fine. Or use a dedicated socket for remote control.

kovidgoyal avatar Feb 21 '21 17:02 kovidgoyal

Thanks for the quick answer. You were right, I called kitty too early when my session was starting, so it was all my fault :)

bthiebault avatar Feb 21 '21 17:02 bthiebault