前提
ここに質問の内容を詳しく書いてください。
(例)
ubuntu 20.04 デスクトプ版 java openjdk 17.0.4 2022-07-19
ubuntuの状態 設定->このシステムについて->ウィンドウシステムは、X11と表示されています。
環境変数 export DISPLAY=:0.0 export LIBGL_ALWAYS_INDIRECT=1 /etc/ssh/sshd_config X11Forwarding yes X11DisplayOffset 0 PrintMotd no PrintLastLog yes TCPKeepAlive yes なども変更してみました。
開発は、Windows vs codeを使用してclassまで作成して、ubuntuで,jarを作成しています。
1 Windows vs codeで、動作します。
2 jarを作成してWindows上で、動作します。
対処法をご存じの方宜しくお願いします。
TypeScriptで●●なシステムを作っています。
■■な機能を実装中に以下のエラーメッセージが発生しました。
Can't connect to X11 window server using '127.0.0.53:0.0' as the value of the DISPLAY variable.
実現したいこと
ここに実現したいことを箇条書きで書いてください。
- ▲▲機能を動作するようにする
ubuntu 20.04上で、java swingで作成した。デスクトップアプリを動作させたい。
発生している問題・エラーメッセージ
java Swingで作成したアプリが起動しません。
エラーメッセージ
Can't connect to X11 window server using '127.0.0.53:0.0' as the value of the DISPLAY variable.
該当のソースコード
java Swing ソースコード
public static void main(String args[]){
Zipkaitou frame = new Zipkaitou("ZIPファイル解凍");
frame.setVisible(true);
// frame.setSize(1090, 400);
}
Zipkaitou(String title){
setTitle(title);
setBounds(100, 100, 800, 140);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
試したこと
startxを試したところ、そもそもx-windowが上手くうごいていない様に思えます。
何か設定がありますか?
root@Linux-TPC:~# startx
X.Org X Server 1.21.1.3
X Protocol Version 11, Revision 0
Current Operating System: Linux Linux-TPC 5.15.0-50-generic #56-Ubuntu SMP Tue Sep 20 13:23:26 UTC 2022 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.15.0-50-generic root=UUID=2f16dce9-f576-4e50-83fe-93a245c4d0c9 ro find_preseed=/preseed.cfg auto noprompt priority=critical locale=en_US quiet splash
xorg-server 2:21.1.3-2ubuntu2.1 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.40.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.1.log", Time: Sat Oct 15 16:15:17 2022
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
xinit: connection to X server lost
waiting for X server to shut down (II) Server terminated successfully (0). Closing log file.
ログファイル
GNU nano 6.2 /var/log/Xorg.1.log
[ 3889.962]
X.Org X Server 1.21.1.3
X Protocol Version 11, Revision 0
[ 3889.962] Current Operating System: Linux Linux-TPC 5.15.0-50-generic #56-Ub>
[ 3889.963] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.15.0-50-generic ro>
[ 3889.963] xorg-server 2:21.1.3-2ubuntu2.1 (For technical support please see >
[ 3889.963] Current version of pixman: 0.40.0
[ 3889.963] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 3889.963] Markers: (--) probed, () from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 3889.963] (==) Log file: "/var/log/Xorg.1.log", Time: Sat Oct 15 16:15:17 20>
[ 3889.964] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 3889.966] (==) No Layout section. Using the first Screen section.
[ 3889.966] (==) No screen section available. Using defaults.
[ 3889.966] () |-->Screen "Default Screen Section" (0)
[ 3889.966] (**) | |-->Monitor "<default monitor>"
[ 3889.967] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[ 3889.967] (==) Automatically adding devices
[ 3889.967] (==) Automatically enabling devices
[ 3889.967] (==) Automatically adding GPU devices
[ 3889.967] (==) Automatically binding GPU devices
[ 3889.967] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 3889.967] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 3889.967] Entry deleted from font path.
[ 3889.967] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[ 3889.967] Entry deleted from font path.
[ 3889.967] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[ 3889.967] Entry deleted from font path.
[ 3889.967] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[ 3889.967] Entry deleted from font path.
[ 3889.967] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[ 3889.967] Entry deleted from font path.
ここに問題に対して試したことを記載してください。
補足情報(FW/ツールのバージョンなど)
ここにより詳細な情報を記載してください。
回答2件
あなたの回答
tips
プレビュー