Discussion:
Sawfish root menu without Quit !
(too old to reply)
José Romildo Malaquias
2002-03-13 21:49:29 UTC
Permalink
Hello.

I am running sawfish in my Red Hat Linux 7.2 in box. The window
manager is being started from my ~/.Xclients file:

[...]
gkrellm &
exec sawfish
[...]
The root menu (activated with the midle mouse button) does not
include the "Quit" entry. It has only the entries: Windows,
Workspaces, Programs, Customize and Help. How am I supposed
to quit the window manager? The problem arises because I
am not running GNOME. If so, I could just choose the "Log out"
entry in the GNOME menu.

Maybe Red Hat has pre-configured sawfish to eliminate the
"Quit" entry from its root menu. How can I get it back so
that I can cleanly close sawfish?

Thanks.

Romildo
--
Prof. José Romildo Malaquias Departamento de Computação
http://iceb.ufop.br/~romildo Universidade Federal de Ouro Preto
***@iceb.ufop.br Brasil
***@uber.com.br
Havoc Pennington
2002-03-13 22:33:55 UTC
Permalink
Post by José Romildo Malaquias
I am running sawfish in my Red Hat Linux 7.2 in box. The window
[...]
gkrellm &
exec sawfish
[...]
The root menu (activated with the midle mouse button) does not
include the "Quit" entry. It has only the entries: Windows,
Workspaces, Programs, Customize and Help. How am I supposed
to quit the window manager? The problem arises because I
am not running GNOME. If so, I could just choose the "Log out"
entry in the GNOME menu.
Maybe Red Hat has pre-configured sawfish to eliminate the
"Quit" entry from its root menu. How can I get it back so
that I can cleanly close sawfish?
I thought we did remove that menu item, and it isn't there, but I
can't find the change anywhere in the RPM. And the Quit menu item is
in the source code even after rpm -bp. So I have no idea how it ends
up being removed, so I can't tell you how to get it back.

Havoc
Michal Jaegermann
2002-03-13 23:02:16 UTC
Permalink
Post by Havoc Pennington
Post by José Romildo Malaquias
The root menu (activated with the midle mouse button) does not
include the "Quit" entry.
I thought we did remove that menu item, and it isn't there, but I
can't find the change anywhere in the RPM. And the Quit menu item is
in the source code even after rpm -bp. So I have no idea how it ends
up being removed, so I can't tell you how to get it back.
Havoc
It is pretty easy to add this, and "Restart", from your ~/.sawfishrc.
I have such line there:

(load "~/.sawfish/sawfishmenu" t t t)

as I do not want to clutter .sawfishrc with too many things,
and in ~/.sawfish/sawfishmenu, as one of items, such code:

;; add Restart and Quit menu entries but use Gnome-quit if running
;; with a full Gnome session

(if (getenv "GDMSESSION")
(cond
((string-equal (getenv "GDMSESSION") "Sawfish")
(setq root-menu (append root-menu '(
()
("Restart" restart)
("Quit" quit)
))))
((string-equal (getenv "GDMSESSION") "Gnome")
(setq root-menu (append root-menu '(
()
("Restart" restart)
))))
((string-equal (getenv "GDMSESSION") "Default")
(setq root-menu (append root-menu '(
()
("Restart" restart)
))))
)
;; else clause - not GDMSESSION
(setq root-menu (append root-menu '(
()
("Restart" restart)
("Quit" quit)
)))
)

Maybe can be done simpler but so far it works for me. As you can see
this presumes that gdm is usually used as a login manager. Adjust
accordingly if you are using something else.

Michal
merlin
2002-03-13 23:04:01 UTC
Permalink
Post by Havoc Pennington
Post by José Romildo Malaquias
I am running sawfish in my Red Hat Linux 7.2 in box. The window
[...]
gkrellm &
exec sawfish
[...]
The root menu (activated with the midle mouse button) does not
include the "Quit" entry. It has only the entries: Windows,
Workspaces, Programs, Customize and Help. How am I supposed
to quit the window manager? The problem arises because I
am not running GNOME. If so, I could just choose the "Log out"
entry in the GNOME menu.
Maybe Red Hat has pre-configured sawfish to eliminate the
"Quit" entry from its root menu. How can I get it back so
that I can cleanly close sawfish?
I thought we did remove that menu item, and it isn't there, but I
can't find the change anywhere in the RPM. And the Quit menu item is
in the source code even after rpm -bp. So I have no idea how it ends
up being removed, so I can't tell you how to get it back.
Havoc
The problem (as far as I understand it) is that the logic to determine
whether or not gnome is present (sawfish.wm.defaults) is a bit bogus; it
greps for GNOME_ in the root window's property names, which can trigger if
a gnome app is run before sawfish, even if you're not running the full
gnome environment. However, it is highly probably that you will want
the gnome state integration, even if you're not doing the full gnome
experience.

The fix that I have is the following in .sawfish/rc (or .sawfishrc).

; unconditionally require integration; we always want it
(require 'sawfish.wm.gnome.integration)
; add back Quit
(require 'sawfish.wm.menus)
(require 'sawfish.wm.misc)
(nconc root-menu `(() (,(_ "Restart") restart) (,(_ "Quit") quit)))

I personally think it's almost a bug that gnome integration is optional;
it does a lot more than the name casually suggests.

merlin
--
"Whenever you cross swords with an enemy you must not think of cutting him
either strongly or weakly; just think of cutting and killing him. Be intent
solely upon killing the enemy." - Miyamoto Musashi
José Romildo Malaquias
2002-03-14 02:07:37 UTC
Permalink
Post by merlin
Post by Havoc Pennington
Post by José Romildo Malaquias
I am running sawfish in my Red Hat Linux 7.2 in box. The window
[...]
gkrellm &
exec sawfish
[...]
The root menu (activated with the midle mouse button) does not
include the "Quit" entry. It has only the entries: Windows,
Workspaces, Programs, Customize and Help. How am I supposed
to quit the window manager? The problem arises because I
am not running GNOME. If so, I could just choose the "Log out"
entry in the GNOME menu.
Maybe Red Hat has pre-configured sawfish to eliminate the
"Quit" entry from its root menu. How can I get it back so
that I can cleanly close sawfish?
I thought we did remove that menu item, and it isn't there, but I
can't find the change anywhere in the RPM. And the Quit menu item is
in the source code even after rpm -bp. So I have no idea how it ends
up being removed, so I can't tell you how to get it back.
Havoc
The problem (as far as I understand it) is that the logic to determine
whether or not gnome is present (sawfish.wm.defaults) is a bit bogus; it
greps for GNOME_ in the root window's property names, which can trigger if
a gnome app is run before sawfish, even if you're not running the full
gnome environment. However, it is highly probably that you will want
the gnome state integration, even if you're not doing the full gnome
experience.
The problem persists even without any GNOME application being started.
As was pointed by others, the menu entry "Customize -> Miscellaneous"
opens a configuration window with the option "Invoke the GNOME control
center from the 'Customize' menu", which is selected by default
in my system. Deselecting it removes GNOME integration, giving back
the Restart and Quit entries in the root menu, but loosing the
GNOME menu entries in the Programs submenu. Related to this
setting, there is a line in the ~/.sawfish/custom file:

(custom-set-typed-variable (quote gnome-use-capplet) (quote t) (quote boolean) (quote sawfish.wm.gnome.integration))
Post by merlin
The fix that I have is the following in .sawfish/rc (or .sawfishrc).
; unconditionally require integration; we always want it
(require 'sawfish.wm.gnome.integration)
; add back Quit
(require 'sawfish.wm.menus)
(require 'sawfish.wm.misc)
(nconc root-menu `(() (,(_ "Restart") restart) (,(_ "Quit") quit)))
That is what I did, and I have also disabled the "gnome-use-capplet" feature
as described above. Now it is working as I expected.
Post by merlin
I personally think it's almost a bug that gnome integration is optional;
it does a lot more than the name casually suggests.
Thanks.

Romildo
--
Prof. José Romildo Malaquias Departamento de Computação
http://iceb.ufop.br/~romildo Universidade Federal de Ouro Preto
***@iceb.ufop.br Brasil
***@uber.com.br
John Harper
2002-03-14 02:39:28 UTC
Permalink
José Romildo Malaquias writes:
|As was pointed by others, the menu entry "Customize -> Miscellaneous"
|opens a configuration window with the option "Invoke the GNOME control
|center from the 'Customize' menu", which is selected by default
|in my system. Deselecting it removes GNOME integration, giving back
|the Restart and Quit entries in the root menu, but loosing the

Ouch. That's a side-effect I'd never noticed before. I'm not sure how
to fix it without sacrificing backwards compatibility though..

I've logged it as bug #74594..

John

Claudio Bley
2002-03-13 22:58:31 UTC
Permalink
José> Maybe Red Hat has pre-configured sawfish to eliminate the
José> "Quit" entry from its root menu. How can I get it back so
José> that I can cleanly close sawfish?

Add these lines to your ~/.sawfishrc:

(nconc root-menu
`(()
(,(_ "Restart") restart)
(,(_ "Quit") quit)))

Alternatively, make sure sawfish.wm.gnome.integration (which removes
these menu items) is not loaded (or comment out the relevant section
there and recompile). Usually it is loaded from sawfish.wm.defaults.

Claudio
José Romildo Malaquias
2002-03-14 01:57:17 UTC
Permalink
Post by José Romildo Malaquias
Maybe Red Hat has pre-configured sawfish to eliminate the
"Quit" entry from its root menu. How can I get it back so
that I can cleanly close sawfish?
Disable the usage of gnome control center as configuration method
(Invoke the GNOME control center from the `Customize' menu. option
under Misc section) and that should make it go into wm alone mode (a
That works, but the GNOME menu (under the Programs submenu) is
lost as a consequence.
I think it is Sawfish plain code. I did some greps, checked my own
config and I think I have an idea of what is. In you custom file or in
the defaults custom file there is a line that enables the gnome
integration code, and that integration code removes quit and restart.
Check if you have (custom-set-typed-variable (quote gnome-use-capplet)
(quote t) (quote boolean) (quote gnome-int)) in ~/.sawfish/custom. If
so, make a backup copy of the file and remove that text in the working
copy you leave, then restart. The method of first paragraph should do
that for you, but you could need to get a bit dirty and clean up the
config file by hand.
Third option is to build a full menu by yourself or add things to
current menu by hand.
If problems, mail back.
As I want to preserve the GNOME menu, I just add the Restart and Quit
entries to the menu, as was sugested by others. The line below was
added to ~/.sawfish/rc

(nconc root-menu `(() (,(_ "Restart") restart) (,(_ "Quit") quit)))

Thanks.

Romildo
--
Prof. José Romildo Malaquias Departamento de Computação
http://iceb.ufop.br/~romildo Universidade Federal de Ouro Preto
***@iceb.ufop.br Brasil
***@uber.com.br
Continue reading on narkive:
Loading...