franciscolourenco / done

A fish-shell package to automatically receive notifications when long processes finish.
MIT License
781 stars 71 forks source link

No protocol specified when using executing the xprop line in done.fish #27

Closed c02y closed 4 years ago

c02y commented 6 years ago

https://github.com/fisherman/done/blob/d07eca1cde37303cf63ca8ab4fbb951d883a3f81/conf.d/done.fish#L30

I sourced done.fish in my config.fish, and after every fish prompt, there will be a line of error message:

No protocol specified

and found the issue is caused by the xprop line:

xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2

but I'm not familiar with the xprop, after googling a while but didn't get the solution.

FYI: openSUSE Tumbleweed fish-shell v2.7.1

franciscolourenco commented 6 years ago

@c02y can you paste the output of echo $DISPLAY? Thanks!

c02y commented 6 years ago
$ echo $DISPLAY
:0
franciscolourenco commented 6 years ago

@c02y are you using KDE?

c02y commented 6 years ago

Yes.

franciscolourenco commented 6 years ago

@c02y Just installed Tumbleweed with KDE and cannot reproduce. What is the result of

echo $XAUTHORITY
cat $XAUTHORITY 

?

c02y commented 6 years ago

screenshot_20180402_203446

franciscolourenco commented 6 years ago

@c02y can you try what is suggested in this answer? https://unix.stackexchange.com/a/429809

c02y commented 6 years ago

It is not working.

And I tried all the answers in that post, none of them works.

franciscolourenco commented 6 years ago

That is strange, and I cannot reproduce the problem. Do you have anything unusual in your setup?

c02y commented 6 years ago

Unusual? I use the same fish configurations in multiple machines, other machines work fine, but the machine I mentioned in the top of this thread doesn't work. It is weird.

franciscolourenco commented 6 years ago

I meant unusual in the machine itself 😄 like for example, a remote desktop or streaming display something like that.

Could you try xdotool as described in this answer and see if it works? https://superuser.com/a/615946

c02y commented 6 years ago
>> xdotool getwindowfocus getwindowname
No protocol specified
chz : tmux — Yakuake

Without loading done.fish file.

franciscolourenco commented 6 years ago

Are you inside a tmux session? Have you tried outside?

c02y commented 6 years ago

Yes, but I tried it without tmux session running, the same result.

After every fish prompt, there will be a line of error message:

No protocol specified

Another outout:

>> xdotool getwindowfocus getwindowname
No protocol specified
fish  /home/chz — Konsole

If I load the done.fish in my config.fish and running fish inside terminal like Ctrl-Alt-F1, the error message message is gone.

ammgws commented 4 years ago

This issue seems stale. Would you be OK with closing it?

franciscolourenco commented 4 years ago

@c02y can you still reproduce the problem?

c02y commented 4 years ago

No, the problems is gone, but I'm using another environment now: Manjaro fish-shell: v3.0.2

done works fine in this environment, and I'm still using the old version of done, v1.8.1, this reminds me of updating it.

Thanks for the help.