[SOLVED] Polybar does not start with new user account

Hi All,

although I am not new to Linux I am new to ArchLabs and also to Openbox, so I am even not sure, where to locate my problem exactely. I freshly installed the newest iso of Archlabs (28072018) two days ago and found, that after adding a new user (I used adduser as described in the ArchWiki), the top bar (Polybar) does not start. It will also not start, if I do “Preferences - Polybar - start Polybar”. In fact, I tried everything (include new installation) to start this bar in another account (include giving that account sudo privilege) than the first set up during installation (in this account, the bar always starts without problem). I do not have any idea anymore, how to solve this and also did not find anything via google, so I would be very happy about a hint. Is this maybe a bug? Or am I stupid?

Did you get a default openbox session with no wallpaper etc …?

I had this happen yesterday. Nothing from /etc/skel was copied over because /home/username was not created. Applications (like gimp) fail to start because the ~/.gimp can’t be created; the user has no place to write configurations.

First I deleted the user I created (may not be required, I went the “nuke it from orbit route”)

Then as root create a new user using the full line command (from Arch Wiki):

# useradd -m -g initial_group -G additional_groups -s login_shell username

the -m creates the /home/username – I think that’s where the bug (in adduser?) is.

Real example, I usually use:

# useradd -m -s /bin/bash -U -G wheel,users,audio,video,cdrom,input <username>

so my Void and ArchLabs users all have the same privileges (the cdrom group didn’t exist in ArchLabs).

Dear PackRat,

thank You very much for trying to help me. I tried, what You suggested (creating a new user the way You described), but unfortunately, it did not work. I got the openbox session with the Archlabs wallpaper. Everything is there (also the /home/username folder was created), just no polybar.

And when I try to start polybar via terminal (“al-polybar-session”) I get the message

error: Invalid include file “/home/liveuser/.config/polybar/master.conf” defined on line 6
Gtk-Message: 17:53:02.680: GtkDialog mapped without a transient parent. This is discouraged.

The weird thing is, that line 6 in the master.conf of my new user is exactely the same like in the file of the first user account, where the polybar works (it says: background = #1c2023).

I do not know, this helps. I got to go to bed now (I am in Japan and it is local time 1 o clock at night) but thank You again.

For a quick solution, paste this into the terminal and hit enter

sed -i "s/liveuser/${USER}/g" $HOME/.config/polybar/config
for file in $(ls $HOME/.config/polybar/sessions); do
    sed -i "s/liveuser/${USER}/g" $file
done

If you’d rather do it manually or learn a bit about polybar read ahead.

This error is trying to source this file, not that the error is in that file.
See ~/.config/polybar/config lines 6-7

[section/base]
include-file = /home/liveuser/.config/polybar/master.conf
include-file = /home/liveuser/.config/polybar/modules.conf
# These   ->  ->     ^^^^^^^ need to be changed to your username

The same goes for each sessionfile in ~/.config/polybar/sessions/

# Polybar openbox Sessionfile
# DO NO edit this file, it will be overwritten by al-polyzen
# Instead make a custom sessionfile and use the -z FILE or --session FILE option
# To load session at startup use the following line
# sleep 1; al-polybar-session &

/home/liveuser/.config/polybar/config openbox-bar
# Here ^^^^^^

I’ve been making a few changes to our polybar utilities like al-polybar-session and I’ll add a check to ensure the files are set up properly for the current user before attempting to launch the bar(s).

Cheers

2 Likes

I don’t know how solve this at ‘ArchLabs’ dev/installation level but;

error: Invalid include file “/home/liveuser/.config/polybar/master.conf” defined on line 6

this line needs to change to the new user in $HOME/.config/polybar as in my case for example;

/home/mrneilypops/.config/polybar/master.conf

1 Like

The errors always come from ~/.config/polybar/config polybar allows sourcing other files and more fun stuff but at it’s core it only really parses this file, so all errors will trace here regarding the line definition etc.

@natemaia
Appreciate your expertise :sunglasses:

2 Likes

IT WORKED!!!

Great! Thank You so much Natemaia!

Thanks also to Mrneilypops and PackRat! I was really impressed how quick I got replies on this forum.

Deeply impressed! Really!

2 Likes