summaryrefslogtreecommitdiff
path: root/help/ja/password.page
blob: f9380b667de419f0b8a5d4b75a4c1833505b2151 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" type="topic" id="password" xml:lang="ja">
  <info>
    <link type="guide" xref="index#dialogs"/>
    <desc><cmd>--password</cmd> オプションの使用</desc>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>赤星 柔充</mal:name>
      <mal:email>yasumichi@vinelinux.org</mal:email>
      <mal:years>2011,2012</mal:years>
    </mal:credit>
  </info>
  <title>パスワードダイアログ</title>
  <p>パスワードダイアログを作成するには、<cmd>--password</cmd> というオプションを使ってください。</p>
  <p>パスワードダイアログは、以下のオプションをサポートしています。</p>

  <terms>
    <item>
      <title><cmd>--username</cmd></title>
      <p>ユーザー名入力欄を表示します。</p>
    </item>
  </terms>

  <p>以下のスクリプトの例でパスワードダイアログの作成方法を示します。</p>

<code>
#!/bin/sh

ENTRY=`zenity --password --username`

case $? in
         0)
	 	echo "ユーザー名: `echo $ENTRY | cut -d'|' -f1`"
	 	echo "パスワード: `echo $ENTRY | cut -d'|' -f2`"
		;;
         1)
                echo "ログインを中止しました。";;
        -1)
                echo "予期せぬエラーが発生しました。";;
esac
</code>

  <figure>
    <title>パスワード入力ダイアログの例</title>
    <desc><app>Zenity</app> パスワード入力ダイアログの例</desc>
    <media type="image" mime="image/png" src="figures/zenity-password-screenshot.png"/>
  </figure>

</page>
bgstack15