Bug 3845

Summary: razorqt pkg ships non-mga session .desktop files instead of wmsession files
Product: Mageia Reporter: Anssi Hannula <anssi.hannula>
Component: RPM PackagesAssignee: Matteo Pasotti <matteo.pasotti>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: Normal CC: n54
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: razorqt CVE:
Status comment:

Description Anssi Hannula 2011-12-21 21:48:42 CET
RazorQT pkg doesn't use the mga wmsession.d system for its session files, instead it ships them directly in various locations. This causes razorqt to be missing in e.g. GDM.

One option is to create the proper wmsession.d files automatically from the .desktop files of RazorQT and then remove the .desktop files. This is what I used in a local razorqt package:

#========================================
# Here we transform .desktop files to wmsession files, which chksession
# will again transform back to .desktop files :)
mkdir -p %{buildroot}%{_sysconfdir}/X11/wmsession.d
for file in %{buildroot}%{_datadir}/xsessions/*.desktop; do
	name="$(sed -n 's,^Name=,,p' "$file")"
	comment="$(sed -n 's,^Comment=,,p' "$file")"
	tryexec="$(sed -n 's,^TryExec=,,p' "$file")"
	exec="$(sed -n 's,^Exec=,,p' "$file")"

	[ -n "$name" ] && [ -n "$comment" ] && [ -n "$exec" ] || exit 1

	# EXEC needs to be absolute for chksession
	case $tryexec in
	*/*)	;;
	*)	tryexec=%{_bindir}/$tryexec;;
	esac

	outfile=%{buildroot}%{_sysconfdir}/X11/wmsession.d/05$(basename $file .desktop)

	echo "NAME=$name" > $outfile
	[ -n "$tryexec" ] && echo "EXEC=$tryexec" >> $outfile
	echo "DESC=$comment" >> $outfile
	echo "SCRIPT:" >> $outfile
	echo "exec $exec" >> $outfile

	rm -f $file %{buildroot}%{_datadir}/apps/kdm/sessions/$(basename $file)
done
#=======================

With this in %install, razorqt entries will actually appear in all login managers, including GDM.
Comment 1 Kamil Rytarowski 2011-12-22 14:34:46 CET
Marked as a duplicate

*** This bug has been marked as a duplicate of bug 3831 ***

Status: NEW => RESOLVED
CC: (none) => n54
Resolution: (none) => DUPLICATE