lxqt / lxqt-panel

The LXQt desktop panel
https://lxqt-project.org
GNU Lesser General Public License v2.1
193 stars 135 forks source link

Standalone panel starts empty #2175

Open stefonarch opened 1 day ago

stefonarch commented 1 day ago

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
isf63 commented 23 hours ago

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

stefonarch commented 17 hours ago

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
tsujan commented 13 hours ago

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 commented 13 hours ago

~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.

isf63 commented 11 hours ago

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.

tsujan commented 10 hours ago

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.

stefonarch commented 8 hours ago

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.

tsujan commented 7 hours ago

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.