lxqt-panel icon indicating copy to clipboard operation
lxqt-panel copied to clipboard

Standalone panel starts empty

Open stefonarch opened this issue 11 months ago • 9 comments
trafficstars

If lxqt-panel is started outside of an LXQt session it will be empty, frustrating users

Expected Behavior

A default panel with menu, quicklaunch, clock and so on is started

Current Behavior

All widgets have to be added manually and menu files can be absent or wrong under some circumstances. In my test using openbox plasma-application.menu was used in fancy menu.

Possible Solution

Make sure the default panel.conf is copied if not present.

Steps to Reproduce (for bugs)
  1. Remove ~/.config/lxqt/panel.conf
  2. Start an openbox session
  3. start lxqt-panel
Context

Several people stumble about that recently.

System Information
  • LXQt Version: all

stefonarch avatar Nov 23 '24 21:11 stefonarch

There is /usr/share/lxqt/panel.conf which is sourced in some (unknown to me) circumstances. It actually may be the reason for the numbering bug https://github.com/lxqt/lxqt-panel/issues/2126

isf63 avatar Nov 24 '24 00:11 isf63

I found that there is generated a panel configuration indeed, but without widgets:

[General]
__userfile__=true

[panel1]
alignment=-1
animation-duration=0
background-color=@Variant(\0\0\0\x43\0\xff\xff\0\0\0\0\0\0\0\0)
background-image=
desktop=0
font-color=@Variant(\0\0\0\x43\0\xff\xff\0\0\0\0\0\0\0\0)
hidable=false
hide-on-overlap=false
iconSize=22
lineCount=1
lockPanel=false
opacity=100
panelSize=32
position=Bottom
reserve-space=true
show-delay=0
visible-margin=true
width=100
width-percent=true

stefonarch avatar Nov 24 '24 07:11 stefonarch

Start an openbox session

A bare environment like Openbox may have problem with purely Qt-based apps too because it may not set basic EVs. Did you test with startlxqt minus its last line (which is exec lxqt-session)?

tsujan avatar Nov 24 '24 11:11 tsujan

~A more basic question: what if you add [General] to the top of /usr/share/lxqt/panel.conf? Its lack seems suspicious to me.~

~If that's the reason, we should correct it before making a point release for https://github.com/lxqt/lxqt-panel/issues/2173.~

EDIT: Never mind; if the value of the panels key is empty, panel1 is added by the code. That means, although /usr/share/lxqt/panel.conf has a wrong panels key, it has no effect.

tsujan avatar Nov 24 '24 11:11 tsujan

If there is no ~/.config/lxqt/panel.conf and the panel is restarted, for me a ~/.config/lxqt/panel.conf is automatically created.

Generated panel.conf
[General]
__userfile__=true

[desktopswitch]
alignment=Left
type=desktopswitch

[fancymenu]
alignment=Left
type=fancymenu

[mount]
alignment=Right
type=mount

[panel1]
alignment=-1
animation-duration=0
background-color=@Variant(\0\0\0\x43\0\xff\xff\0\0\0\0\0\0\0\0)
background-image=
desktop=0
font-color=@Variant(\0\0\0\x43\0\xff\xff\0\0\0\0\0\0\0\0)
hidable=false
hide-on-overlap=false
iconSize=22
lineCount=1
lockPanel=false
opacity=100
panelSize=32
position=Bottom
reserve-space=true
show-delay=0
visible-margin=true
width=100
width-percent=true

[quicklaunch]
alignment=Left
type=quicklaunch

[showdesktop]
alignment=Right
type=showdesktop

[statusnotifier]
alignment=Right
type=statusnotifier

[taskbar]
alignment=Left
type=taskbar

[tray]
alignment=Right
type=tray

[volume]
alignment=Right
type=volume

[worldclock]
alignment=Right
type=worldclock

It is not the same as /usr/share/lxqt/panel.conf. It has a more detailed [panel1] but is missing plugins=, so should be invalid.

isf63 avatar Nov 24 '24 13:11 isf63

It has a more detailed [panel1] but is missing plugins=

That's not a problem. The plugins key will be created as soon as you add/remove a plugin; otherwise, that of the default config file will be used.

tsujan avatar Nov 24 '24 14:11 tsujan

otherwise, that of the default config file will be used.

...but only inside lxqt-session. I think the empty panel.conf is generated by the panels' code but have no clue what triggers the use of /usr/share/lxqt/panel.conf.

stefonarch avatar Nov 24 '24 16:11 stefonarch

have no clue what triggers the use of /usr/share/lxqt/panel.conf.

Qt should use it when there's no user config file.

If I were you, I'd listen to @tsujan's suggestion after removing that empty config file, and if the panel was OK, I would remove startlxqt's blocks, one at a time and from bottom to top, to know which one is effective.

tsujan avatar Nov 24 '24 16:11 tsujan

Some new element for investigating: testing the case-insensitive PR for panel backend I noticed that with niri-session from tty the default panel is created, while in Hyprland (hyprland from tty) an empty one and even transparent is created and you can hardly see where it is.

stefonarch avatar May 19 '25 06:05 stefonarch

Empty is frustrating, but mine (alpine) even came transparent: had to blindly right click on top/bottom edges to see the menu.

Arnaudv6 avatar Aug 02 '25 10:08 Arnaudv6

Wayland? I still didn't find why the default config isn't loaded in those cases. It could be that it's handled like a second panel added - it would help if it would open directly its configuration window always.

stefonarch avatar Aug 02 '25 12:08 stefonarch

The panel loads the config from the code I think:

cat panel.conf (at first launch)
[General]
__userfile__=true

[panel1]
alignment=-1
animation-duration=0
background-color=@Variant(\0\0\0\x43\0\xff\xff\0\0\0\0\0\0\0\0)
background-image=
desktop=0
font-color=@Variant(\0\0\0\x43\0\xff\xff\0\0\0\0\0\0\0\0)
hidable=false
hide-on-overlap=false
iconSize=22
lineCount=1                                                                                                                       
lockPanel=false                                                                                                                   
opacity=100                                                                                                                       
panelSize=32                                                                                                                      
position=Bottom                                                                                                                   
reserve-space=true                                                                                                                
screen-name=eDP-1                                                                                                                 
show-delay=0                                                                                                                      
visible-margin=true                                                                                                               
width=100                                                                                                                         
width-percent=true       

#        A widget is added:                                                                                   
[user@casa lxqt]$ cat panel.conf                                                                                                  
[General]                                                                                                                         
__userfile__=true                                                                                                                 
                                                                                                                                  
[mainmenu]                                                                                                                        
alignment=Left                                                                                                                    
type=mainmenu                                                                                                                     
                                                                                                                                  
[panel1]                                                                                                                          
alignment=-1                                                                                                                      
animation-duration=0                                                                                                              
background-color=@Variant(\0\0\0\x43\0\xff\xff\0\0\0\0\0\0\0\0)                                                                   
...

stefonarch avatar Aug 02 '25 12:08 stefonarch

Hi @stefonarch Pure Wayland yes (labwc). Let's add before I go offline a few days: I have the most minimal qt setup: no qt5ct installed (not launched in months).

$ env | grep -i qt
QT_AUTO_SCREEN_SCALE_FACTOR=0

Also I had to override icon theme and relaunch the panel before I could see any icon in panel-preferences dialog. Hope this helps somehow.

Arnaudv6 avatar Aug 02 '25 13:08 Arnaudv6

no qt5ct installed

Warning about qt6ct on Wayland (although not related to this report): https://github.com/lxqt/pcmanfm-qt/issues/2071#issuecomment-3020525713

tsujan avatar Aug 02 '25 13:08 tsujan

@tsujan Would it be possible to add a red dotted border to new panels or something similar? On some Wayland compositors new panels can be 100% transparent (Hyprland afaik). But it shouldn't affect the normal first panel.

Or could lxqt-panel check if a config is aready in place and if not load the default one from /usr/share/lxqt/panel.conf?

stefonarch avatar Aug 02 '25 14:08 stefonarch

This report is quite valid, and its fix can't be complex. We need to find a solution that isn't specific to Wayland or X11, IMO.

EDIT: Will give it a thought and come back with suggestions…

tsujan avatar Aug 02 '25 14:08 tsujan

The panel's config is set here (which is /usr/share/lxqt/panel.conf without a config file):

https://github.com/lxqt/lxqt-panel/blob/8842a42c64440e6b5eb193c07955fd0d34e30217/panel/lxqtpanelapplication.cpp#L349

When that doesn't work, it means that something very basic isn't set by a pure Openbox or labwc session — maybe a basic EV.

There's nothing to fix, but if a simple workaround is found for this exceptional situation, it could be added.

tsujan avatar Aug 02 '25 17:08 tsujan

OK, the cause was found and tested by @stefonarch:

We add /usr/share to XDG_CONFIG_DIRS — for Qt at least — while a pure labwc or Openbox session doesn't do that.

Now, the question is:

Should we move /usr/share/lxqt/panel.conf to /etc/xdg/lxqt/panel.conf?

tsujan avatar Aug 02 '25 17:08 tsujan

Having both isn't an option probably. It's not only openbox or labwc, it's Hyprland and Xfce and many others too. I think it's better to be modular, no other panel I tested comes empty.

Manpage has to be udated in case: The panel can be run independently of LXQt, autostarted at logon. Outside LXQt an empty bottom panel is added.

stefonarch avatar Aug 02 '25 18:08 stefonarch

Having both isn't an option probably.

Theoretically, that shouldn't be needed, but testing is always good.

Personally, I have no problem with moving /usr/share/lxqt/panel.conf to /etc/xdg/lxqt/panel.conf after thorough testing. The other config files inside /usr/share/ make sense only inside an LXQt session.

tsujan avatar Aug 02 '25 18:08 tsujan

Theoretically, that shouldn't be needed, but testing is always good.

I moved panel.conf to /etc/xdg/lxqt/ and started both a fresh x11 and Wayland session, no issue found.

@palinek @marcusbritanicus @luis-pereira @yan12125 Any objections/thoughts on moving the config?

stefonarch avatar Aug 02 '25 18:08 stefonarch

@stefonarch The move is OK, and welcome from my side. :)

marcusbritanicus avatar Aug 04 '25 10:08 marcusbritanicus

Improving conpatibility with more environments is good :)

yan12125 avatar Aug 05 '25 01:08 yan12125