Question about the domain name

15 views
Skip to first unread message

ml h

unread,
May 4, 2011, 9:21:45 PM5/4/11
to qubes...@googlegroups.com
Hello,I tried to create a domain which was named in Chinese.But failed with the following message:
Error:Errors were found at line 11 while processing /var/lib/qubes/appvms/加/加.conf
Error:Cannot add VM '加‘ to Xen Store!
I want to create a domain whose name is 加.
Is it possible to success ?What should I do?

Joanna Rutkowska

unread,
May 5, 2011, 4:45:29 AM5/5/11
to qubes...@googlegroups.com

We don't support unicode for VM names, so you must stick to good old
ASCII subset.

j.

signature.asc

ml h

unread,
May 5, 2011, 5:34:24 AM5/5/11
to qubes...@googlegroups.com
Thanks for your reply!
I have read the development documents and noted that the struct msg_wmname can set the window name .So I searched from the source codes  to find out files that contained the msg_wmname struct . It turned out to be the /gui/gui-daemon/xside.c and /gui/gui-agent/vmside.c .Then I modified the function " XmbTextListToTextProperty(g->display,list,1,XStringStyle,&Text_prop) " in xside.c file to "Xuft8TextListToTextProperty(g->display,list,1,XUTF8StingStyle,&Text_prop)". Because  I found this function relates to encoding. Then I made the rpm package after the modifying and Installed it .But still can not create a domain with a Chinese name.
Can you tell me specify how to do it?


2011/5/5 Joanna Rutkowska <joa...@invisiblethingslab.com>

Marek Marczykowski

unread,
May 5, 2011, 7:03:42 AM5/5/11
to qubes...@googlegroups.com, ml h
On 05.05.2011 11:34, ml h wrote:
> Thanks for your reply!
> I have read the development documents and noted that the struct msg_wmname
> can set the window name .So I searched from the source codes to find out
> files that contained the msg_wmname struct . It turned out to be the
> /gui/gui-daemon/xside.c and /gui/gui-agent/vmside.c .Then I modified the
> function "
> XmbTextListToTextProperty(g->display,list,1,XStringStyle,&Text_prop) " in
> xside.c file to
> "Xuft8TextListToTextProperty(g->display,list,1,XUTF8StingStyle,&Text_prop)".
> Because I found this function relates to encoding. Then I made the rpm
> package after the modifying and Installed it .But still can not create a
> domain with a Chinese name.
> Can you tell me specify how to do it?

There is two separate things:
1. VM (domain) names
2. window titles

The first one involves lots of code (gui-daemon, many core scripts, xen
configuration etc) and change to support non-ASCII characters here is
not trivial and even not planned in the near future.

The second one involves only gui-daemon and gui-agent code. This is the
place which you found. Right before XmbTextListToTextProperty the string
received from VM is passed to "sanitize_string_from_vm" function, which
replaces all non-ASCII characters with '_'.
This is done for security, any change in this code (all xside.c) must be
done _very carefully_.

Similar as in above: currently there is no support for non-ASCII
characters in window titles (will be replaced with '_'), but maybe will
be supported someday.

>
>
> 2011/5/5 Joanna Rutkowska <joa...@invisiblethingslab.com>
>
>> On 05/05/11 03:21, ml h wrote:
>>> Hello,I tried to create a domain which was named in Chinese.But failed
>> with
>>> the following message:
>>> Error:Errors were found at line 11 while processing
>>> /var/lib/qubes/appvms/加/加.conf
>>> Error:Cannot add VM '加‘ to Xen Store!
>>> I want to create a domain whose name is 加.
>>> Is it possible to success ?What should I do?
>>>
>>
>> We don't support unicode for VM names, so you must stick to good old
>> ASCII subset.
>>
>> j.
>>
>>
>


--
Pozdrawiam / Best Regards,
Marek Marczykowski | RLU #390519
marmarek at mimuw edu pl | xmpp:marmarek at staszic waw pl

Reply all
Reply to author
Forward
0 new messages