Author Topic: Konsole item in computing menu,... help please...  (Read 247472 times)

JaseP

  • Addicted
  • *
  • Posts: 526
    • View Profile
    • JaseP's LinuxMCE Wiki User page
Konsole item in computing menu,... help please...
« on: September 05, 2012, 03:51:15 pm »
Over the weekend,... I had created a menu item in the computing screen for the konsole terminal emulator. After a bit of fussing with it and figuring it out, I got it to the point where it would launch the konsole application, but it would only flash on the screen for a split second and "disappear" underneath the onscreen orbiter. I could access it only if I switched to the KDE desktop. The reason I created it, in the first place, was to not have to drop out to the KDE desktop to get a virtual terminal (or have to switch ttys).

I'm pretty sure I got the WM_CLASS correct,... And I tried it a couple of different ways,... So, if anyone has any tips or pointers, suggestions, etc... I'd appreciate it.
See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).

JaseP

  • Addicted
  • *
  • Posts: 526
    • View Profile
    • JaseP's LinuxMCE Wiki User page
Re: Konsole item in computing menu,... help please...
« Reply #1 on: September 05, 2012, 04:36:39 pm »
I think I may have found the problem,... There may be a a unique quirk of konsole that it does not resolve its WM_CLASS name properly. I may have to use Gnome-terminal...

See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: Konsole item in computing menu,... help please...
« Reply #2 on: September 05, 2012, 04:38:57 pm »
Tschak can help you with this.
I never quit... I just ping out.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Konsole item in computing menu,... help please...
« Reply #3 on: September 06, 2012, 02:01:01 am »
dcerouter_1030881:/usr/src/LinuxMCE-1004/src/Game_Player# wmctrl -l -x
0x03800047 -1 Plasma.Plasma         dcerouter plasma-desktop
0x0380006f -1 Plasma.Plasma         dcerouter plasma-desktop
0x04600023  0 konsole.Konsole       dcerouter linuxmce : bash
0x01200001  3 pluto-xine-playback-window.pluto-xine-playback-window        N/A pluto-xine-playback-window
0x0160000d  2 Orbiter.Orbiter             N/A OrbiterGL
0x0220000d  2 Photo_Screen_Saver.Photo_Screen_Saver        N/A PlutoGalleryViewer

according to this, WM_CLASS is console, WM_NAME is Konsole, making the window class field, konsole.Konsole

-Thom

JaseP

  • Addicted
  • *
  • Posts: 526
    • View Profile
    • JaseP's LinuxMCE Wiki User page
Re: Konsole item in computing menu,... help please...
« Reply #4 on: September 06, 2012, 02:56:13 am »
Thanks,... I ended up going with gnome-terminal,... as I read some stuff about konsole not resolving its WM_CLASS right,... from 8.04 up to 12.04... I think I had even tried konsole.Konsole at some point last night before getting tired & giving up...

Gnome-terminal works, though, including tabs and even transparency after editing the default profile... Plus I actually like it better. But thanks for the help, anyway.
« Last Edit: September 06, 2012, 03:00:40 am by JaseP »
See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: Konsole item in computing menu,... help please...
« Reply #5 on: September 06, 2012, 03:42:15 am »
I think the point is... yer doing it wrong.

Anything can be wrapped... you are just trying to pop something up OVER the display, rather than wrapping it into its own window within the UI.


Again... ask tschak how to do this correctly. We are not adding gnome terminal because it is easier... make konsole.Konsole work. I will be proud of you.
« Last Edit: September 06, 2012, 03:43:49 am by l3mce »
I never quit... I just ping out.

JaseP

  • Addicted
  • *
  • Posts: 526
    • View Profile
    • JaseP's LinuxMCE Wiki User page
Re: Konsole item in computing menu,... help please...
« Reply #6 on: September 06, 2012, 06:35:23 pm »
Wasn't trying to get you to add a feature...

I just wanted an on-screen terminal app for (just) myself, because I prefer that to tty switching or dropping out to KDE for something simple as runing a command... If someone else wants it, I'll be happy to document it.

Anyway, I'll also be happy to figure out getting Konsole working, ... especially figuring out if it was bone-headed mistake of mine, or a (real) problem with KDE...



See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).

JaseP

  • Addicted
  • *
  • Posts: 526
    • View Profile
    • JaseP's LinuxMCE Wiki User page
Re: Konsole item in computing menu,... help please...
« Reply #7 on: September 07, 2012, 08:30:38 am »
Well,... I did a sanity check, and it's not anything I did...

There's a major incompatibility with the way KDE brings up its core apps and the Computing Class (where the DCE ruter cedes input control to the app)... Dolphin does the same thing as KDE... dives straight under the "Pluto desktop"...

I was able to install Thunar and Nautilus just fine,... and both called up fine from Gnome-terminal. Thunar is nice, in that it displays prominently that you're running as root (which can "result in damage to your system"), while Nautilus likes to take over the desktop if you don't use the --no-desktop switch...

I'll double-check Thunar as a Computing app to be safe, but I am pretty sure of the outcome ... I'm sure it'll be fine, where KDE apps aren't ...

PS: I am not trying to add these apps as a Feature... I understand full well that the computing class bypasses the normal control by the DCE router over input... I was NOT looking to get a wrapper together... Please understand that. This was intended, from the beginning, to be a HACK. I just wanted to clarify...

That said,... I don't know how deep the trouble goes ... Just to KDE and its plasma layer,... or all the way to QT.
See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: Konsole item in computing menu,... help please...
« Reply #8 on: September 07, 2012, 10:03:00 am »
JaseP...


I WANT this feature. I mentioned it a long time ago, and tschak told me exactly how to do it.

You are doing it wrong. It isn't a bug, it isn't a specific version... it is your implementation. We can wrap ANYTHING. You aren't implementing it into the UI, you are trying to overlay it on TOP of the UI.

Do it right. Learn how to do it right. Implement it.

You are trying to run Thunar and Nautilus, and evidently Dolpin, as root (terrifically stupid idea for the record). If you insist on doing this you should open them as the user, with kdesudo... but... really... you just shouldn't do this. Look at how firefox is opened as a user, and kdesudo from there. What you are doing is disavowed by the host OS's, and what you are encountering is not a bug, but an attempt to adhere to this fundamental requirement.

This is a huge security problem... which is why it is not working properly. If you just want to run everything filesystem/internet related as root... just install windows.
I never quit... I just ping out.

JaseP

  • Addicted
  • *
  • Posts: 526
    • View Profile
    • JaseP's LinuxMCE Wiki User page
Re: Konsole item in computing menu,... help please...
« Reply #9 on: September 07, 2012, 04:47:15 pm »
I'm trying to respond without sounding like a big giant [expletive deleted], but there's no good way (equally my personality as other reasons)... So, I'll just try to keep it short.

I had a very brief look at the the Mozilla.sh... I haven't figured out the whole thing, I'll keep looking, but I can't promise anything.

What I'm doing is just a nasty hack for my own purposes. I didn't build the Computing Class, I'm just using it. The "broken" apps  (KDE's Konsole & Dolphin) DO run... just hidden in the background,... not a very good security measure, if that's the reason they're not running right. The non-KDE apps run without any restriction. The security holes are way bigger than a file browser and a terminal running that way for a few minutes... & are an architecture issue that's definitely not my fault.

I have more ideas about this,... But that's a topic for another thread & probably something more of a wish list for 1204.
See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: Konsole item in computing menu,... help please...
« Reply #10 on: September 07, 2012, 05:25:23 pm »
Then I misunderstood part of the problem if it is still running in the background. I thought you said it was closing.

I understand you "just want it for your personal reasons". Really I do. I could write it at this point. I very much want it... I had just forgotten about that want.

What I am trying, very hard, to do... is to get you to actually do something. Something that will benefit everyone, and get your feet wet understanding HOW all of this works.

Why should we be motivated to help you implement a hack when you are not motivated to implement it for real? It is not one of the "hard" things to do. You are very enthusiastic. You are very clever. You could be a valuable asset. I believe this, which is probably why we butt heads so often. You have a good potential to help the project and yourself learning this architecture.


But you are stubborn as a mule and absolutely REFUSE to learn. You keep treating LMCE like a desktop. Like it is a strange version of Gnome. It isn't. You drive me nuts... you really do. Can't you just do this ONE thing, the right way? I find myself really wanting this feature, and refusing to do it myself, because it is YOURS to contribute. Please.
I never quit... I just ping out.

JaseP

  • Addicted
  • *
  • Posts: 526
    • View Profile
    • JaseP's LinuxMCE Wiki User page
Re: Konsole item in computing menu,... help please...
« Reply #11 on: September 07, 2012, 07:33:01 pm »
Ok... I'll do it,...

But I want to do it with Guake...
http://guake.org/
That'll give the potential (maybe) to have it drop down over top of a running Media director, regardless of what's running underneath.  You can tell me if that's feasible. But otherwise, I think it should be intercepting the keyboard like the Firefox wrapper.

I'd like it to be able to be called up with a hot-key over-top any running OSD Orbiter running on an MD (e.g.: during media playback). That might give you the ability to manually issue live commands, such as DCE router commands to a running device (like the Xine Player).

I've found some of the development stuff in the Wiki, know that a device has to be created, etc,... but I need to have some kind of starting place,...

So,... I have questions;
  1) What scripts, wiki entries and files should I be looking at first (Mozilla.sh comes to mind for a starting place)?
  2) Could it be restricted to certain users, and if so, set to su (or kdesudo) to the running user if authorized? & What examples should I look at to figure that out?
  3) If it can be given a hot key to launch, where are those defined, and where/what should I be looking at to get started?
  4) Can it be set to always be on top (meaning are you alright with that, not necessarily how is that done, I assume wmctrl would be used)?

Please keep in mind I don't know C, C++, PHP, Ruby, etc. ... but I can shell script adequately. 
See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: Konsole item in computing menu,... help please...
« Reply #12 on: September 07, 2012, 08:53:13 pm »
He who writes the code makes the rules.

I would like to see this done without installing anything... but it's your thing.

You can, actually, set transparency of the native virtual terminal, so it could be brought up like the video menu, overlain/minimized as desired. You don't need guake to do this. You could just pop it up with a button... sort of like the media grid. Wouldn't that be cool? We already install so much. Unlike the browser... which will stop your media event and move to this... however you will have to keep things like myth from taking character input...

« Last Edit: September 07, 2012, 09:59:17 pm by l3mce »
I never quit... I just ping out.

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: Konsole item in computing menu,... help please...
« Reply #13 on: September 07, 2012, 10:01:40 pm »
I can see it now...

I never quit... I just ping out.

golgoj4

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1193
  • hrumpf!
    • View Profile
    • Mah Website
Re: Konsole item in computing menu,... help please...
« Reply #14 on: September 07, 2012, 10:15:57 pm »
Ok... I'll do it,...

But I want to do it with Guake...
http://guake.org/
That'll give the potential (maybe) to have it drop down over top of a running Media director, regardless of what's running underneath.  You can tell me if that's feasible. But otherwise, I think it should be intercepting the keyboard like the Firefox wrapper.

I'd like it to be able to be called up with a hot-key over-top any running OSD Orbiter running on an MD (e.g.: during media playback). That might give you the ability to manually issue live commands, such as DCE router commands to a running device (like the Xine Player).

I've found some of the development stuff in the Wiki, know that a device has to be created, etc,... but I need to have some kind of starting place,...

So,... I have questions;
  1) What scripts, wiki entries and files should I be looking at first (Mozilla.sh comes to mind for a starting place)?
  2) Could it be restricted to certain users, and if so, set to su (or kdesudo) to the running user if authorized? & What examples should I look at to figure that out?
  3) If it can be given a hot key to launch, where are those defined, and where/what should I be looking at to get started?
  4) Can it be set to always be on top (meaning are you alright with that, not necessarily how is that done, I assume wmctrl would be used)?

Please keep in mind I don't know C, C++, PHP, Ruby, etc. ... but I can shell script adequately. 


keep on the path, dont let not knowing c#, c++, stop you. After all, you only have to learn it once. and if it comes down to it, ill help you write the c++ device.

-golgoj4
Linuxmce - Where everyone is never wrong, but we are always behind xbmc in the media / ui department.