FvwmButtons (a module of fvwm window manager) has the Swallow function, that embeds
the window of an application into a panel.
I have to do something like this with Motif and Xlib. I want to embed an Xclock into my application. I guess I have to change the Window ID of the embedded app.
How can I do that?
the only supported and reliable mechanism is XEmbed, but it requires the embedded app to cooperate. Without a cooperating app, you're in a world of scary hacks.
The basic thing you need to do is XReparentWindow() but the problem is that you're fighting the window manager which will also want to reparent the window. You're also potentially confusing the app, which will be expecting ICCCM and EWMH behavior, and expecting the parent window to be a WM frame.
Really old GNOME 1.x versions of gnome panel had a swallow feature you could try to steal hacks from maybe.
Without pretty extensive X knowledge this will be painful, and even
with it's not necessarily possible to make 100% reliable.
It looks like you are looking for the XEmbed protocol, documented here.
Related
Here's the deal. I've animated + coded a variety of 'screensavers' in Actionscript3/Flash. They make extensive use of the timeline, AS3 code, the TweenLite library, and embedded fonts. That's the limit of my programming knowledge. I've tried, to no avail, to convert my .SWFs into screensaver files using a variety of software, such as InstantStorm. Somehow it never works, the code never executes properly, it's a disaster.
So, I'm wondering if it's possible to make a screensaver that simply contains an embedded browser, and have it point to my .SWF file, hosted on my web-server. Basically, imagine a full-screen website acting as a screensaver.
If this is possible, what is the EASIEST and FASTEST way for me to whip up a solution for both PCs and Macs? Language, etc. I'm hoping something that has a library I can simply draw from to embed the browser view :)
My startup is developing a product to do exactly this, it's called Screensaver Ninja and you can find it at https://Screensaver.Ninja.
You can set many different web pages with different timers. The configuration tool allows you log in and navigate to the page you want to display:
It uses WebKit, on Mac OS X it uses Safari's and on Windows it uses Chrome's and in both cases it has a separate session from any other browser installed on the computer.
Here's a small Windows-only solution:
https://github.com/cwc/web-page-screensaver/releases
You could modify this open-source one for the Mac so that it's hard-coded to your URL:
http://www.liquidx.net/blog/2010/11/13/webviewscreensaver-for-mac/
Modify hasConfigureSheet() to return NO and change the URL in kScreenSaverDefaultURL. And change the name!
I want to know how to create a simple desktop environment, such as KDE, Gnome and LXDE, for Linux, or specifically, Ubuntu/Kubuntu, but I do not know how to begin and how complex it is.
I want to create a simple, efficient and lightweight desktop and to reproduce some good features from KDE, Gnome and Windows XP. I do not want to reinvent the wheel, I want to design the graphical interface and main dialogs.
I could use C++ with Qt, or maybe with X11 calls. A simple desktop like TWM would be the first step, then I could add taskbar, start menu, new features and play with new ideas.
Thanks.
Edit
I have installed icewm and I think it is what I need to begin. On the login screen, I can choose if I use KDE (desktop environment) or icewm (window manager). I do not understand what a window manager actually is.
I have downloaded icewm source code and I am confused. There are some concepts that I have to understand, such as, what happens after the login screen when the desktop is loaded, how a window works, etc.
Edit 2
I think I need a good tutorial. I have to understand how a Window Manager or Desktop Environment work. There are some concepts that I have to know.
This is no simple feat but by no means impossible.
Other people have done it, there are plenty of DE or WM out there so there is no reason that you, with patient, skill and lots coffee couldn't do something great.
Learn the difference between DE and WM.
Test different DE and WM, maybe one does exactly what you want it to do?
Make your own custom DE
Here is a guide to get you started creating your own custom DE
After doing all this you should be better equipped to figure out what you actually want to do.
Fork a project and get started.
These are all open source projects, so I suggest you grab one of the simpler window managers and rummage around in its source code. I should warn you, though: this kind of project is not for the faint-hearted, and the likelihood of your little toy project becoming a mainstream desktop is low, so don't go into this imagining it's going to be anything more than a learning exercise (and if it does become something more, you'll be pleasantly surprised).
Strategically, your best bet is to fork an existing WM, rather than trying to build a brand new one from scratch.
One final point: Qt is a windowing framework for C++ that sits on top of a window manager. It isn't a window manager, per se, like Gnome/TWM/etc. are. And, as #ptomato rightly points out, Gnome is actually a desktop environment that itself sits on top of a window manager, which is selectable, but defaults to Mutter.
I would use X calls and learn how to boot to a CLI (command line interface). Booting to a CLI allows you to switch between window managers / desktop environments. Then I would design a window manager. And finally finish off with a desktop environment.
It starts with frame buffers. These are how 80's graphics worked.
Then you have the X window system. This however doesn't show you multiple windows at once. Only one at a time.
A window manager is the program that controls where your windows go. This allows for multiple X windows to take up one screen.
A desktop environment then builds on that to add things like a task bar, start menu and desktop icons.
We are programming a web application (not 'just' a web site, but functionality-wise a real application), and have the following discussion for the next release:
our UI designer wants to replace the browser's right-click context menu (showing our own menu where appropriate, or no menu at all) because he wants the web app to be more like our (existing) Windows app
our developers (and I) strongly object because this is bad practice, and simply something you do not do in a web application
Thus, I'm looking for "more solid" arguments - like best practice guidelines, any statements from reputable sources, coding arguments etc. - for the pros and cons of this issue, which I can hopefully use to resolve it once and for all...
You can't do that reliably anyway. In Firefox, go to Settings, Contents, JavaScript/Advanced (I'm guessing the captions, no English Firefox (; ) to override context menu behaviour and bang, your app doesn't work anymore. My online-banking application did this in their old version, so I couldn't do copy & paste with the mouse. I hated it, so I enabled the protection in Firefox and it worked. Kind of. Their new version doesn't do such bad things anymore.
Instead, use a little drop-down arrow where a context menu is needed, that can either be clicked or just hovered over to show the menu. JetBrains' TeamCity web app does that very well.
If your application is to run in an intranet, maybe the UI designer arguments are valid: as long as all of the users of the application are well known and you want to emulate some Windows application, I think it's ok to restrict the right-click or any other input, because it's just the requirements of this application, as it would be to any other app.
But if your application is to run in the internet, disabling or replacing right-click is a very bad idea, and these are only some of the arguments I reminded of:
First of all, changing the behavior of the user interface is aggressive and annoying -- no one wants to get used to "new controls" just to access your site, and generally people hate to leave their comfort area. I mean, I know what my right click does and I want it to do always the same thing.
People can understand the difference between Windows apps and web apps, so there's no need to "emulate Windows app behavior".
Not everyone uses Windows :-)
Also, this is innefective, sice there are several ways to overwrite this behavior, such as settings in Firefox or even plugins that disable specific javascript instructions, such as this one.
depending on your audience you stand a very good chance your users do not even KNOW there's a right click menu. So please don't make this the only alternative
I personally believe you should leave browser's default behaviors alone... users are used to them, so no need to get them used to your way of doing things.
However, if you're building an intranet (instead of a public site), then I'm for tweaking as much as possible to improve usability.
An argument I would use (in quotes for dramatic effect):
Lack of consistency & reduced
functionality compared to other
unhindered web interfaces will lead to
a loss of user confidence - which
is undesirable to say the least.
Of course, if many or most of the web application users are already familiar with or regular users of the Windows app, the UI designer could be on the right track and the consistency with the Windows app could be a winner.
That said, in my opinion it's hard to make a custom context-menu within a web page intuitive, and while some users might warm to it, I'm guessing most will probably never use it.
because he wants the web app to be more like our (existing) Windows app
I think right-click in a Windows app is a bad idea.
In a web browser it's a UI disaster because nobody will be expecting it.
I think it depends on whether you perceive the context-menu as part of the browsers chrome or not. If you do (and I ascribe to this view), then it should be off target, but otherwise it is a good place for adding some usability to your application.
Replacing the browser right-click context menu for specific areas of your GUI from your web application can be quite useful. Doing this just to disable the context menu will annoy your users, who may try to find a way around it. Also, removing or replacing the browser right-click context menu from the entire area of your application will usually be annoying and can make it more difficult to debug.
Unfortunately, I cannot offer any more solid arguments, and I'm not exactly taking either side of the argument, but I thought I would share my experience both as a developer of a web application and as a web user.
I am attempting to port one of my hobby project to linux. Preferrably to Mono since it is written in C#. But I am looking into Python as well.
One of the feature of the application is that it needs to associate with a custom protocol so the application is invoked when the user clicks links like this on the app's website:
myapp://module/action
A custom protocol like this, this and this.
How can that be done in linux/unix systems? Can I associate a system-wide handler like in Windows? or does it need to be browser-dependent?
Can't find anything on Google. And I am utterly clueless at linux programming.
I need some pointers. Thanks!
In the ideal situation, this sort of thing is handled by the desktop environment (KDE, GNOME, XFCE), and Firefox respects those settings---it should do so on Ubuntu, Fedora, and OpenSUSE, at least. YMMV:
Integrating a new URIs Scheme Handler to GNOME and Firefox
Adding a protocol handler for firefox (KDE)
The manual way to doing it for firefox:
open firefox
type in about:config to location bar
add new string
name: network.protocol-handler.app.myapp
value: /path/to/program
There's not going to be a single answer, because that will be happening at the X window manager level at best. In general, you're going to need to have some chunk of code you can put into your path, and associate the name with the protocol. Have a look at the about:config page, which is where the handlers are set up.
That's really all that Windows does too, it's just that stuff is in the registry.
This looks like a decent drescription for Firefox.
Can I associate a system-wide handler like in Windows? or does it need to be browser-dependent?
It has to be browser-dependent. There's no cross-browser way of associating URL handlers in Linux.
I need to have a working web browser in a fullscreen Direct3D application. For example, Valve's Source-based games (sort of) do it in the MotD window when you join a server. Any tips on where to look?
Second Life uses ubrowser (http://ubrowser.com/) to embed a browser over a 3D world. As the source code is available for the Second Life client (http://wiki.secondlife.com/wiki/Get_source_and_compile) it would be a good place to see how they have done it.
Note however, they are using OpenGL, not Direct3D... but there is nothing specific in ubrowser itself to OpenGL.