VNC + Emacs *Without* a Window Manager

Ehud Karni ehud "at"
Mon Apr 19 15:09:00 2004

Hash: SHA1

On Sat, 17 Apr 2004 17:17:47 -0400 (EDT), William Hooper <whooper "at"> wrote:
> Another option would be to look at light-weight WMs.  Twm comes to mind.

I use a full screen Emacs without borders/title on VNC using twm for the
window manager.  To resize the emacs window I wrote an Emacs function.
Below are the relevant part of my .twmrc and the emacs defuns.



NoTitle { "TWM Icon Manager" "XClock" "Emacs" "emacs" }


(defun set-frame-value-all (key val)   ;; change frame attribute
   (aput 'initial-frame-alist key val) ;; for ALL frames
   (aput 'default-frame-alist key val)
   (modify-frame-parameters (selected-frame) (list (cons key val))))

(defun configuration-internal (width height)   ;; do for real X only
   (let* ((cng-lst                     ;; List of changes
           (list '(modeline . t)
                 '(mouse-color . "Black")
                 '(minibuffer . t)
                 '(top   .   0)        ;; top most
                 '(left  .   0)        ;; left most
                 (cons 'width  width)  ;; chars
                 (cons 'height height) ;; chars
                 '(icon-type . t)))
         key val)
       (while cng-lst
           (setq key (car cng-lst))
           (setq cng-lst (cdr cng-lst))
           (setq val (cdr key))
           (setq key (car key))
           (set-frame-value-all key val))))

(defun configuration-laptop ()         ;; set for 800x600 (laptop screen)
       (configuration-internal 100 46))

(defun configuration-full ()           ;; do for full vnc screen
       (configuration-internal 143 69))

- --
 Ehud Karni           Tel: +972-3-7966-561  /"\
 Mivtach - Simon      Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D <>    Better Safe Than Sorry
Comment: use to get my key (and others)