wisk / medusa

An open source interactive disassembler
Other
1.04k stars 92 forks source link

Running under MATE desktop environment leads to dummy application w/o menu due to stray Ubuntu Unity menu plugin (appmenu-qt5) #14

Closed pfalcon closed 9 years ago

pfalcon commented 10 years ago

I followed instructions to build medusa (I used master branch) on Ubuntu 14.04 system (so, Qt5, etc. as supplied by official repos). In the result, I get completely dummy looking application screen, which even appear to be 90degree rotated. No menus, no nothing. Passing file on command line has no effect. Screenshort attached.

So, what's the actual status of Medusa and how to build working version, similar to provided screenshots on README?

Thanks. screenshot-medusa

wisk commented 10 years ago

Hi @pfalcon,

It seems you're not the only who don't have the menu and to tell the truth I don't know why.

Could you try to compile medusa in either release or debug mode? (_cmake -DCMAKE_BUILDTYPE=Release) And you should try the dev branch, it should be stable enough and it doesn't require you to build ogdf manually (make sure to execute git submodule update --init --recursive).

BTW, if you hit CTRL+O, can you see the file dialog box?

Thanks for trying medusa. :)

pfalcon commented 9 years ago

As suggested, I tried dev branch, and used following cmake command to configure:

cmake \
    -DQT5_CMAKE_PATH:PATH=. \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/tmp/medusa \
    ..

And got exactly the same result as above. I thought maybe I need to install it as it accesses some resources, but still the same.

Note the QT5_CMAKE_PATH:PATH setting above. It seems that if that var is unset, then Qt is simply not built. But to what exactly set it is unclear. README gives example of /usr/lib/cmake, but on Ubuntu, I don't have such dir. And if it's set wrong, I'd expect complication or linking error, but all goes well.

Once again, this is Ubuntu 14.04 with qt5 of version: 5.2.1+dfsg-1ubuntu14

pfalcon commented 9 years ago

Guys, may I suggest you dedicate some time to resolve this issue. It may seem like random user issue, but may I suggest treating it as Medusa build problem on one of the most popular Linux distros (I for one use Ubuntu not because I like it too much, but because if we want Linux to be mainstream, the we got to use mainstream distro which many other users use).

It's hard to complete such a big project without people contributing, and to contribute, people first should be able to see it in action. So far, that's problematic. So, please help your project but helping users being able to have successful quick start with it. Thanks.

wisk commented 9 years ago

Hello @pfalcon,

I'm taking this kind of bug seriously, don't worry about that. :) I finally manage to understand what happened, and it seems it has nothing to do with medusa itself. On Ubuntu, the menu is actually display on the top of your screen and hidden by default (look-n-feel of OSX).

Ubuntu vs. Windows

Regarding the 90° rotated label, it just like the screenshot. I find it wastes less place this way, of course it coul be changed.

Note the QT5_CMAKE_PATH:PATH setting above. It seems that if that var is unset, then Qt is simply not built. But to what exactly set it is unclear. README gives example of /usr/lib/cmake, but on Ubuntu, I don't have such dir. And if it's set wrong, I'd expect complication or linking error, but all goes well. You can't expect a linking error if QT5_CMAKE_PATH is unset since the Qt5 UI is considered an optional module. However, I'll modify the CMake to notify the user built and not built modules to avoid any mix-up.

If you any ideas to improve the default look, feel free to share. :)

Thanks for sharing.

pfalcon commented 9 years ago

OMG, it's complicated. Continuing my rant about Ubuntu, it's of course one of the most user-friendly and best-supported general-purpose distros, but some time ago it betrayed community by switching to an ugly, proprietary, subfunctional UI. Many people left Ubuntu, some just switched to "remixes" with alternative UIs. I'm in particular running MATE with a classy Gnome2 look&feel. The report above is all about running it on MATE.

Trying default Ubuntu UI, I indeed see and can access detached menu at the top of the screen (not in the window, where all sane UIs have it). But even under Ubuntu UI, menu accelerators don't work - pressing Ctrl+O gives no effect. No effect under MATE either.

So, I'm not a Qt hacker, but I'm rather surprised by this app behavior. Just a day before I built https://github.com/QupZilla/qupzilla against Qt5 and it works as expected - menus are visible and at the right place, accelerators work, etc.

If you have an idea what may be related here, please have a look. I'd try to do it myself too, but I'm out for at least couple next weeks travelling.

Thanks!

wisk commented 9 years ago

Hello @pfalcon,

I didn't test QupZilla, but I did take a look at the source. They overload the class QMenu, I think it could explain why the Window Manager is unable to detect this menu and thus doesn't include it on the global application menu.

In my opinion, it's not a good idea to implement a workaround on Medusa for this kind of "issue" (I guess it's a matter of taste :)). If the user really wants to disable this feature, (s)he has to disable it on his/her side. However, I could probably add icon menu, what do you think?

pfalcon commented 9 years ago

Sorry for the delay with response - just getting back from travels to normal life ;-).

Thanks for the references provided! I confirm that (following http://ubuntuforums.org/showthread.php?t=2163971) doing:

sudo apt-get remove appmenu-qt5

resolved issue with menu display - it's now shown, files can be opened, etc.

I agree that adding adhoc workarounds on code side doesn't seem right. Regarding "icon menu" - if you think it would fit with look and feel of the app, I'm sure few people who might get into such weird situation would appreciate it. And the very minimum, I'd suggest to deal with #17 - it would save me a lot of confusion ;-).

Thanks again!