regolith-linux / regolith-desktop

Meta package for the Regolith Desktop Environment
1.5k stars 31 forks source link

`rofication-gui` crashes in Regolith 3 #912

Open gogsbread opened 1 year ago

gogsbread commented 1 year ago

Describe the bug rofication-gui crashes in Regolith 3. Can also be simulated by clicking the notification icon and observing logs with journalctl -f

To Reproduce

~λ rofication-gui
Traceback (most recent call last):
  File "/usr/bin/rofication-gui", line 8, in <module>
    RoficationGui(RoficationClient(sys.stdout)).run()
  File "/usr/lib/python3/dist-packages/rofication/_gui.py", line 68, in __init__
    self._tsformat = Resource(env_name='i3xrocks_notify_timestamp_format', xres_name='i3xrocks.notify.timestamp.format', default='').fetch()
  File "/usr/lib/python3/dist-packages/rofication/_util.py", line 33, in fetch
    return check_output(cmd, universal_newlines=True)
  File "/usr/lib/python3.10/subprocess.py", line 421, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.10/subprocess.py", line 503, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/xrescat'

Expected behavior rofication should show notifications.

Additional context Looks like rofication still uses i3xrocks, whereas Regolith 3 seems to be using i3status-rs.

kgilmer commented 1 year ago

Hi @gogsbread ,

The root cause is this line: No such file or directory: '/usr/bin/xrescat'

rofication-gui has not been maintained in recent Regolith releases, in favor of ilia. It might be a simple fix to modify the script for your purposes to call trawlcat for the Wayland session. There could be other bugs though, as I haven't tried it myself.

~$ trawlcat
trawlcat 0.2.2
A CLI for fetching value of trawl resource while omitting surrounding quotes

USAGE:
    trawlcat <NAME> [DEFAULT]

ARGS:
    <NAME>       resource name
    <DEFAULT>    default value for resource

OPTIONS:
    -h, --help       Print help information
    -V, --version    Print version information
~$