3

Is it possible to make Xfce window manager to open certain applications fullscreen by default? For example i want Emacs in Xfce to be always run fullscreen on start. I know how to execute specifically Emacs fullscreen, so i want an Xfce solution.

I tried searching through Xfce wiki, Xfce page on Arch wiki and Unix.SE with AskUbuntu, no solution yet.

3

Use gdevilspie to match it, that actually works cross DEs

enter image description here

0

Looks to me like emacs has a --fullscreen switch, so just append that to the Exec for the menu entry.

http://linux.die.net/man/1/emacs

Editing xfce menu entry example:

http://forum.xfce.org/viewtopic.php?pid=23486

  • Your solution is helpful, but if i want to specify this from Xfce side, not from application side? I edited my question in accordance. – Mirzhan Irkegulov Oct 19 '12 at 7:48
  • @sindikat: From what I know of window managers, Xlib (I've done some programming in this area), and their relationship to applications, the window manager can't fullscreen something except by A) Using means supplied by the application, ie, --fullscreen, B) Doing something with the window geometry, however, that will not be the same as fullscreen mode (it will be window that fills the screen INCLUDING border and window). I'm very confused as to why you do not just want to do this in the normal way, actually; I think you are looking for a sort of illogical phantasm ;) – goldilocks Oct 19 '12 at 11:48
  • Basically: it is the application that provides fullscreen mode, not the wm. Notice that not all applications have such a mode. The wm can maximize a window, but it is not intended, eg, for you to say "start emacs in whatever mode, load some files, run this emacs script, etc" except in so far as the application provides invocation mechanisms to do this eg, "emacs --fullscreen --load=/some/file --run=/some/script". – goldilocks Oct 19 '12 at 11:59
  • can you incorporate that in the answer please? – Mirzhan Irkegulov Oct 19 '12 at 12:23
  • sindikat: I think you are confused and it is impossible for me to discern what exactly it is you don't understand (and what you want me to add). Basically my point was: the original answer IS the answer, there aren't any others. You use Xfce (or some other software, such as warl0ck suggests) to add the --fullscreen switch to emacs. That's it. That's all. There is no other way. Your distinction between "the Xfce side" and "the application side" is non-sensical. Besides editing an xfce menu entry as suggested, what exactly would count as "the xfce side"? – goldilocks Oct 20 '12 at 12:39
0

Emacs does understand X resources, so this is a working solution for X in general, not only in Xfce. (This is however not true for any program; for example, xfce4-terminal cannot be controlled this way.) The X resources can be viewed by xrdb -query.

To achieve what you want, I have put into /etc/X11/Xresources-site (/etc/X11/Xresources is also OK, though can be overwritten by your distro):

Emacs.fullscreen: maximized

This would affect also remote X clients which are Emacs (e.g., emacs started on a remote host via ssh).

/etc/X11/Xresources-site and /etc/X11/Xresources (and probably ~/.Xresources and ~/.Xdefaults) are usually read at the start of your X session; to affect your current X resources immediately, run something like xrdb -merge /etc/X11/Xresources-site.

Actually, in my case, /etc/X11/Xresources-site is being read thanks to a line in /etc/X11/Xresources (which is read by the start scripts):

#include "/etc/X11/Xresources-site"

so /etc/X11/Xresources is read for sure.

There are also some files with the same syntax which are read each time an X program like emacs starts. In my case, they are: ~/.Xdefaults-MY_HOST_NAME, /etc/X11/app-defaults/Emacs (only for emacs-athena, not for emacs-gtk3), /usr/share/X11/app-defaults/Emacs etc. (But I like the idea of loaded X resources more -- shown with xrdb -query; so that remote X clients read the same X resources.)

Other X resources which Emacs understands are described at https://www.gnu.org/software/emacs/manual/html_node/emacs/Table-of-Resources.html#Table-of-Resources.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.