Bug 3845 - razorqt pkg ships non-mga session .desktop files instead of wmsession files
Summary: razorqt pkg ships non-mga session .desktop files instead of wmsession files
Status: RESOLVED DUPLICATE of bug 3831
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Matteo Pasotti
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-21 21:48 CET by Anssi Hannula
Modified: 2011-12-22 14:34 CET (History)
1 user (show)

See Also:
Source RPM: razorqt
CVE:
Status comment:


Attachments

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


Note You need to log in before you can comment on or make changes to this bug.