Question

I'm trying to use emacs in fullscreen mode with a decent font. I have an nvidia-based laptop running Ubuntu. When it first loads, the font is huge think 16pt font. I used the menu options to set a decent font (8pt).

Now when I run emacs in fullscreen mode, it adjusts the window sort of for the huge font then loads my 8pt font. Now half of my screen is the minibuffer. How do I correctly set the font so that I can use fullscreen mode.

I have tried specifying displaysize in my x config and X does not start. I hear theres something else you need to do for nvidia drivers... but not sure how that works.

Was it helpful?

Solution

I use the following (from http://www.emacswiki.org/emacs/FullScreen) in my .emacs:

(defun toggle-fullscreen (&optional f)
  (interactive)
  (let ((current-value (frame-parameter nil 'fullscreen)))
    (set-frame-parameter nil 'fullscreen
                         (if (equal 'fullboth current-value)
                             (if (boundp 'old-fullscreen) old-fullscreen nil)
                           (progn (setq old-fullscreen current-value)
                                  'fullboth)))))

(global-set-key [f11] 'toggle-fullscreen)

;; Make new frames fullscreen by default. Note: this hook doesn't do
;; anything to the initial frame if it's in your .emacs, since that file is
;; read _after_ the initial frame is created.
(add-hook 'after-make-frame-functions 'toggle-fullscreen)

Then F11 will toggle fullscreen on/off.

OTHER TIPS

This is tough since I can't replicate the problem on my machine. I just add -fs and it seems to work. If you just want more real estate... do these work for you:

  • ditch the menu/toolbar
    • add (menu-bar-mode 0) and (tool-bar-mode 0) to .emacs
    • start up and maximze
    • you should just have the regular DE frame but nothing else
    • toggle from emacs using M-x menu-bar-mode and M-x tool-bar-mode as needed

  • manually fullscreen emacs
    • I can just start emacs, right click the window bar and choose fullscreen from xfce
    • I have F11 set to do this, but it doesn't seem to work from emacs (emacs seems to try and interpret it as a key binding rather than passing the key to the DE)
    • if this works, perhaps find a binding in your DE that emacs doesn't care about and just maximize normally

  • combine the two
    • I start emacs regularly (/usr/bin/emacs)
    • I disabled both tool-bar-mode and menu-bar-mode disabled
    • I manually fullscreen with a right mouse click on the window bar
    • I get THIS
    • that's the entire screen, not just a shot of the window contents

What do you think of those ideas? Sorry I can't help more with Ubuntu and/or nvidia. No experience and tough if one can't replicate the problem! Maybe if emacs starts regularly for you the above can help achieve close (or fully) what you're hoping for.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top