IgnorantGuru / spacefm

SpaceFM File Manager
http://ignorantguru.github.com/spacefm/
GNU General Public License v3.0
489 stars 72 forks source link

Unity: Style issues with the Global Menu bar #49

Open jpfleury opened 12 years ago

jpfleury commented 12 years ago

I tested SpaceFM on a netbook running under Ubuntu 11.10 with Unity. I've been exposed to some style bugs. I later tested SpaceFM 0.7.4 on the same environment on virtualbox and I had the same bugs:

  1. The menu item Plugins | Included is not grayed even if it's empty.
  2. Installed plugins aren't displayed in the menu Plugins. For example, create a custom command, export it, and install it (Plugins | Install | File). After installation, go again to the menu Plugins. The plugin doesn't appear, but it's installed because if we try to install it again, we get this message:

    There is already a plugin installed as 'test1'. Overwrite ?

IgnorantGuru commented 12 years ago

You might try the self-installer or building from source if you had installed from a deb file or the ppa. This sounds like you might have a gtk lib mismatch or something along those lines. That will tell us whether it is a deb pkg issue or something else. Ubuntu is a bit behind sid, which is what the deb pkgs are built on.

jpfleury commented 12 years ago

I reinstalled with the installer, but bugs were still there, so I made tests and found that the problem is with the global menu bar (i.e. application menu that is displayed in top bar instead of being integrated with the application window). If we run SpaceFM without global menu bar:

$ UBUNTU_MENUPROXY= spacefm

Plugins are listed and the menu item Plugins | Included is grayed.

IgnorantGuru commented 12 years ago

I'm not too familiar with Unity but I can take a look. Does this problem go away if the panel bar is hidden?

jpfleury commented 12 years ago

Does this problem go away if the panel bar is hidden?

No. Here are 3 screenshots:

viking777 commented 12 years ago

I recently installed spacefm 0.7.7 on precise pangolin 64 bit version and I had a similar problem to jpfleury, but more severe. I had no menus at all showing, greyed out or otherwise, simply a blank space where the menus should be (even after mousing over the top bar). Jpfluery's workround pointed me in the right direction as to how to get them back (although it doesn't look good at least you can see them).

I just wanted to add this additional information. If you want to have the menus in view from the 'dash' launcher you need to do the following:

gksudo gedit /usr/share/applications/spacefm.desktop

Then edit the Exec line to:

Exec=env UBUNTU_MENUPROXY= spacefm

I hope you find a fix for it soon, although I have to say I would give up using Unity before I would ever give up using Spacefm, it is just superb - congratulations on such a great piece of work.

viking777 commented 12 years ago

You should know that it has now become impossible to access any of the menus on spacefm from the Unity desktop even with the workround suggested above. I have not been able to ascertain the reason for this yet, and it has only happened within the past couple of days. I am now using version 0.7.11-1 and have tried downgrading to 0.7.10-1 but it makes no difference. This is very regrettable and should be addressed.

IgnorantGuru commented 12 years ago

Thanks for the update. There have been no recent changes to spacefm's menu system, so it would appear this change was triggered by a change in Unity.

Because Unity seems to be breaking otherwise functional GTK functions, it is not a high priority. This should really be corrected in Unity, but perhaps a workaround can be found. In the meantime, if there is some way to tell Unity to not interfere with GTK's menus and just run it as a normal GTK app, there shouldn't be a problem. No other distros or DE's report any such problems.

Feel free to provide any additional details here.

viking777 commented 12 years ago

After a lot of searching I have finally found a way to get my icons back. You have to remove the program "appmenu-gtk" (and possibly appmenu-gtk3 as well if you have it). It then doesn't matter what you do to the spacefm.desktop file, the menus will appear in the spacefm menu bar. You would think that doing this would have some consequences on other programs, but so far I haven't noticed any, all my other programs menus appear in the global menu bar as per usual. I will let you know if I find any ill effects from this move later on. I must say this is a life saver for me, the thought of going back to any other file manager is dire, but spacefm without menus is even less useful than Nautilus!

IgnorantGuru commented 11 years ago

I haven't had a chance to look into this yet, but from what's being reported it sounds like a possible bug in appmenu-gtk. I suggest reporting it as a bug there. spacefm uses standard gtk functions, which Unity appears to be breaking.

minj commented 11 years ago

running env UBUNTU_MENUPROXY= spacefm seems to work again in 12.04

I've found a similar bug report about emacs on launchpad.

Their 'fix' was to blacklist it, lol. Spacefm is not even (unfortunately) officially supported in ubuntu so I doubt making a new bug report will help. Why don't they see it as a general problem is beyond me. This is just stupid.

Any suggestions on the course of action?

IgnorantGuru commented 11 years ago

SpaceFM is slated to enter debian repos soon, is included in some Ubuntu PPAs, so I think it's worth it to report it. Unity should work properly with any standard gtk app, whether provided by Ubuntu or not. If it doesn't, it's a bug. It's good for them to know they have a general problem. Thanks for the update.

viking777 commented 11 years ago

For quite a long while now Spacefm has been fully functional on Ubuntu based distros (for me anyway). Neither of the workrounds above (env UBUNTU_MENUPROXY=spacefm or removing appmenu-gtk) are necessary any longer to get fully visible menus. The menus aren't integrated into the global menu bar, they occur on the spacefm window as is normal in other distros, but for me this is not an issue and other programs have the same behaviour. Congratulations on the progress you are making, glad to know you are soon to be 'officially' in the Debian world.

IgnorantGuru commented 10 years ago

This issue may be corrected in Mateusz Łukasik's Ubuntu PPA (from issue #365). Mateusz Łukasik is the official Debian packager for SpaceFM and udevil.

Please confirm if this issue is corrected in those packages, thanks.

viking777 commented 10 years ago

I have to say that from what I see Spacefm doesn't look any different with or without the ppa version. I don't know why but the global menu bar doesn't work the way it used to any more (at least for me). It should incorporate window menus, but it doesn't whatever application I open. For example typing this in Firefox the global menu bar shows the web page title not the Firefox menus as it used to and in Spacefm it shows the location of the open folder with the menus separate. Maybe Canonical listened to customer feedback and changed the way it works (LOL). From your point of view I would say this topic is solved, but you might wait for other opinions.

As an aside when I installed the ppa version Synaptic marked an incredible 52+Mb of 'lib' files as 'auto removable' (ie orphans). I was very sceptical of this but removed them anyway (after creating an disk image) and so far I see no ill effects - just a heads up for those switching to the ppa version - which I didn't know existed until now.

Edit. And the upgrade to version 0.9 reinstalled these 'lib' files all over again, every one of them!

jpfleury commented 10 years ago

As an aside when I installed the ppa version Synaptic marked an incredible 52+Mb of 'lib' files as 'auto removable' (ie orphans). I was very sceptical of this but removed them anyway (after creating an disk image) and so far I see no ill effects - just a heads up for those switching to the ppa version - which I didn't know existed until now.

Edit. And the upgrade to version 0.9 reinstalled these 'lib' files all over again, every one of them!

I think that the Mateusz Łukasik' PPA provides SpaceFM already built, so no need to install all of the dev tools used to build C programs, unlike the IgnorantGuru's PPA that builds SpaceFM during install, so additional lib packages are needed.

viking777 commented 10 years ago

I think that the Mateusz Łukasik' PPA provides SpaceFM already built, so no need to install all of the dev tools used to build C programs, unlike the IgnorantGuru's PPA that builds SpaceFM during install, so additional lib packages are needed.

You are absolutely right jp - I was confused by the fact that the upgrade to 0.9 reinstalled all the packages again, but checking on it I see that this package came from ignorantguru's source, not Mateusz Łukasik's which means it was not pre-compiled and so needed the libraries. Thanks, that all makes sense. I guess I should remove one or other of the sources otherwise I will have a 'SpaceFm Wars' going on at every upgrade!

jpfleury commented 10 years ago

Below are my observations on a fresh Ubuntu 13.10 system (tested on virtualbox). Just to be sure we're talking about the same thing, see these screenshots:

Mateusz Łukasik's PPA

After installing SpaceFM from Mateusz Łukasik's PPA, SpaceFM appears in Dash results.

If I search SpaceFM in Dash and click on the icon, SpaceFM opens with no integration in the global menu bar, so bugs described in the current report are not encountered. The reason SpaceFM is not integrated in the global menu bar is that it's automatically run with an empty environment variable (UBUNTU_MENUPROXY=). I don't know if it's thanks to the PPA or thanks to Dash. To see that, just run SpaceFM from Dash and run this command in a terminal:

pid=$(pidof spacefm) && cat /proc/$pid/environ | tr \\0 \\n | grep UBUNTU_MENUPROXY

The same result occurs when we lock SpaceFM in the launcher and run it from there (UBUNTU_MENUPROXY=).

However, if I run SpaceFM manually from a terminal, the environment variable UBUNTU_MENUPROXY will not be empty (UBUNTU_MENUPROXY=1), surely thanks to the environment of gnome-terminal:

pid=$(pidof gnome-terminal) && cat /proc/$pid/environ | tr \\0 \\n | grep UBUNTU_MENUPROXY

In this case, SpaceFM menu appears in the global menu bar, but the menu is unusable. All submenus only contain an item Activate. If I click on Activate, nothing happens:

global-menu-bar

If I do Alt-F2 to run a command, enter spacefm and press Enter, SpaceFM is also integrated in the global menu bar (this time, there's just no environment variable UBUNTU_MENUPROXY), so as above, the menu is unusable.

IgnorantGuru's PPA

After installing SpaceFM from IgnorantGuru's PPA, SpaceFM doesn't appear in Dash results, so I can't run it from there.

If I run SpaceFM from the terminal, SpaceFM is integrated in the global menu bar (UBUNTU_MENUPROXY=1), so I have the same bug explained above in the Mateusz Łukasik's PPA section.

If I do Alt-F2 to run a command, enter spacefm and press Enter, SpaceFM is integrated in the global menu bar (no environment variable UBUNTU_MENUPROXY), so I have the same bug explained above.

jpfleury commented 10 years ago

Also, see this color problem with the SpaceFM menu bar (it's split into two colors: dark gray and light gray) when SpaceFM is not integrated in the global menu bar:

spacefm

For comparison, see the menu bar of gedit (only one color: dark gray) when it's run with UBUNTU_MENUPROXY= gedit:

gedit

viking777 commented 10 years ago

That is a very detailed analysis. I don't think I can help much with this. Firstly I am using 12.04LTS not the latest version, and secondly my global menu bar has stopped working with ALL applications not just spacefm (and I am not in the mood to fix it as it isn't that important to me plus I am rapidly losing patience with Canonical and its product 'enhancements'). The best I can do is to test it on a 13.04 live cd - I will possibly do that tomorrow.

Reference your suggested command, in my system I get the same response if I launch Spacefm from the terminal or the dash that response is:

UBUNTU_MENUPROXY=libappmenu.so

BTW to save me posting screenshots, my version of Spacefm looks exactly like the first screenshot of your second post - ie no integration, and it doesn't matter which ppa I use, the Spacefm icon always appears and can be launched normally from the dash.

mati75 commented 10 years ago

spacefm 0.9.0 run on Ubuntu 14.04 with: Exec=env UBUNTU_MENUPROXY= spacefm looking and working fine: screenshot from 2013-10-23 19 55 11

jpfleury commented 10 years ago

Also, see this color problem with the SpaceFM menu bar [...]

It's not a problem with Unity. It's just very obvious with Unity because the menu bar's style and the panel bar's are very different (dark gray and light gray).

The contrast is less important with the default theme of Xubuntu 13.10:

viking777 commented 10 years ago

As promised I looked at spacefm on a Ubuntu Unity 13.04 live cd. To start out with I have to say that this desktop is so spectacularly unstable, that getting results from it is not easy, but this is what I saw.

First I installed spacefm from mati75 ppa. It appeared in the dash and could be launched from there, the menus appeared in the global menu, but as per the 3rd of jpfluery's screenshots, the only submenu that appeared on clicking any of the menu headings was the word 'activate' and that did absolutely nothing.

I then purged both spacefm and spacefm-common and installed spacefm-gtk direct from ignorantguru's site. The results were exactly the same as those from the ppa.

In both cases I installed spacefm version 0.9.

So in summary my findings agree with jpfleury's, global menu integration still does not work properly in Unity. OTOH, the latest versions of Unity don't work properly on my machine anyway which is why I have downgraded to 12.04 which still does work except for the global menu bar.

Personally if this were my project I wouldn't waste too much of my time trying to fix errors on a desktop environment that used to be good but has now totally lost the plot and isn't worth worrying with.

mati75 commented 10 years ago

Patched version is uploaded to Ubuntu trusty primary repository: https://launchpad.net/ubuntu/trusty/+source/spacefm/0.9.0-1ubuntu1 and I got suggestions bug report to people responsible for Unity. They should fix that, but it's Ubuntu and nobody know when will be done.

IgnorantGuru commented 6 years ago

This problem with the main menu bars may be corrected or affected by the change in alpha detailed here.