metisse with vfmg support

Przemysław Iskra sparky at servek.sparky.homelinux.org
Wed Dec 8 00:30:14 CET 2004


This WM is realy cool, but a little slow...
Added vfmg support, menu generated automatically when metisse is
started/restarted

i resend patch for nucleo.spec

one more thing: there should be minversion in R: vfmg but I don't know in
which version there will be support for metisse added


P.S. Please, say something !!! :D


-- 
 ____  Sparky{PI] -- Przemyslaw _  ___  _  _  ..Mail,MSN  LANG...Pl..Ca..Es..En
/____) ___  ___  _ _ || Iskra  |  | _ \| |  | : GG...3228100  WWW..NotYetAvible
\____\| -_)'___| ||^'||//\\// <   |  _/| |  | : JID......sparky<at>jabberes.org
(____/||   (_-_|_||  ||\\ ||   |_ |_|  |_| _| :..sparky<at>sparky.homelinux.org
-------------- next part --------------
# $Revision:$, $Date:$
Summary:	A 3D X Desktop
Summary(pl):	Biurko w 3D
Name:		metisse
Version:	0.3.4
Release:	1
License:	GPL
Group:		X11/Window Managers
Source0:	http://insitu.lri.fr/~chapuis/software/metisse/%{name}-%{version}.tar.bz2
# Source0-md5:	a2a3ef747da4fca36c027e0bbd858673
# Source0-size:	4162155
Source1:	%{name}.desktop
Source2:	%{name}-xsession.desktop
Patch0:		%{name}-locale_names.patch
Patch1:		%{name}-startXwnc.patch
Patch2:		%{name}-vfmg.patch
URL:		http://insitu.lri.fr/~chapuis/metisse/
BuildRequires:	XFree86-OpenGL-devel
BuildRequires:	autoconf
BuildRequires:	automake
BuildRequires:	fribidi-devel
BuildRequires:	gnome-libs-devel
BuildRequires:	libstdc++-devel
BuildRequires:	libstroke-devel
BuildRequires:	nucleo-devel >= 0.1-0.20041130.1
BuildRequires:	readline-devel
BuildRequires:	rplay-devel
Requires:	vfmg
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%define	_wmpropsdir	/usr/share/wm-properties

%description
Metisse is an experimental X desktop with some OpenGL capacity. It
consists of a virtual X server called Xwnc, a special version of FVWM,
and a FVWM module FvwmAmetista. Xwnc is a mix of Xvnc and XDarwin. It
draws nothing on your screen; everything is drawn into pixmaps.
Similarly to Xvnc, but with a different protocol, Xwnc can send these
pixmaps (and other information) to a "viewer". FvwmAmetista is such a
viewer; it uses OpenGL for rendering the X desktop into a window of a
"regular" 3D accelerated X server.

%description -l pl
Metisse to eksperymentalny X desktop z mo?liwo?ciami OpenGL. Sk?ada
si? z wirtualnego serwera o nazwie Xwnc, specialnej wersji FVWM oraz
modu?u FvwmAmetista do FVWM. Xwnc to po??czenie Xvnc i XDarwin. Nie
rysuje nic na ekranie; wszystko jest rysowane do obraz?w.
Podobnie do Xvns, lecz przy u?yciu innego portoko?u, Xwnc wysy?a te
obrazy (i inne informacje) do "przegl?darki". T? przegl?dark? jest
FvwmAmetista; u?ywa OpenGL do wy?wietlania biurka X w oknie "zwyk?ego"
serwera X z akceleracj? 3D.

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
find -name "*sv_SE*" -exec rename sv_SE sv "{}" ";"

%build
%{__aclocal}
%{__autoconf}
%{__automake}
cd fvwm-insitu
%{__aclocal}
%{__autoconf}
%{__automake}
cd ..
%configure \
	--enable-freetype \
%ifarch %{ix86}
	--enable-glx-x86
%else
	--enable-glx
%endif
%{__make}

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_datadir}/xsessions,%{_wmpropsdir}}

%{__make} install \
	DESTDIR=$RPM_BUILD_ROOT

install %{SOURCE1} $RPM_BUILD_ROOT%{_wmpropsdir}
install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/xsessions/%{name}.desktop

%find_lang %{name} --all-name

%clean
rm -rf $RPM_BUILD_ROOT

%files -f %{name}.lang
%defattr(644,root,root,755)
%doc AUTHORS ChangeLog NEWS README TODO
%attr(755,root,root) %{_bindir}/*
%attr(755,root,root) %{_libdir}/*
%{_datadir}/%{name}
%{_datadir}/fvwm-insitu
%{_datadir}/xsessions/%{name}.desktop
%{_wmpropsdir}/%{name}.desktop
%{_mandir}/*/*


%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <feedback at pld-linux.org>
All persons listed below can be reached at <cvs_login>@pld-linux.org

$Log: $

-------------- next part --------------
[Desktop Entry]
Encoding=UTF-8
Name=Metisse
Exec=metisse-start-fvwm
TryExec=metisse-start-fvwm

[Window Manager]
SessionManaged=true
# vi: encoding=utf-8
-------------- next part --------------
[Desktop Entry]
Encoding=UTF-8
Type=XSession
Exec=metisse-start-fvwm
TryExec=metisse-start-fvwm
Name=Metisse
Comment=3D Window Manager
Comment[pl]=Tr??jwymiarowy zarz??dca okien
# vi: encoding=utf-8
-------------- next part --------------
diff -Nur metisse-0.3.3.orig/fvwm-insitu/configure.in metisse-0.3.3/fvwm-insitu/configure.in
--- metisse-0.3.3.orig/fvwm-insitu/configure.in	2004-06-14 14:51:44.000000000 +0200
+++ metisse-0.3.3/fvwm-insitu/configure.in	2004-10-15 12:35:18.075035168 +0200
@@ -803,7 +803,7 @@
 AC_SUBST(FVWM_PERLLIB)
 
 dnl ******* gettext
-ALL_LINGUAS="ar de fr sv_SE zh_CN"
+ALL_LINGUAS="ar de fr sv zh_CN"
 FVWM_DOMAIN="fvwm"
 FVWMTASKBAR_DOMAIN="FvwmTaskBar"
 FVWMSCRIPT_DOMAIN="FvwmScript"

-------------- next part --------------
diff -Nur metisse-0.3.3.orig/bin/metisse-start-fvwm.in metisse-0.3.3/bin/metisse-start-fvwm.in
--- metisse-0.3.3.orig/bin/metisse-start-fvwm.in	2004-06-15 16:30:47.000000000 +0200
+++ metisse-0.3.3/bin/metisse-start-fvwm.in	2004-10-17 02:30:28.710319024 +0200
@@ -14,11 +14,15 @@
     echo "Usage:
 
   metisse-start-fvwm [ options ] -- [FvwmAmetista options] -- [fvwm options]
+         -- [Xwnc options]
 
 metisse-start-fvwm options:
 
   -h        show this help and exit
   -c  path  user fvwm config dir (default ~/.fvwm-metisse)
+  -Xwnc     start Xwnc (if needed) 
+  -killXwnc kill Xwnc when session is closed (and if -Xwnc)
+  -no-Xwnc -no-killXwnc  don't start or kill even if specified in config file
   -wd :x    display number of the Xwnc server (default :1)
   -wh host  the host of the Xwnc server (default 127.0.0.1)
   -wp pass  passowrd for Xwnc (no password by default)
@@ -39,7 +43,25 @@
 
 user_config_dir=$HOME/.fvwm-metisse
 
+startXwnc=yes
+killXwnc=if_start
+XwncConfig=$user_config_dir/XwncConfig
+[ -f $XwncConfig ] && . $XwncConfig
+
 WDPY=":1"
+for Xlock in /tmp/.X*-lock; do
+	if [ -O $Xlock ]; then
+		XPID=$(cat $Xlock)
+		if ps $XPID | grep -q Xwnc; then
+			XWNC_STARTED=1
+			break
+		fi
+	fi
+done
+if [ -n "$XWNC_STARTED" ]; then
+	WDPY="$(ps $XPID | tr " " "\n" | sed -n "/^:[0-9]*$/p")"
+	echo "Xwnc already started on 127.0.0.1$WDPY (PID:"$XPID")"
+fi 
 WHOST="127.0.0.1"
 WPASS="no"
 XWNC_DISPLAY="wnc://$WHOST$WDPY"
@@ -56,6 +78,8 @@
 			whoseArgs="ametista"
 		elif [ "$whoseArgs" = "ametista" ]; then
 			whoseArgs="fvwm"
+		elif [ "$whoseArgs" = "fvwm" ]; then
+			whoseArgs="xwnc"
 		fi
 	;;
 	*)
@@ -75,6 +99,8 @@
 				ametistaArgs="$ametistaArgs $1"
 			;;
 			esac
+		elif [ "$whoseArgs" = "xwnc" ]; then
+			xwncArgs="$xwncArgs $1"
 		else
 			case "$1" in
 			--wdisplay|--wd|-wd)
@@ -104,6 +130,18 @@
 				shift
 				fvwmExe="$1"
 			;;
+			--Xwnc|-Xwnc)
+				startXwnc=yes
+			;;
+			--killXwnc|-killXwnc)
+				killXwnc=if_start
+			;;
+			--no-Xwnc|-no-Xwnc)
+				startXwnc=no
+			;;
+			--no-killXwnc|-no-killXwnc)
+				killXwnc=no
+			;;
 			-r|--r)
 			    reInstallConfig=1
 			;;
@@ -214,6 +252,45 @@
     touch $user_config_dir/.aconfig
 fi
 
+#start Xwnc
+if [ "$startXwnc" == "yes" ]; then
+	XwncConfig=$user_config_dir/XwncConfig
+	[ -f $XwncConfig ] && . $XwncConfig
+	if [ "$WHOST" != "127.0.0.1" ]; then
+		echo "WARNING: -Xwnc option passed, but Xwnc host is not localhost: $WHOST"
+		echo "WARNING: Will not try to start Xwnc"
+	else
+		if [ ! -n "$xwncArgs" ]; then
+			[ -n "$XwncOptions" ] && xwncArgs="$XwncOptions"
+			[ ! -n "$xwncArgs" ] && xwncArgs="-ac"
+		fi
+		echo "$xwncArgs" | egrep -vq ":[0-9]" && \
+			xwncArgs="$xwncArgs $WDPY"
+		
+		if [ -n "$XWNC_STARTED" ]; then
+		  sXwncArgs=$(ps $XPID | sed -n "/Xwnc/{s/^.*Xwnc //;p}"| xargs)
+		  [ "$(echo $xwncArgs | xargs )" != "$sXwncArgs" ] && cat << EOF
+WARNING[Xwnc] Passed Xwnc arguments: $xwncArgs
+WARNING[Xwnc] differs from started Xwnc arguments: $sXwncArgs
+WARNING[Xwnc] but will not start other Xwnc
+EOF
+		else
+		  if [ -e /tmp/.X$(echo $WDPY | cut -c 2-)-lock ]; then
+		    for DPY_for_Xwnc in 1 2 3 4 5 6 7 8; do
+		      if [ ! -e /tmp/.X$DPY_for_Xwnc-lock ]; then
+			xwncArgs="$(echo "$xwncArgs" | \
+				sed "s/$WDPY/:$DPY_for_Xwnc/")"
+		        break
+		      fi
+		    done
+		  fi
+		  echo "Starting Xwnc with args $xwncArgs"
+		  Xwnc $xwncArgs &
+		  [ "$killXwnc" == "if_start" ] && killXwnc=yes
+		fi
+	fi	
+fi
+
 FVWMAMETISTA_ARGS="-d $FVWMAMETISTA_DISPLAY -w $XWNC_DISPLAY $ametistaArgs"
 export FVWMAMETISTA_ARGS
 export METISSE_FVWM_CONFIG_DIR
@@ -221,3 +298,13 @@
 echo "Start fvwmi with args $FVWMAMETISTA_ARGS for FvwmAmetista"
 
 env FVWM_USERDIR=$user_config_dir $fvwmExe -display $FVWM_DISPLAY $fvwmArgs
+
+if [ "$killXwnc" == "yes" ]; then
+	pid=$(cat /tmp/.X$(echo $WDPY | cut -c 2-)-lock)
+	if ps $pid ; then
+		kill -TERM $pid
+		sleep 0.1
+		ps $pid && sleep 3 && ps $pid && \
+			kill -KILL $pid
+	fi
+fi
diff -Nur metisse-0.3.3.orig/FvwmAmetista/config/Makefile.am metisse-0.3.3/FvwmAmetista/config/Makefile.am
--- metisse-0.3.3.orig/FvwmAmetista/config/Makefile.am	2004-01-28 00:03:47.000000000 +0100
+++ metisse-0.3.3/FvwmAmetista/config/Makefile.am	2004-10-17 02:32:24.450723808 +0200
@@ -6,7 +6,7 @@
 configdir = $(METISSE_FVWM_CONFIG_DIR)
 
 CONFIG_FILES = ametistarc applications background bindings bindings-functions \
-	desks extra fonts menus menustyle modules styles
+	desks extra fonts menus menustyle modules styles XwncConfig
 
 config_DATA = scripting.pl config-files-list fvwm2rc $(CONFIG_FILES)
 
diff -Nur metisse-0.3.3.orig/FvwmAmetista/config/XwncConfig metisse-0.3.3/FvwmAmetista/config/XwncConfig
--- metisse-0.3.3.orig/FvwmAmetista/config/XwncConfig	1970-01-01 01:00:00.000000000 +0100
+++ metisse-0.3.3/FvwmAmetista/config/XwncConfig	2004-10-17 02:31:59.613499640 +0200
@@ -0,0 +1,8 @@
+# start Xwnc ? (yes, no) default: yes
+startXwnc=yes
+# Xwnc options ? (Xwnc --help) default: "-ac :1"
+#XwncOptions=
+# kill Xwnc when session ends ? (yes, no, if_start) default: if_start
+# if "no" you can close session and then back without loosing anything
+# (but whis is memory waste)
+killXwnc=if_start
-------------- next part --------------
diff -Nura metisse-0.3.4.orig/FvwmAmetista/config/applications metisse-0.3.4/FvwmAmetista/config/applications
--- metisse-0.3.4.orig/FvwmAmetista/config/applications	2004-11-26 14:41:51.000000000 +0100
+++ metisse-0.3.4/FvwmAmetista/config/applications	2004-12-07 22:46:43.844053192 +0100
@@ -2,23 +2,7 @@
 # Programs menu
 # ---------------------------------------------------------------------------
 
-DestroyMenu AMenuRootProgram
-AddToMenu   AMenuRootProgram "Programs" Title 
-+ "XEmacs"	Exec exec xemacs
-+ "Emacs"	Exec exec emacs
-+ "Gvim"	Exec exec gvim
-+ "" Nop
-+ "SU xterm"	Exec exec xterm -bg blue -fg black -e su -l root
-+ "Xcalc"	Exec exec xcalc
-+ "" Nop
-+ "PDF Viewer"	 FuncFvwmDocView
-+ "Image Viewer" FuncFvwmImage
-+ "Image Editor" FuncFvwm3Image
-+ "" Nop
-+ "Mozilla"	Exec exec mozilla
-+ "Galeon"	Exec exec galeon
-+ "kppp"	Exec exec kppp
-
+PipeRead 'vfmg -c metisse'
 
 # ---------------------------------------------------------------------------
 # Preferred programs by type for a click with mouse 1, 2 or 3 on
diff -Nura metisse-0.3.4.orig/FvwmAmetista/config/menus metisse-0.3.4/FvwmAmetista/config/menus
--- metisse-0.3.4.orig/FvwmAmetista/config/menus	2004-11-22 23:10:03.000000000 +0100
+++ metisse-0.3.4/FvwmAmetista/config/menus	2004-12-07 22:50:04.366569136 +0100
@@ -3,7 +3,7 @@
 
 DestroyMenu AMenuRoot
 AddToMenu   AMenuRoot "Root Menu" Title
-+ "&Programs"		Popup AMenuRootProgram
++ "&Programs"		Popup Applications
 + "&Window Ops"		Popup AMenuWinOps
 + "&Ametista Config"	Popup AMenuConfig
 + "" Nop
-------------- next part --------------
--- SPECS/nucleo.spec	2004-12-06 16:04:37.003984920 +0100
+++ SPECS/nucleo.spec.new	2004-12-06 16:02:22.110561368 +0100
@@ -2,16 +2,16 @@
 Summary:	A toolking for exploring new uses of video
 Summary(pl):	Narz?dzie do odkrywania nowych zastosowa? grafiki
 Name:		nucleo
-#%%define	_tardate	2004-07-11
+#%%define	_tardate	2004-11-16
 #%%define	_snap	%(echo %{_tardate} | sed s/-//g)
-%define		_snap	20040721
+%define		_snap	20041130
 Version:	0.1
 Release:	0.%{_snap}.1
 License:	LGPL
 Group:		X11
 #Source0:	http://insitu.lri.fr/~roussel/software/src/%{name}-%{_tardate}.tar.bz2
 Source0:	http://insitu.lri.fr/~chapuis/software/metisse/%{name}-%{version}-%{_snap}.tar.bz2
-# Source0-md5:	e519537ef61cacad133102cea1e6cd61
+# Source0-md5:	70fae9328b7695c04dd09d5bae6ed11d
 # Source0-size:	665254
 URL:		http://insitu.lri.fr/~roussel/projects/nucleo/
 BuildRequires:	XFree86-OpenGL-devel


More information about the pld-devel-en mailing list