Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No such file or directory #2

Closed
ioio85 opened this issue Jun 22, 2020 · 11 comments
Closed

No such file or directory #2

ioio85 opened this issue Jun 22, 2020 · 11 comments

Comments

@ioio85
Copy link

ioio85 commented Jun 22, 2020

Hi

First of all, thanks a lot for the great work. Unfortunately I can't make it work. What am I missing?
I have the latest version. I am on Arch/bspwm and I use Alacritty.

I added alacritty to this line in pidswallow
swallowable=" $TERMINAL alacritty urxvt kitty "

I added that at the bottom of bspwmrc
bspc subscribe node_add node_remove \ | grep -o --line-buffered '0x[0-9A-F]\+$' | xargs -n1 pidswallow &

In Alacritty I get

sxiv Pictures/wallpapers-stray.jpg !9984 No such user name: found. /home/ioio85/.local/bin/pidswallow: line 38: pls report this issue to https://github.com/liupold/pidswallow: No such file or directory

In urxvt it does not work either but I don't get any error.

Thanks for your help

@Liupold
Copy link
Owner

Liupold commented Jun 23, 2020

Thanks for taking your time and reporting this, Does other programs works? Try with feh and see if that works. sxiv will not work as of not as of now there is a issue open xyb3rt/sxiv#398. If other programs are also not working , please start a program (say mpv, vlc, zathura), and then provide the output for.
psteee -spTA $(pidof <name>).

@ioio85
Copy link
Author

ioio85 commented Jun 23, 2020

Thanks for your reply.
Unfortunately it still does not work for other programs. Here are the tests I have done.
pstree -spTA $(pidof mpv) systemd(1)---alacritty(4054)---zsh(4061)---mpv(5916)

pstree -spTA $(pidof feh) systemd(1)---alacritty(5978)---zsh(5988)---feh(7029)
here is my bspwmrc just in case.

Thanks

@Liupold
Copy link
Owner

Liupold commented Jun 23, 2020

comment out the line from bspwmrc and run from the terminal with verbose=1.

sorry for the previous comments (my phone screwed me up. thought there was a line break '
your pstree looks as expected. no problem there.

@Liupold
Copy link
Owner

Liupold commented Jun 23, 2020

just downloaded and tried alacritty. works fine. Try to run from the terminal and see if that works. Btw do you have all the requirements installed ?

@ioio85
Copy link
Author

ioio85 commented Jun 29, 2020

Hi sorry for the delay in my response,

I found that if I run it from the command line it works.
In addition if I run bspwmrc file (i.e. ./.config/bspwm/bspwmrc) it also work.
But if I restart bspwm it does not work and there isn't any pidswallow process. My guess it fails to start at startup but I am not sure why. Do you know a way to access error log from bspwm? Thanks a lot for your help.

@Liupold
Copy link
Owner

Liupold commented Jun 30, 2020

pidswallow will not be shown as process as it is not active all the time. The process which remains active and pipe widow id is bspc. If you are not using any other script which requires bspc actively. For debugging I recommend you to modify the echo statement of pidswallow such that it appends to a file.

Eg:
echo "$pwid and $cwid" >> /path/to/my/log (inside pidswallow).

I think i know why restarting will won't work. If you restart you create two bspc monitor. (one hides and one unhides instantly) Hence no change.

This can be solved by killing bspc before starting another (adding a line before your bspc.

Add this before the bspc command.
kill $(pgrep -f 'bspc subscribe node_add node_remove')

@SeerLite
Copy link
Collaborator

SeerLite commented Jul 8, 2020

I think i know why restarting will won't work. If you restart you create two bspc monitor. (one hides and one unhides instantly) Hence no change.

This can be solved by killing bspc before starting another (adding a line before your bspc.

Add this before the bspc command.
kill $(pgrep -f 'bspc subscribe node_add node_remove')

Hey, I was looking around and immediately noticed this! Since all bspwm does when "restarting" is clear all rules and execute bspwmrc again, that monitor process would still be running in the background and another one would start. Multiple restarts would clutter it with a lot of these.
I think the kill command should be added to the instructions in the readme. Maybe there even is a cleaner way to deal with it?

As for the original issue here, I have no clue hehe. Still trying to wrap my head around all this process-tree stuff.

@Liupold
Copy link
Owner

Liupold commented Jul 9, 2020

ya i am not happy with this myself. How would you advice this is done. (Though a another script or within the same script?). As others are also having issue with this.

@SeerLite
Copy link
Collaborator

SeerLite commented Jul 9, 2020

I think having the entire bspc subscribe line inside the script would be a great idea. That way, it's just adding a pidswallow & to bspwmrc.

Still, I don't know how to deal with killing the script in case it's already running. This has always been a thing that bothers me about scripts and even some binaries, that's why I started running systemd user services for some of them (although that introduces another set of problems entirely lol)

If bspc subscribe just had a flag for exiting when it detects bspwm restarting... that'd make this whole thing easier. That the script has to stop on each restart.

@SeerLite
Copy link
Collaborator

SeerLite commented Jul 9, 2020

Ok, I might be wrong about this but I think I found something that could be useful (although maybe slow):

bspc subscribe report has this whole deal about reporting the status of the WM in general, right? So I did some tests and I think (I'm not 100% sure!) that each time a restart is done, it outputs a line with a single W. I'm gonna play around a bit with it, maybe we could read report in some way and exit the script once W is received?

Edit: It's gonna be a bit difficult to implement, as the script currently only reads for a window id.

@Liupold Liupold mentioned this issue Jul 13, 2020
Merged
@Liupold
Copy link
Owner

Liupold commented Jul 15, 2020

The script now is super easy to install and support restarting.

@Liupold Liupold closed this as completed Jul 15, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants