Bug 192783 - x11/slim does not support UTF-8 characters input
Summary: x11/slim does not support UTF-8 characters input
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Some People
Assignee: John Marino
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-18 13:44 UTC by DaLynX
Modified: 2014-09-20 19:08 UTC (History)
2 users (show)

See Also:


Attachments
Proposed patches (10.43 KB, application/zip)
2014-08-18 13:44 UTC, DaLynX
no flags Details
const.h patch (242 bytes, patch)
2014-08-18 18:46 UTC, DaLynX
no flags Details | Diff
main.cpp patch (321 bytes, patch)
2014-08-18 18:46 UTC, DaLynX
no flags Details | Diff
panel.cpp patch (18.61 KB, patch)
2014-08-18 18:47 UTC, DaLynX
no flags Details | Diff
panel.h patch (1.88 KB, patch)
2014-08-18 18:47 UTC, DaLynX
no flags Details | Diff
slimlock.cpp patch (1.15 KB, patch)
2014-08-18 18:48 UTC, DaLynX
no flags Details | Diff
switchuser.h patch (330 bytes, patch)
2014-08-18 18:48 UTC, DaLynX
no flags Details | Diff
util.cpp patch (5.59 KB, patch)
2014-08-18 18:48 UTC, DaLynX
no flags Details | Diff
util.h patch (623 bytes, patch)
2014-08-18 18:49 UTC, DaLynX
no flags Details | Diff
Port patch proposal (33.79 KB, patch)
2014-08-18 19:16 UTC, DaLynX
no flags Details | Diff
Port patch proposal (31.14 KB, patch)
2014-08-18 19:51 UTC, DaLynX
no flags Details | Diff
New patch (34.07 KB, patch)
2014-08-29 02:17 UTC, Henry Hu
henry.hu.sh: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description DaLynX 2014-08-18 13:44:00 UTC
Created attachment 145959 [details]
Proposed patches

The x11/slim graphical login manager does not support UTF-8 encoded input for username and password.

For instance, nothing appears when typing accentuated characters on a french keyboard layout with UTF-8 encoding(set through hal).

Some users may want to use characters outside the ASCII charset for stronger passwords.

I found patches in an linux Arch User Repository (https://aur.archlinux.org/packages/slim-unicode/) that proved to work on port slim-1.3.6_2.

Here are the patches adapted in the FreeBSD ports patch format.
Comment 1 John Marino freebsd_committer freebsd_triage 2014-08-18 18:39:01 UTC
can you upload the patches again in a text/plain diff format?
Comment 2 DaLynX 2014-08-18 18:46:01 UTC
Created attachment 145990 [details]
const.h patch
Comment 3 DaLynX 2014-08-18 18:46:20 UTC
Created attachment 145992 [details]
main.cpp patch
Comment 4 DaLynX 2014-08-18 18:47:20 UTC
Created attachment 145993 [details]
panel.cpp patch
Comment 5 DaLynX 2014-08-18 18:47:40 UTC
Created attachment 145994 [details]
panel.h patch
Comment 6 DaLynX 2014-08-18 18:48:02 UTC
Created attachment 145995 [details]
slimlock.cpp patch
Comment 7 DaLynX 2014-08-18 18:48:24 UTC
Created attachment 145996 [details]
switchuser.h patch
Comment 8 DaLynX 2014-08-18 18:48:42 UTC
Created attachment 145997 [details]
util.cpp patch
Comment 9 John Marino freebsd_committer freebsd_triage 2014-08-18 18:49:01 UTC
ack, no!

I meant a diff file to add patches to the port.  ONE file.
Comment 10 DaLynX 2014-08-18 18:49:13 UTC
Created attachment 145998 [details]
util.h patch
Comment 11 John Marino freebsd_committer freebsd_triage 2014-08-18 18:50:05 UTC
you are providing patches to the s/w.
You need to prove a diff to the port itself.
Comment 12 DaLynX 2014-08-18 18:51:14 UTC
Woops sorry.

I'll have a look at that.
Comment 13 DaLynX 2014-08-18 19:16:14 UTC
Created attachment 146000 [details]
Port patch proposal
Comment 14 John Marino freebsd_committer freebsd_triage 2014-08-18 19:35:18 UTC
much better, but can I ask one more favor?

Since you generated this with svn patch, can you create a new version with "--patch-compatible" switch?  the bugzilla diff view chokes on regular svn patches.
Comment 15 DaLynX 2014-08-18 19:51:38 UTC
Created attachment 146003 [details]
Port patch proposal

Generated with SVN --patch-compatible
Comment 16 John Marino freebsd_committer freebsd_triage 2014-08-18 20:01:46 UTC
It's a pity, after all that, the diff viewer still won't show it.  Oh well, we have to review it the old fashioned way.

Moving this PR to "Approval Needed" status.  The maintainer has 2 weeks to approve it, otherwise it's automatically approved.

Note, this needs a portrevision increment in the Makefile.
Comment 17 Henry Hu 2014-08-22 06:01:11 UTC
Comment on attachment 146003 [details]
Port patch proposal

I've read the patch and it seems ok. However, I'm not sure that we should enable it by default, because for most users it is not useful. Because we can't have an input method running with slim, for the users who require an input method to input non-ascii characters in their languages, this is also not useful.
For the patch itself, I'm not sure why it uses char uint16_t* instead of wstring. The logic seems ok, although I'm not sure whether it would introduce security or reliability problems.
I think that we can create an option for this patch, and disable it by default. What do you think?
Comment 18 DaLynX 2014-08-22 10:45:48 UTC
Sounds fair and appropriate. You are right, it's probably better to leave it off by default for people who do not need it.
Comment 19 Henry Hu 2014-08-29 02:17:23 UTC
Created attachment 146476 [details]
New patch

This is an updated patch. It combines the original patch into one optional patch file. The UTF8 option is added. If enabled, the optional patch file would be applied to the port.
This patch also fixed some problems of slim:
1. Fix the default path variable. Set the PATH variable according to login.conf, which includes /sbin, /usr/sbin and some other directories.
2. Notice the change from sessions to sessiondir in slim.conf and set the default value of sessiondir. Also change pkg-message to reflect this.
Port version is bumped.
Comment 20 commit-hook freebsd_committer freebsd_triage 2014-09-20 19:07:54 UTC
A commit references this bug:

Author: marino
Date: Sat Sep 20 19:07:38 UTC 2014
New revision: 368677
URL: http://svnweb.freebsd.org/changeset/ports/368677

Log:
  x11/slim: Add non-default UTF-8 character input support

  PR:		192783
  Submitted by:	DaLynX
  Refined by:	maintainer (Henry Hu)

Changes:
  head/x11/slim/Makefile
  head/x11/slim/files/extra-patch-utf8
  head/x11/slim/files/patch-slim.conf
  head/x11/slim/files/pkg-message.in
Comment 21 John Marino freebsd_committer freebsd_triage 2014-09-20 19:08:31 UTC
thanks!