HynDuf / dotfiles

Aesthetic Dotfiles for my Arch Linux rabbit hole 🐇
GNU General Public License v3.0
299 stars 13 forks source link

bspwm not working (I think so) #5

Closed YeralAndre closed 1 year ago

YeralAndre commented 1 year ago

(Sorry for my English, I speak Spanish) I was trying to configure the dotfile in a VirtualBox virtual machine (it should be noted that I tried to install it twice, this dotfile is beautiful, I need to install it), and I think the bspwm is not working for me. When I entered the virtual machine I did all the configuration from the console, and when I restart the machine it sends me directly to it, I don't see a graphical interface or anything similar. When using the startx command (I saw it on a forum), the screen goes black, I have to use the feh --bg-fill path/to/file & command manually to apply a background, and when I open the terminal (I use kitty), it opens usually. I have to display the polybar manually with Super + X and I can't get the correct background. Rofi shortcuts work excluding notification center, lock screen and the above mentioned. I am new to installing dotfiles, if you could guide me in any way or if there is a specific guide to installing it from scratch that would be a great help. Thank you

image image image

HynDuf commented 1 year ago

Could you show me your ~/.config/bspwm/bspwmrc? This file is responsible for autostarting programs when open bspwm.

Besides, as you use startx, in your .xinitrc, remember to have exec bspwm.

YeralAndre commented 1 year ago

I have it this way, I don't know if it's the right one, I used the arandr package to adjust everything to my screen aspect ratio, 1440x900:

~/.config/bspwm/bspwmrc image .xinitrc image

HynDuf commented 1 year ago

I don't really know what's really wrong.

Somethings to try:

See if it work and show your bspwm and .xinitrc after that if it didn't.

YeralAndre commented 1 year ago

I made the changes, and it sends me back to the console when I start, these are my files, sorry for my ignorance, I handle the issue a bit but not 100%:

.xinitrc image

bspwmrc image

I don't really know what's really wrong.

Somethings to try:

  • Leaving only exec bspwm in .xinitrc (move others one to bspwmrc). After restarting check your keyboard shortcuts (sxhkd) to see if bspwmrc is really executed.
  • Delete the second line of your bspwmrc (duplicate).
  • Fix to bspc monitor -d 1 2 3 4 5 6 7 (As I have 7 desktops in my polybar).

See if it work and show your bspwm and .xinitrc after that if it didn't.

HynDuf commented 1 year ago

I made the changes, and it sends me back to the console when I start, these are my files, sorry for my ignorance, I handle the issue a bit but not 100%:

.xinitrc image

bspwmrc image

I don't really know what's really wrong. Somethings to try:

  • Leaving only exec bspwm in .xinitrc (move others one to bspwmrc). After restarting check your keyboard shortcuts (sxhkd) to see if bspwmrc is really executed.
  • Delete the second line of your bspwmrc (duplicate).
  • Fix to bspc monitor -d 1 2 3 4 5 6 7 (As I have 7 desktops in my polybar).

See if it work and show your bspwm and .xinitrc after that if it didn't.

There shouldn't be startx inside .xinitrc. You have to type it your own to open bspwm.

And if you don't know, people use startx (me too) all start up with terminal and then type startx to start (after logging in)

YeralAndre commented 1 year ago

Ok, I didn't know that, well usually in several tutorials that I saw they had a login with a graphical interface, but that would be done in another way I suppose. I've already made the changes you mentioned, and when I use startx, it now shows me a black screen, I can't use the shortcuts or anything like that, or open the terminal.

There shouldn't be startx inside .xinitrc. You have to type it your own to open bspwm.

And if you don't know, people use startx (me too) all start up with terminal and then type startx to start (after logging in)

HynDuf commented 1 year ago

Oh so the problem might be you haven't made bspwmrc executable.

Try running chmod +x ~/.config/bspwm/bspwmrc and restart see if things work out ok. And in case you haven't, chmod +x ~/.config/sxhkd/sxhkdrc too.

YeralAndre commented 1 year ago

Oh so the problem might be you haven't made bspwmrc executable.

Try running chmod +x ~/.config/bspwm/bspwmrc and restart see if things work out ok. And in case you haven't, chmod +x ~/.config/sxhkd/sxhkdrc too.

One question, do I do it as root? I did it as a normal user and nothing happened.

HynDuf commented 1 year ago

Oh so the problem might be you haven't made bspwmrc executable. Try running chmod +x ~/.config/bspwm/bspwmrc and restart see if things work out ok. And in case you haven't, chmod +x ~/.config/sxhkd/sxhkdrc too.

One question, do I do it as root? I did it as a normal user and nothing happened.

Try do it as root and run ~/.config/bspwm/bspwmrc in your terminal to see if it executes.

YeralAndre commented 1 year ago

Try do it as root and run ~/.config/bspwm/bspwmrc in your terminal to see if it executes.

When accessing root with sudo su, it seems that I don't have the directory, I did everything as a normal user, would that be the problem?

image

HynDuf commented 1 year ago

Try do it as root and run ~/.config/bspwm/bspwmrc in your terminal to see if it executes.

When accessing root with sudo su, it seems that I don't have the directory, I did everything as a normal user, would that be the problem?

image

Simple change the ~/.config... to /home/YOUR_USERNAME/.config....

Instead, in your user terminal (not sudo su), you can sudo chmod +x ~/.config/bspwm/bspwmrc.

YeralAndre commented 1 year ago

Simple change the ~/.config... to /home/YOUR_USERNAME/.config....

Instead, in your user terminal (not sudo su), you can sudo chmod +x ~/.config/bspwm/bspwmrc.

I did what you told me with sudo ... and it doesn't work, I think I did something wrong in the setup, because I keep getting the black screen. 😕

HynDuf commented 1 year ago

Did you try running ~/.config/bspwm/bspwmrc in your starting terminal? Take screenshots if anything happended.

YeralAndre commented 1 year ago

I already did, I got this error, I think it's something with the feh module:

image

HynDuf commented 1 year ago

Hmm, the Can't open display is from your ...display.sh right? Try to run it only to see if it runs.

Also, add & after your ...display.sh line in bspwmrc.

YeralAndre commented 1 year ago

Using it alone gives me the same error it seems, I tried to remove that line from bspwmrc and run it again but it gives me the same error.

HynDuf commented 1 year ago

Btw, what is that of your display.sh. Show me the details of it.

HynDuf commented 1 year ago

Final tips I can give you is try following guides on Youtube (or anywhere) about installing bspwm on Arch on VirtualBox and make sure it really works and bspwm (and those display screen things) really runs. After that, use my configs then.

YeralAndre commented 1 year ago

Btw, what is that of your display.sh. Show me the details of it.

image

YeralAndre commented 1 year ago

Final tips I can give you is try following guides on Youtube (or anywhere) about installing bspwm on Arch on VirtualBox and make sure it really works and bspwm (and those display screen things) really runs. After that, use my configs then.

I was looking at everything related to it, and I managed to get it to work, only in the .xinitrc, that's why I resorted to your help.

HynDuf commented 1 year ago

Btw, what is that of your display.sh. Show me the details of it.

image

Oh so it called xrandr. It should be before exec bspwm in .xinitrc. Try moving ...display.sh back into your .xinitrc before exec bspwm. Run again and take screenshots of any errors poping up.

YeralAndre commented 1 year ago

Oh so it called xrandr. It should be before exec bspwm in .xinitrc. Try moving ...display.sh back into your .xinitrc before exec bspwm. Run again and take screenshots of any errors poping up.

Done, I think it's still throwing me the same errors.

.xinitrc image

Errors: image

HynDuf commented 1 year ago

Wait try running startx. Take screenshots too.

YeralAndre commented 1 year ago

Wait try running startx. Take screenshots too.

I ran startx and the screen resizes to the size I placed, but it's still black, I think the error still persists in bspwmrc.

HynDuf commented 1 year ago

Exit bspwm to see any logs/errors when running startx. Take screenshots of those.

YeralAndre commented 1 year ago

Exit bspwm to see any logs/errors when running startx. Take screenshots of those.

No shortcuts work, it's like sxhkd doesn't load the hotkeys, none work, I have to open another terminal with Ctrl + Alt + F3 to access the console.

HynDuf commented 1 year ago

Run sxhkd in that terminal and exit current bspwm then do the above. Alternatively, you can startx > output.txt and cat output.txt to see the logs.

YeralAndre commented 1 year ago

Run sxhkd in that terminal and exit current bspwm then do the above. Alternatively, you can startx > output.txt and cat output.txt to see the logs.

I did the former, and it looks like the ...display.sh error was from sxhkd:

image

And, by using startx > output.txt, it creates the empty file.

HynDuf commented 1 year ago

This is so weird. Replace sxhkd & in bspwmrc with pgrep -x sxhkd > /dev/null || sxhkd &. Restart your machine, run startx and see if sxhkd works (Assume you have already make sxhkdrc executable)

YeralAndre commented 1 year ago

This is so weird. Replace sxhkd & in bspwmrc with pgrep -x sxhkd > /dev/null || sxhkd &. Restart your machine, run startx and see if sxhkd works (Assume you have already make sxhkdrc executable)

It still doesn't work, it keeps giving me the same Can't open display. error and the shortcuts don't work, it's too weird if it worked differently before.

HynDuf commented 1 year ago

From the Arch wiki of xinit. you may miss the last if block.

image

Delete the old .xinitrc. Copy cp /etc/X11/xinit/xinitrc ~/.xinitrc. Add ...display.sh and exec bspwm at the bottom.

Read the docs for xinit to see if you missed anything else.

YeralAndre commented 1 year ago

From the Arch wiki of xinit. you may miss the last if block.

image

Delete the old .xinitrc. Copy cp /etc/X11/xinit/xinitrc ~/.xinitrc. Add ...display.sh and exec bspwm at the bottom.

Read the docs for xinit to see if you missed anything else.

It doesn't give me an error (In the end it's exec bspwm, I realized it but I took the photo before, it gave me an error because of that), but I still can't execute any command it seems.

image

HynDuf commented 1 year ago

What do you mean by

"It doesn't give me an error (In the end it's exec bspwm, I realized it but I took the photo before, it gave me an error because of that), but I still can't execute any command it seems."

Any logs would be helpful

YeralAndre commented 1 year ago

I made the changes you mentioned, used the default .xinitrc, and added those last two lines, but the screen still looks dark, and no keys work, plus it still seems to throw the Can' error t open display.

image

I was checking online, does enabling the sxhkd.service service have anything to do with it?

HynDuf commented 1 year ago

Have you run ...display.sh before calling bspwmrc? Try startx instead and show the logs.

YeralAndre commented 1 year ago

Have you run ...display.sh before calling bspwmrc? Try startx instead and show the logs.

I used startx &> output2.txt and now it gives me the log, I show you: image

HynDuf commented 1 year ago

It says can't execute the configuration file. Have you chmod +x ~/.config/bspwm/bspwmrc. Do it again and take screenshots.

YeralAndre commented 1 year ago

Is it me, or does the chmod not take effect?

image

HynDuf commented 1 year ago

Hmm it should be fine already. Does startx produce the same logs?

YeralAndre commented 1 year ago

Yes, produce same logs, same of older screenshot.

HynDuf commented 1 year ago

I have no idea right now. Maybe try installing basic bspwm and sxhkd follow guides on the Internet and see if your bspwm still got that error.

YeralAndre commented 1 year ago

Hey, I made it work xD. There was a missing #!/bin/sh it seems in ~/.config/bspwm/bspwmrc, I can see the environment like this:

image

Seriously, sorry for wasting your time with such a useless error, can I continue writing in this Issue if I continue to have other problems?

HynDuf commented 1 year ago

Hey, I made it work xD. There was a missing #!/bin/sh it seems in ~/.config/bspwm/bspwmrc, I can see the environment like this:

image

Seriously, sorry for wasting your time with such a useless error, can I continue writing in this Issue if I continue to have other problems?

Yes of course 😂. Glad you fixed it. There would be more bugs to come so prepare for them.

YeralAndre commented 1 year ago

Haha yes, again I repeat that I fell in love with this environment at first sight, that's why I long to have it 100% to use it as the default environment. I was checking and the upper polybar keeps emitting a kind of "error" referring to pomo-format, what is it referring to? And I noticed that the notification center shortcut doesn't work, maybe it's due to a package, right?

HynDuf commented 1 year ago

Haha yes, again I repeat that I fell in love with this environment at first sight, that's why I long to have it 100% to use it as the default environment. I was checking and the upper polybar keeps emitting a kind of "error" referring to pomo-format, what is it referring to? And I noticed that the notification center shortcut doesn't work, maybe it's due to a package, right?

Try read the README more rigorous. It has details about pomo format and stuff.

Sorry for accidentally close this

HynDuf commented 1 year ago

It's been a while so I'll close it.