Xfce Forum

Sub domains
 

You are not logged in.

#1 2011-06-19 16:40:15

StarKid
Member
Registered: 2011-02-04
Posts: 15

Logout Alters Workspaces

I use 3 workspaces. Almost every time I log out and log back in, I find that the number of workspaces has decreased to 1. I have set session settings to be saved. I have version 4.8. When I named the workspaces, they remained unaltered for one or two logins , then the old behavior returned. The settings editor shows the correct number of workspaces.

Offline

#2 2011-06-20 10:46:50

Nick
Dev
From: ~
Registered: 2005-02-17
Posts: 1,144
Website

Re: Logout Alters Workspaces

Please report a bug in the bug tracker. Add the following information to the bug: does the xfconf data change (xfwm4.xml in ~/.config/xfce/xfconf/...), are you using xfwm4, does change the workspaces help.

Offline

#3 2011-06-20 12:01:18

StarKid
Member
Registered: 2011-02-04
Posts: 15

Re: Logout Alters Workspaces

Nick wrote:

does change the workspaces help.

What do you mean by changing the workspaces?

Offline

#4 2011-06-20 13:31:50

Nick
Dev
From: ~
Registered: 2005-02-17
Posts: 1,144
Website

Re: Logout Alters Workspaces

The number of workspaces, if you change it, does everything restore?

Offline

#5 2011-06-20 13:41:59

StarKid
Member
Registered: 2011-02-04
Posts: 15

Re: Logout Alters Workspaces

Nick wrote:

The number of workspaces, if you change it, does everything restore?

I don't understand what you mean by "everything." The only thing that is changing is the number of workspaces, so if I change it back to three...well, yes, it's back to the way it was until I log out again.

Last edited by StarKid (2011-06-20 13:42:30)

Offline

#6 2011-07-01 15:38:41

Ancurio
Member
Registered: 2011-02-08
Posts: 15

Re: Logout Alters Workspaces

I would like to add that I experience the exact same problem.
When I log out and back in, the workspace count,
as well as the respective entry in the xfconf xml file change back  to 1.

Btw, since for some reason xfwm4 isn't being autostarted by xfce4
with the rest of its applications, I had to make an extra entry for it
in the session autostart section

Offline

#7 2011-07-01 17:00:51

jasonleakey
Member
Registered: 2011-07-01
Posts: 1

Re: Logout Alters Workspaces

hi
check out the file ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml. In the file there are lines like this

    <property name="workspace_count" type="int" value="1"/>
    <property name="workspace_names" type="array">
      <value type="string" value="Workspace 1"/>
      <value type="string" value="Workspace 2"/>
      <value type="string" value="Workspace 3"/>
      <value type="string" value="Workspace 4"/>
      <value type="string" value="Workspace 5"/>
      <value type="string" value="Workspace 6"/>
    </property>


please make sure the workspace count equals the number of workspace name list. Thus, the configuration above is sort of wrong. I change it into

    <property name="workspace_count" type="int" value="4"/>
    <property name="workspace_names" type="array">
      <value type="string" value="Workspace 1"/>
      <value type="string" value="Workspace 2"/>
      <value type="string" value="Workspace 3"/>
      <value type="string" value="Workspace 4"/>
    </property>

and login again. It fixed. I think it probably a bug while loading configuration.

Offline

#8 2011-07-01 19:39:30

Ancurio
Member
Registered: 2011-02-08
Posts: 15

Re: Logout Alters Workspaces

jasonleakey wrote:

hi
check out the file ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml. In the file there are lines like this

    <property name="workspace_count" type="int" value="1"/>
    <property name="workspace_names" type="array">
      <value type="string" value="Workspace 1"/>
      <value type="string" value="Workspace 2"/>
      <value type="string" value="Workspace 3"/>
      <value type="string" value="Workspace 4"/>
      <value type="string" value="Workspace 5"/>
      <value type="string" value="Workspace 6"/>
    </property>


please make sure the workspace count equals the number of workspace name list. Thus, the configuration above is sort of wrong. I change it into

    <property name="workspace_count" type="int" value="4"/>
    <property name="workspace_names" type="array">
      <value type="string" value="Workspace 1"/>
      <value type="string" value="Workspace 2"/>
      <value type="string" value="Workspace 3"/>
      <value type="string" value="Workspace 4"/>
    </property>

and login again. It fixed. I think it probably a bug while loading configuration.

I wrote:

When I log out and back in, the workspace count,
as well as the respective entry in the xfconf xml file change back  to 1.

Last edited by Ancurio (2011-07-01 19:40:37)

Offline

#9 2011-07-15 15:52:18

Ancurio
Member
Registered: 2011-02-08
Posts: 15

Re: Logout Alters Workspaces

*bump*

Since this is somewhat really annyoing, I thought of the following:
"Hunt down the function that manipulates workspace count,
and use it to write a little executable that will reset this count
to 3 every time I log in".
I started with libwnck, which yielded me

void
wnck_screen_change_workspace_count
(WnckScreen *screen, int count)

Having no idea what kind of "screen" pointer to supply, I went on
and found the xfce function which calls the above one:

static void
window_menu_plugin_workspace_add
(GtkWidget *mi, WindowMenuPlugin *plugin)

Damn. I know the *mi is filled in by gtk calling back this function
(or at least I think so), but what about the "plugin" pointer??
It seems its content is being constructed in

static gboolean
window_menu_plugin_remote_event
                (XfcePanelPlugin *panel_plugin,
                                 const gchar     *name,
                                 const GValue    *value)
{
       WindowMenuPlugin *plugin = XFCE_WINDOW_MENU_PLUGIN (panel_plugin);
       ...
}

, but this is where my poor little hunt ended.
I have absolutely no idea where to find the necessary "panel_plugin"
pointer, or any of the other arguments.

There, I tried. Anyone mind helping me out? =/

Offline

#10 2011-08-16 14:41:02

Ancurio
Member
Registered: 2011-02-08
Posts: 15

Re: Logout Alters Workspaces

Through some weird coincidence, I have finally found out how to fill that *screen pointer I needed.

Here's my little workaround:

#define WNCK_I_KNOW_THIS_IS_UNSTABLE
#include <libwnck/libwnck.h>

int main(gint argc, gchar *argv[])
{
	int new_wc_count;
	if (argc < 2)	{new_wc_count = 4;}
	else 			{new_wc_count = *argv[1]-'0';}
	sleep(5);
	g_type_init();
	gdk_init(&argc, &argv);
	WnckScreen *screen = wnck_screen_get_default();
	wnck_screen_change_workspace_count(screen, new_wc_count);
	return 0;
}

compile that with gcc and `pkg-config libwnck-1.0 glib --cflags --libs`
and have it run as auto-start.

Hopefully this bug will be fixed soon =/

Offline

#11 2011-08-16 17:43:20

Nick
Dev
From: ~
Registered: 2005-02-17
Posts: 1,144
Website

Re: Logout Alters Workspaces

This is all set by xfce4-settings-helper, there is the required code to setup the workspace count. Now it is plausible this is set before the window manager is ready.

Offline

#12 2011-08-16 18:23:51

Ancurio
Member
Registered: 2011-02-08
Posts: 15

Re: Logout Alters Workspaces

Nick wrote:

This is all set by xfce4-settings-helper, there is the required code to setup the workspace count. Now it is plausible this is set before the window manager is ready.

Which means if xfce4-settings-helper is started with all the other xfce programs,
but xfwm4 comes with autostart, which in turn comes probably after that,
it has no chance to be told by settings-helper to set the correct amount of workspaces, right?

Then why doesn't xfwm4 just read out the config file itself and set the correct workspace count?

Offline

#13 2011-08-16 22:44:52

angstrom
Member
Registered: 2011-08-13
Posts: 267

Re: Logout Alters Workspaces

I don't have this bug ...
Can you try to create and empty account then login with this account. Test if there is a bug with this new account ?

I have experience that migration from 4.6 to 4.8 can get you some "strange" behavior ... When you compare *.xml config file from in your home and the one in the new account, there is field that are modified (and used) but they don't appear in the new configuration menu.

Then why doesn't xfwm4 just read out the config file itself and set the correct workspace count?

Try to ask directely on the xfce-dev mailing list because most of the developpers won't have the time to look in the forum.


Xfce is NOT Xubuntu. Bugs in Xubuntu don't mean that Xfce is buggy ...

Offline

#14 2011-09-18 23:37:25

DArseneau
Member
Registered: 2011-09-18
Posts: 3

Re: Logout Alters Workspaces

I saw this problem when I installed Xubuntu 11.4 and sorted it out thanks to investigation and comments on some web pages somewhere, but the answer belongs here.

On login, the workspaces are being set up by a process not owned by the user, and that process fails to read the xfwm4.xml file, or more specifically, it has no read access to the directory.  The fix is:

chmod a+r .config/xfce4/xfconf/xfce-perchannel-xml

Offline

#15 2011-09-19 11:46:09

Ancurio
Member
Registered: 2011-02-08
Posts: 15

Re: Logout Alters Workspaces

I disabled my little "hack" and tried out your method, but there was no difference to before. Workspace count is still 1 on login.

It is just as Nick said: no matter what process sets the workspace count, it won't succeed if xfwm4 isn't ready (=started) already,
and because it doesn't automatically start with the other programs and I had to set it as "Autostart" it doesn't make it in time.
That's why I put in the delay of 5 sec; otherwise it wouldn't work.

Last edited by Ancurio (2011-09-19 11:50:14)

Offline

#16 2011-09-19 12:44:20

Nick
Dev
From: ~
Registered: 2005-02-17
Posts: 1,144
Website

Re: Logout Alters Workspaces

I have (for a different problem) a work-around in the panel, will put that in xfsettingsd too.

Offline

#17 2011-09-20 02:09:43

DArseneau
Member
Registered: 2011-09-18
Posts: 3

Re: Logout Alters Workspaces

Ancurio wrote: tried out your method, but there was no difference to before.

Interesting.  I've not had any such race condition, but the changing read permission always works.  I tried it on a new account now and it still works.  Can you check that *all* the directories in the chain are accessible?  My .config/xfce4/xfconf, .config/xfce4, and  .config directories were already "rx" permission to all.

Offline

#18 2011-09-20 10:51:08

Ancurio
Member
Registered: 2011-02-08
Posts: 15

Re: Logout Alters Workspaces

xfwm4.xml stores the needed information, and yes, I checked and it is perfectly readable by "Others".

On another note, I once created a new account for a specific purpose, and upon first logging in,
everything worked perfectly, xfwm4 too of course. Then, on the next login, the same situation
as I have it now on my main account settled in

Offline

#19 2011-10-10 18:42:58

mithat
Member
Registered: 2011-10-10
Posts: 1

Re: Logout Alters Workspaces

I am having this problem with Xfce in Debian Wheezy as well. A while back I had the same problem with Openbox on Ubuntu Karmic and found a workaround (documented here). I just tried the same workaround with Xfce on Wheezy, and it worked (N of 1). I created a file containing:

#! /bin/bash

# Clean up after GDM
xprop -root -remove _NET_NUMBER_OF_DESKTOPS \
      -remove _NET_DESKTOP_NAMES \
      -remove _NET_CURRENT_DESKTOP 2> /dev/null

and had Application Autostart start it, er, automatically.

The code above (including the comment) was taken from an old (pre-Karmic) Ubuntu Openbox file. It's possible that the difference between people having and not having this problem is using and not using GDM. It's also possible that I just got lucky with my single test and the above is actually doing nothing. I'll report back with more results after a few more logout/in cycles.

Last edited by mithat (2011-10-10 18:43:19)

Offline

Board footer

Powered by FluxBB