You are not logged in.

#1 2014-03-19 21:07:24

linc186
Member
Registered: 2013-03-22
Posts: 33

bspwm panel won't autostart

Hi all,

The panel from bar-aint-recursive works absolutely fine, except for the fact that it refuses to start from bspwmrc, and I have no clue why. I've set the $PATH to the directory that ./panel is in, and if I start panel from a terminal after startup then it works absolutely fine with no issues whatsoever, but, for whatever reason, putting "panel &" in bspwmrc does not work, even though feh, conky, compton, and more work perfectly out of bspwmrc. What's going on? Why does it refuse to work at startup?

Any help is appreciated, thank you very much! I think at this point that my computer is haunted.

Offline

#2 2014-03-19 21:23:14

Steef435
Member
Registered: 2013-08-29
Posts: 577
Website

Re: bspwm panel won't autostart

Where do you add the directory to the $PATH? How do you start X/bspwm?

Try adding the absolute path in the bspwmrc to make sure it isn't a $PATH issue.

Last edited by Steef435 (2014-03-19 21:23:42)

Offline

#3 2014-03-19 21:53:26

linc186
Member
Registered: 2013-03-22
Posts: 33

Re: bspwm panel won't autostart

Steef435 wrote:

Where do you add the directory to the $PATH? How do you start X/bspwm?

Try adding the absolute path in the bspwmrc to make sure it isn't a $PATH issue.

The panel executable is in ~/.config/bspwm/panel, and in .bashrc, I added $PATH=PATH:~/.config/bspwm /panel, and simply running "panel" works fine, so the absolute PATH isn't an issue.

I start bspwm from .xinitrc with

sxhkd &
exec bspwm

Along with a few more commands to do a few things with X that work well.

Last edited by linc186 (2014-03-19 22:02:33)

Offline

#4 2014-03-20 11:37:33

o_caino
Member
Registered: 2013-06-06
Posts: 167

Re: bspwm panel won't autostart

Is panel_bar in $PATH and executable?

Offline

#5 2014-03-20 19:56:10

linc186
Member
Registered: 2013-03-22
Posts: 33

Re: bspwm panel won't autostart

o_caino wrote:

Is panel_bar in $PATH and executable?

Yes, it is.

Offline

#6 2014-03-20 20:03:37

o_caino
Member
Registered: 2013-06-06
Posts: 167

Re: bspwm panel won't autostart

Post your bspwmrc, please.

Offline

#7 2014-03-21 20:00:39

linc186
Member
Registered: 2013-03-22
Posts: 33

Re: bspwm panel won't autostart

#! /bin/sh

bspc monitor -d I II III IV V VI VII VIII IX X

bspc config border_width        2
bspc config window_gap          12
bspc config split_ratio         0.52
bspc config borderless_monocle  true
bspc config gapless_monocle     true

bspc rule -a Gimp desktop=^8 follow=on floating=on
bspc rule -a Chromium desktop=^2
bspc rule -a mplayer2 floating=on
bspc rule -a Kupfer.py focus=on
bspc rule -a Screenkey manage=off

panel &
conky -c ~/.conkyrings/.conkyrc &
feh --bg-scale ~/Pictures/polygons.jpg &
compton --config ~/.config/compton.conf &

Here it is

Offline

#8 2014-03-21 20:31:48

o_caino
Member
Registered: 2013-06-06
Posts: 167

Re: bspwm panel won't autostart

I think I found the problem.
Try this: Start bspwm as usual, open a terminal and run

echo $PANEL_FIFO

If there's no output set the variables $PANEL_FIFO and $PANEL_HEIGHT, for example

export PANEL_FIFO=/tmp/panel-fifo
export PANEL_HEIGHT=24

Offline

#9 2014-03-21 21:14:09

linc186
Member
Registered: 2013-03-22
Posts: 33

Re: bspwm panel won't autostart

o_caino wrote:

I think I found the problem.
Try this: Start bspwm as usual, open a terminal and run

echo $PANEL_FIFO

If there's no output set the variables $PANEL_FIFO and $PANEL_HEIGHT, for example

export PANEL_FIFO=/tmp/panel-fifo
export PANEL_HEIGHT=24

Unfortunately, no dice. I already had set it, so running

 echo $PANEL_FIFO 

Already yields

 /tmp/panel-fifo 

Thank you for your help though. My computer is haunted.

Offline

#10 2014-03-21 21:33:15

o_caino
Member
Registered: 2013-06-06
Posts: 167

Re: bspwm panel won't autostart

Indeed.
I tested your bspwmrc in my computer, and after setting the variables the panel worked as expected (except for the fact that I don't have xtitle and clock, both used in the panel script)...
Maybe you could try to start X with startx &> /tmp/x.log to see if there's any error message or something.

Good luck with the exorcism.

Offline

#11 2014-03-21 22:02:19

linc186
Member
Registered: 2013-03-22
Posts: 33

Re: bspwm panel won't autostart

o_caino wrote:

Indeed.
I tested your bspwmrc in my computer, and after setting the variables the panel worked as expected (except for the fact that I don't have xtitle and clock, both used in the panel script)...
Maybe you could try to start X with startx &> /tmp/x.log to see if there's any error message or something.

Good luck with the exorcism.

Thank you.

So, I ran

startx &> /tmp/x.log

and it yeilded no errors. However, on trying to run panel after start up, it told me that panel is already running. So, apparently, it is running, but it's invisible... Why on Earth would it be invisible...

Here's my panel config, but I don't see anything in it that would cause problems...

#! /bin/sh

if [ $(pgrep -cx panel) -gt 1 ] ; then
	printf "%s\n" "The panel is already running." >&2
	exit 1
fi

trap 'trap - TERM; kill 0' INT TERM QUIT EXIT

flavor=${1:-bar}

[ -e "$PANEL_FIFO" ] && rm "$PANEL_FIFO"
mkfifo "$PANEL_FIFO"

bspc config top_padding $PANEL_HEIGHT

bspc control --subscribe > "$PANEL_FIFO" &
xtitle -sf 'T%s' > "$PANEL_FIFO" &
clock -sf 'S%a %H:%M' > "$PANEL_FIFO" &

case "$flavor" in
	bar)
		cat "$PANEL_FIFO" | panel_bar | bar &
		;;
	dzen2)
		. panel_colors
		FONT_FAMILY='DejaVu Sans'
		FONT_SIZE=11
		cat "$PANEL_FIFO" | panel_dzen2 -f "$FONT_FAMILY" -s "$FONT_SIZE" | dzen2 -h $PANEL_HEIGHT -dock -ta l -title-name panel -fn "${FONT_FAMILY}:pixelsize=${FONT_SIZE}" -fg "$COLOR_FOREGROUND" -bg "$COLOR_BACKGROUND" &
		;;
esac

wait

Offline

#12 2014-03-21 22:37:53

o_caino
Member
Registered: 2013-06-06
Posts: 167

Re: bspwm panel won't autostart

This is the vanilla panel script, which uses xtitle and clock to display focused window title and time, respectively.
If you don't have them in your system comment out the lines.

Edit: and make sure you don't have any panel process left before you try again.

Last edited by o_caino (2014-03-21 22:57:26)

Offline

#13 2014-03-22 15:39:54

Steef435
Member
Registered: 2013-08-29
Posts: 577
Website

Re: bspwm panel won't autostart

On that note, what panel do you use? bar(-aint-recursive) or dzen2? Does running one of those from the terminal work?
Sorry, I'm tired.

Last edited by Steef435 (2014-03-22 15:42:00)

Offline

#14 2014-03-29 02:53:05

jonlorusso
Member
Registered: 2013-12-29
Posts: 7

Re: bspwm panel won't autostart

This wasn't marked as solved and I ran into something similar. 

linc186 wrote:

Why on Earth would it be invisible...

In my case, it was displaying on the previous run of the X server.  The solution for me was to just kill the old one before starting a new one:

pkill panel

Offline

#15 2015-04-11 20:04:25

lounge
Member
Registered: 2015-03-01
Posts: 23

Re: bspwm panel won't autostart

I have the same problem panel works from terminal but not auto start.
How do I set the variables if thats the problem ?

edit: solved

Last edited by lounge (2015-04-12 05:49:36)

Offline

Board footer

Powered by FluxBB