Browser instead of window manager?

18

13

Is it possible to have just a browser (for example, just a canvas that renders with webkit) running on top of X11 (or any other way in Linux) as my window manager, as if I'm viewing my normal web browser in fullscreen?

RyanScottLewis

Posted 2010-12-07T20:45:41.803

Reputation: 1 096

there should be a way...you can make a terminal widget background...you might try searching for terminal background on SU....seems like i've seen that before – RobotHumans – 2010-12-07T20:52:15.487

2This kind of single-application setup is often called a “kiosk” setup (“Internet kiosk”, even, when the application is a web browser). – Gilles 'SO- stop being evil' – 2010-12-08T00:31:14.003

This sounds like a neat idea, though. – Nathan Osman – 2010-12-08T03:41:54.817

@Gilles: http://code.google.com/p/chromium/issues/detail?id=23145

– akira – 2010-12-08T04:04:29.597

Answers

20

yes:

% startx /usr/bin/google-chrome --kiosk

(or use any other webbrowser)

you could also add this to your .xinitrc / .xsession file:

exec /usr/bin/google-chrome --kiosk

akira

Posted 2010-12-07T20:45:41.803

Reputation: 52 754

This seems like the best answer. – Anonymous Type – 2010-12-07T21:42:22.090

-start-maximized doesn't seem to be a valid option to Chrome 8.0.522.210 beta. Also, take note of the limitations Chrome seems to have as far as controlling its window size in my answer. – deltaray – 2010-12-07T22:49:34.123

This also breaks for popup windows. – Nathan Osman – 2010-12-08T03:41:37.780

@deltaray: http://peter.sh/experiments/chromium-command-line-switches/ -> --start-maximized is valid, for my 9.x chrome for sure, you can also use --kiosk

– akira – 2010-12-08T03:58:50.837

@George Edison: true, since OP does not want to use a WM that is what you get but a) popups suck anyway b) you have a similar problem running in kiosk/fullscreen mode c) i think OP has something else in mind with the specific 'canvas' part of the question, i do not think any popups will be involved at all – akira – 2010-12-08T04:03:46.633

@akira 9.0 is also currently a beta/dev release. 8.0 is what is currently coming up when you go to "download Chrome normally." How can a GUI app have so many options but still not have a geometry option. That's just ridiculous. – deltaray – 2010-12-08T13:01:43.943

@deltaray: since it is a gtk app it accepts at least "-display" ... maybe "-geometry" is available as well. – akira – 2010-12-08T13:10:06.950

3

Pyro was a short-lived project to build a compositing X11 window manager using Firefox, such that the browser managed the entire desktop.

ephemient

Posted 2010-12-07T20:45:41.803

Reputation: 20 750

This is closest to the answer I was looking for. I see no reason why all desktop applications cannot be backed by HTML5/CSS3/JS. Such applications would be compatible with all operating systems. – RyanScottLewis – 2010-12-13T19:08:08.357

1

Try just put this in your .xinitrc file in your home directory.

exec konqueror

Then restart X. If this doesn't work or if you are using gdm, kdm or xdm as a display manager, you can either shut that off and run startx from the command line or you can create an alternate user and configure their .xinitrc to do the same. Then you can try running startx as that user from a virtual console (Ctrl-Alt + F2). It should open another X session. I noticed when I tried this with Firefox that Firefox wasn't filling the screen even if I used a --geometry option. It seems that Firefox may store its geometry preferences in a session. You may have to deal with this on other programs like Chrome.

Keep in mind that a lot of things that these programs might be expecting things that you'd have in a modern desktop like proxy management, drag and drop or special paste buffer handling.

This is all old hat stuff. I'm sure you have a good purpose for it, but a lot of people probably haven't done this type of stuff since the early 2000s. You used to have to mess with it all the time during the FVWM days (before display managers became popular)

I'd also like to clarify something in your question. The program that you exec like this is not a "window manager". A window manager is a specific program that also gets run by X in this fashion or through a desktop manager and allows you an easy way to run (exec) additional programs, usually decorating them so that you have an interface for closing them. In the early days of X, it would just start an xterm and you would run the command for your window manager from there with an &. So we are making progress. ;-)

Some programs can be run outside of a window manager and still allow you to control their window size or bits of their display. For instance, Google Chrome pseudo decorates its windows. However, I tested Google Chrome and it doesn't have or honor enough standard X options to be a good solution here. For instance, it doesn't seem to handle the --geometry= option (shame on you Google). This is another good reason to use Konqueror or Firefox instead.

Sorry for rambling.

deltaray

Posted 2010-12-07T20:45:41.803

Reputation: 1 665

1

Yes, of course -- you only need a window manager if you want to be able to resize the top-level windows using WM decorations. What you can't do is have two window managers running on the same X display at the same time.

SamB

Posted 2010-12-07T20:45:41.803

Reputation: 971

1

It may be interesting to note that, since ChromeOS/ChromiumOS 19, Aura performs all window management and compositing, built into Chrome/Chromium process itself. It is not a full X11 window manager/compositor, as it only handles content from the browser.

ephemient

Posted 2010-12-07T20:45:41.803

Reputation: 20 750