From 4e0a4fb53b859d818a4184564a441fce29c12be0 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Tue, 8 Dec 2009 15:18:57 -0500 Subject: Make openbox-gnome-session work with gnome-session > 2.22 --- data/xsession/openbox-gnome-session.in | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'data') diff --git a/data/xsession/openbox-gnome-session.in b/data/xsession/openbox-gnome-session.in index 278ac6a8..d93bab0c 100644 --- a/data/xsession/openbox-gnome-session.in +++ b/data/xsession/openbox-gnome-session.in @@ -7,6 +7,27 @@ if test -n "$1"; then exit fi +VER=$(gnome-session --version 2>/dev/null | \ + sed -e 's/[^0-9.]*\([0-9.]\+\)/\1/') + +MAJOR=$(echo $VER | cut -d . -f 1) +MINOR=$(echo $VER | cut -d . -f 2) + # Run GNOME with Openbox as its window manager export WINDOW_MANAGER="@bindir@/openbox" -exec gnome-session --choose-session=openbox-session "$@" + +if test $MAJOR -lt 2 || (test $MAJOR = 2 && test $MINOR -le 22); then + # old gnome-session allows multiple sessions to be saved + exec gnome-session --choose-session=openbox-session "$@" +else + # make sure the gnome-wm script is being used + gconftool-2 -t string \ + -s /desktop/gnome/session/required_components/windowmanager "gnome-wm" \ + 2> /dev/null + + # new gnome-session does not allow multiple sessions + exec gnome-session "$@" +fi + + + -- cgit v1.2.3 From 5290af9f50c8492398e9f1c61be8f659106bc591 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 9 Dec 2009 10:23:00 -0500 Subject: Use test -r instead of test -e for solaris. Fixes bug #4253. --- data/xsession/openbox-session.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'data') diff --git a/data/xsession/openbox-session.in b/data/xsession/openbox-session.in index 259dc580..7c3daa73 100644 --- a/data/xsession/openbox-session.in +++ b/data/xsession/openbox-session.in @@ -10,10 +10,10 @@ fi AUTOSTART="${XDG_CONFIG_HOME:-"$HOME/.config"}/openbox/autostart.sh" GLOBALAUTOSTART="@configdir@/openbox/autostart.sh" -if test -e $AUTOSTART; then +if test -r $AUTOSTART; then . $AUTOSTART else - if test -e $GLOBALAUTOSTART; then + if test -r $GLOBALAUTOSTART; then . $GLOBALAUTOSTART fi fi -- cgit v1.2.3 From e0015160f0bc79ef0ad2de1ad7cc9bb389ccddc9 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 9 Dec 2009 15:41:28 -0500 Subject: Make the default placement on the active monitor (Any is madness) --- data/rc.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data') diff --git a/data/rc.xml b/data/rc.xml index ebe2f310..d5d3eafa 100644 --- a/data/rc.xml +++ b/data/rc.xml @@ -35,7 +35,7 @@
yes
- Any + Active -- cgit v1.2.3 From aa329719b99792a624449b2448abee9e2c67ce94 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 9 Dec 2009 16:41:52 -0500 Subject: Add a primaryMonitor config option, where the focus-cycle and keychain popups will appear --- data/rc.xml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'data') diff --git a/data/rc.xml b/data/rc.xml index d5d3eafa..8f5ee28b 100644 --- a/data/rc.xml +++ b/data/rc.xml @@ -39,6 +39,12 @@ + 1 + -- cgit v1.2.3 From f0df9bb9d8f4f8182e60996d92a7b0e47549a0f6 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 10 Dec 2009 10:07:50 -0500 Subject: Remove desktop hints since Openbox won't overwrite them, but they may be set from GDM or other sessions --- data/xsession/openbox-gnome-session.in | 5 +++++ data/xsession/openbox-kde-session.in | 5 +++++ data/xsession/openbox-session.in | 5 +++++ 3 files changed, 15 insertions(+) (limited to 'data') diff --git a/data/xsession/openbox-gnome-session.in b/data/xsession/openbox-gnome-session.in index d93bab0c..86b7d06f 100644 --- a/data/xsession/openbox-gnome-session.in +++ b/data/xsession/openbox-gnome-session.in @@ -7,6 +7,11 @@ if test -n "$1"; then exit fi +# Clean up after GDM +xprop -root -remove _NET_NUMBER_OF_DESKTOPS \ + -remove _NET_DESKTOP_NAMES \ + -remove _NET_CURRENT_DESKTOP 2> /dev/null + VER=$(gnome-session --version 2>/dev/null | \ sed -e 's/[^0-9.]*\([0-9.]\+\)/\1/') diff --git a/data/xsession/openbox-kde-session.in b/data/xsession/openbox-kde-session.in index 16017260..5299b045 100644 --- a/data/xsession/openbox-kde-session.in +++ b/data/xsession/openbox-kde-session.in @@ -7,6 +7,11 @@ if test -n "$1"; then exit fi +# Clean up after GDM +xprop -root -remove _NET_NUMBER_OF_DESKTOPS \ + -remove _NET_DESKTOP_NAMES \ + -remove _NET_CURRENT_DESKTOP 2> /dev/null + # Run KDE with Openbox as its window manager export KDEWM="@bindir@/openbox" exec startkde "$@" diff --git a/data/xsession/openbox-session.in b/data/xsession/openbox-session.in index 7c3daa73..fa1bb996 100644 --- a/data/xsession/openbox-session.in +++ b/data/xsession/openbox-session.in @@ -7,6 +7,11 @@ if test -n "$1"; then exit fi +# Clean up after GDM +xprop -root -remove _NET_NUMBER_OF_DESKTOPS \ + -remove _NET_DESKTOP_NAMES \ + -remove _NET_CURRENT_DESKTOP 2> /dev/null + AUTOSTART="${XDG_CONFIG_HOME:-"$HOME/.config"}/openbox/autostart.sh" GLOBALAUTOSTART="@configdir@/openbox/autostart.sh" -- cgit v1.2.3 From d17bc61b2434838c2105bf5c5012bcf4e404f6b1 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 10 Dec 2009 10:10:03 -0500 Subject: Don't need 2 exit actions in the default menu now, they both would do the same thing --- data/menu.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'data') diff --git a/data/menu.xml b/data/menu.xml index 61fba664..39da04d6 100644 --- a/data/menu.xml +++ b/data/menu.xml @@ -369,11 +369,6 @@ - - - yes - - @@ -390,7 +385,7 @@ - + yes -- cgit v1.2.3 From c5155e7422668f6a176c15f2cecac6693fcf3134 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 10 Dec 2009 10:27:54 -0500 Subject: Add an openbox.desktop file for the applications/ directory This is for gnome-session to start Openbox correctly as the window manager See the commit log for http://cvs.fedoraproject.org/viewvc/devel/openbox/openbox.desktop?revision=1.3&view=markup --- data/openbox.desktop | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 data/openbox.desktop (limited to 'data') diff --git a/data/openbox.desktop b/data/openbox.desktop new file mode 100644 index 00000000..9c19e67e --- /dev/null +++ b/data/openbox.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Application +Encoding=UTF-8 +Name=Openbox +Exec=openbox +Icon=openbox +NoDisplay=true +# name we put on the WM spec check window +X-GNOME-WMName=Openbox +X-GNOME-Autostart-Phase=WindowManager +X-GNOME-Provides=windowmanager +X-GNOME-Autostart-Notify=true -- cgit v1.2.3 From 7e6ef2683f68d0b8cf75d4ebb6a778cd87288d7f Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 10 Dec 2009 11:44:28 -0500 Subject: Run Openbox with gnome-session the proper way, without using the deprecated gnome-wm. See https://bugzilla.gnome.org/show_bug.cgi?id=555406#c5 Hopefully this continues to work for a while. --- data/xsession/openbox-gnome-session.in | 42 ++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 10 deletions(-) (limited to 'data') diff --git a/data/xsession/openbox-gnome-session.in b/data/xsession/openbox-gnome-session.in index 86b7d06f..de46bec5 100644 --- a/data/xsession/openbox-gnome-session.in +++ b/data/xsession/openbox-gnome-session.in @@ -18,20 +18,42 @@ VER=$(gnome-session --version 2>/dev/null | \ MAJOR=$(echo $VER | cut -d . -f 1) MINOR=$(echo $VER | cut -d . -f 2) -# Run GNOME with Openbox as its window manager -export WINDOW_MANAGER="@bindir@/openbox" +# run GNOME with Openbox as its window manager if test $MAJOR -lt 2 || (test $MAJOR = 2 && test $MINOR -le 22); then - # old gnome-session allows multiple sessions to be saved + # old gnome-session was easy to work with + export WINDOW_MANAGER="@bindir@/openbox" exec gnome-session --choose-session=openbox-session "$@" else - # make sure the gnome-wm script is being used - gconftool-2 -t string \ - -s /desktop/gnome/session/required_components/windowmanager "gnome-wm" \ - 2> /dev/null - - # new gnome-session does not allow multiple sessions - exec gnome-session "$@" + # new gnome-session requires openbox to be set in gconf and an + # openbox.desktop to be installed in the applications directory + + SPATH=/desktop/gnome/session + + # get the current default session + SESSION=$(gconftool-2 -g $SPATH/default_session 2> /dev/null) + + # make sure openbox is going to be run + if test -z "$SESSION"; then + # if its empty then just run openbox + SESSION="[openbox]" + elif test -z $(echo "$SESSION" | grep -q openbox); then + # if openbox isn't in the session then append it + SESSION="${SESSION%]},openbox]" + fi + + # get the current GNOME/Openbox session + OB_SESSION=$(gconftool-2 -g $SPATH/openbox_session 2> /dev/null) + + # update the GNOME/Openbox session if needed + if x$OB_SESSION != x$SESSION; then + # the default session changed or we didn't run GNOME/Openbox before + gconftool-2 -t list --list-type=strings -s $SPATH/openbox_session \ + "$SESSION" 2> /dev/null + fi + + # run GNOME/Openbox + exec gnome-session --default-session-key $SPATH/openbox_session "$@" fi -- cgit v1.2.3