{"id":1848,"date":"2025-08-14T13:07:04","date_gmt":"2025-08-14T04:07:04","guid":{"rendered":"https:\/\/www.typea.info\/blog\/?p=1848"},"modified":"2025-08-14T13:07:04","modified_gmt":"2025-08-14T04:07:04","slug":"ubuntu_xfce_firefox_trouble","status":"publish","type":"post","link":"https:\/\/www.typea.info\/blog\/index.php\/2025\/08\/14\/ubuntu_xfce_firefox_trouble\/","title":{"rendered":"XFCE \u3067 Firefox \u304c\u8d77\u52d5\u3057\u306a\u3044\uff08X \u8a8d\u8a3c\u30a8\u30e9\u30fc\uff09\u5bfe\u51e6\u30e1\u30e2"},"content":{"rendered":"<h1>XFCE \u3067 Firefox \u304c\u8d77\u52d5\u3057\u306a\u3044\uff08X \u8a8d\u8a3c\u30a8\u30e9\u30fc\uff09\u5bfe\u51e6\u30e1\u30e2<\/h1>\n<p>\u73fe\u8c61\uff1a\u30e9\u30f3\u30c1\u30e3\u30fc\u304b\u3089 Firefox \u304c\u8d77\u52d5\u305b\u305a\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u304b\u3089\u306f\u8d77\u52d5\u3059\u308b\u3002\u30a8\u30e9\u30fc\u306f\u6b21\u306e\u901a\u308a\u3002<\/p>\n<pre>Authorization required, but no authorization protocol specified\nError: cannot open display: :10.0\nmkdir: cannot create directory \u2018\/run\/user\/0\u2019: Permission denied<\/pre>\n<h2>\u539f\u56e0\u306e\u8981\u70b9<\/h2>\n<ul>\n<li><strong>XAUTHORITY<\/strong>\uff08X11 \u8a8d\u8a3c\u30c8\u30fc\u30af\u30f3\uff09\u3068 <strong>DISPLAY<\/strong> \u304c\u30e9\u30f3\u30c1\u30e3\u30fc\u5b9f\u884c\u6642\u306b\u6b63\u3057\u304f\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044\u3002<\/li>\n<li>\u30b7\u30a7\u30eb\u306e\u8a2d\u5b9a\uff08<code>~\/.bashrc<\/code> \u306a\u3069\uff09\u304c GUI \u30e9\u30f3\u30c1\u30e3\u30fc\u306b\u306f\u8aad\u307f\u8fbc\u307e\u308c\u306a\u3044\u3053\u3068\u304c\u3042\u308b\u3002<\/li>\n<li>root \u3067\u306f <code>\/run\/user\/0<\/code> \u306e\u4f5c\u6210\u3084 X \u8a8d\u8a3c\u306e\u554f\u984c\u304c\u8d77\u304d\u3084\u3059\u3044\uff08GUI \u306f\u4e00\u822c\u30e6\u30fc\u30b6\u30fc\u3067\u5b9f\u884c\u63a8\u5968\uff09\u3002<\/li>\n<\/ul>\n<h2>\u78ba\u8a8d\u30b3\u30de\u30f3\u30c9<\/h2>\n<pre>echo $DISPLAY\necho $XAUTHORITY\nls -l ~\/.Xauthority\n<\/pre>\n<h2>\u89e3\u6c7a\u624b\u9806\uff08\u63a5\u7d9a\u65b9\u5f0f\u5225\uff09<\/h2>\n<h3>1) xrdp\uff08<code>\/etc\/xrdp\/startwm.sh<\/code> \u7d4c\u7531\uff09<\/h3>\n<p>\u6700\u3082\u78ba\u5b9f\u306b\u53cd\u6620\u3055\u305b\u308b\u306b\u306f\u3001\u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u76f4\u63a5\u66f8\u304f\u3002<\/p>\n<pre>sudo nano \/etc\/xrdp\/startwm.sh<\/pre>\n<h1 id=\"\u4ee5\u4e0b\u3092codeexecetcx11xsessioncode\u306e\u524d\u3042\u305f\u308a\u306b\u8ffd\u8a18\">\u4ee5\u4e0b\u3092 <code>exec \/etc\/X11\/Xsession<\/code> \u306e\u524d\u3042\u305f\u308a\u306b\u8ffd\u8a18<\/h1>\n<p>export XAUTHORITY=\/home\/piroto\/.Xauthority<\/p>\n<h1 id=\"\u5fc5\u8981\u306b\u5fdc\u3058\u3066\uff08\u4f8b\uff09\">\u5fc5\u8981\u306b\u5fdc\u3058\u3066\uff08\u4f8b\uff09<\/h1>\n<h1 id=\"exportdisplay:10.0\">export DISPLAY=:10.0<\/h1>\n<p>sudo systemctl restart xrdp<\/p>\n<h3>2) lightdm\uff08\u591a\u304f\u306e XFCE \u30ed\u30fc\u30ab\u30eb\u30ed\u30b0\u30a4\u30f3\uff09<\/h3>\n<p>\u30e6\u30fc\u30b6\u30fc\u306e X \u30bb\u30c3\u30b7\u30e7\u30f3\u3067\u8aad\u307f\u8fbc\u307e\u308c\u308b <code>~\/.xsessionrc<\/code> \u306b\u8a2d\u5b9a\u3002<\/p>\n<pre>echo \u2018export XAUTHORITY=\/home\/piroto\/.Xauthority\u2019 &gt;&gt; ~\/.xsessionrc<\/pre>\n<h1 id=\"\u30ed\u30b0\u30a2\u30a6\u30c8\u2192\u518d\u30ed\u30b0\u30a4\u30f3\">\u30ed\u30b0\u30a2\u30a6\u30c8 \u2192 \u518d\u30ed\u30b0\u30a4\u30f3<\/h1>\n<p>\u00a0<\/p>\n<h3>3) \u30ed\u30fc\u30ab\u30eb\u30ed\u30b0\u30a4\u30f3 \/ \u4e00\u90e8 VNC<\/h3>\n<p>\u30ed\u30b0\u30a4\u30f3\u30b7\u30a7\u30eb\u5168\u822c\u3067\u8aad\u307f\u8fbc\u307e\u308c\u308b <code>~\/.profile<\/code> \u306b\u8a2d\u5b9a\u3002<\/p>\n<pre>echo \u2018export XAUTHORITY=\/home\/piroto\/.Xauthority\u2019 &gt;&gt; ~\/.profile<\/pre>\n<h1 id=\"\u30ed\u30b0\u30a2\u30a6\u30c8\u2192\u518d\u30ed\u30b0\u30a4\u30f3\">\u30ed\u30b0\u30a2\u30a6\u30c8 \u2192 \u518d\u30ed\u30b0\u30a4\u30f3<\/h1>\n<p>\u00a0<\/p>\n<div class=\"tip\"><strong>\u30e1\u30e2\uff1a<\/strong> <code>~\/.bash_profile<\/code> \u306f\u901a\u5e38 GUI\/\u975e\u30ed\u30b0\u30a4\u30f3\u30b7\u30a7\u30eb\u3067\u306f\u8aad\u307f\u8fbc\u307e\u308c\u307e\u305b\u3093\u3002GUI \u53cd\u6620\u306f <code>~\/.xsessionrc<\/code> \u307e\u305f\u306f <code>~\/.profile<\/code> \u3078\u3002<\/div>\n<h2>\u30a2\u30d7\u30ea\u5358\u4f4d\u306e\u56de\u907f\u7b56\uff08\u30e9\u30f3\u30c1\u30e3\u30fc\u306b\u76f4\u63a5\u6307\u5b9a\uff09<\/h2>\n<p>Firefox \u306e .desktop \u3092\u30e6\u30fc\u30b6\u30fc\u5074\u306b\u30b3\u30d4\u30fc\u3057\u3001<code>Exec=<\/code> \u3092\u66f8\u304d\u63db\u3048\u3002<\/p>\n<pre>cp \/usr\/share\/applications\/firefox.desktop ~\/.local\/share\/applications\/\nxdg-open ~\/.local\/share\/applications\/firefox.desktop<\/pre>\n<h1 id=\"exec\u884c\u306e\u4f8b\uff1a\">Exec \u884c\u306e\u4f8b\uff1a<\/h1>\n<p>Exec=env XAUTHORITY=\/home\/piroto\/.Xauthority DISPLAY=:10.0 firefox %u<\/p>\n<h2>\uff08\u53c2\u8003\uff09root \u3067\u306e GUI \u5b9f\u884c\u306f\u975e\u63a8\u5968<\/h2>\n<ul>\n<li>\u4e00\u822c\u30e6\u30fc\u30b6\u30fc\u3067\u306e\u5b9f\u884c\u3092\u63a8\u5968\u3002<\/li>\n<li>\u3069\u3046\u3057\u3066\u3082 root \u304c\u5fc5\u8981\u306a\u3089\u3001\u4e00\u822c\u30e6\u30fc\u30b6\u30fc\u5074\u3067\u4e00\u6642\u7684\u306b\u8a31\u53ef\uff1a\n<pre>xhost +SI:localuser:root\nsudo -E env DISPLAY=:10.0 XAUTHORITY=\/home\/piroto\/.Xauthority firefox<\/pre>\n<\/li>\n<\/ul>\n<h2>\uff08\u53c2\u8003\uff09\u4e00\u6642\u7684\/\u6052\u4e45\u7684\u306b CUI \u8d77\u52d5\u3078\u5207\u308a\u66ff\u3048<\/h2>\n<ul>\n<li>\u4e00\u6642\u7684\uff08GRUB \u3067 <code>systemd.unit=multi-user.target<\/code> \u8ffd\u52a0\uff09<\/li>\n<li>\u6052\u4e45\u7684\uff1a\n<pre>sudo systemctl set-default multi-user.target<\/pre>\n<h1 id=\"\u623b\u3059\u3068\u304d\">\u623b\u3059\u3068\u304d<\/h1>\n<p>sudo systemctl set-default graphical.target<\/p>\n<\/li>\n<\/ul>\n<h2>\u6700\u7d42\u30c1\u30a7\u30c3\u30af<\/h2>\n<pre># \u74b0\u5883\u5909\u6570\u3092\u660e\u793a\u3057\u3066\u8d77\u52d5\u30c6\u30b9\u30c8\nenv XAUTHORITY=\/home\/piroto\/.Xauthority DISPLAY=:10.0 firefox \u2013new-window about:support\n<\/pre>\n<hr \/>\n<p><small>\u3053\u306e\u30e1\u30e2\u306f\u3001XFCE + Firefox \u3067\u306e\u300cAuthorization required \/ cannot open display\u300d\u554f\u984c\u3092\u77ed\u304f\u307e\u3068\u3081\u305f\u3082\u306e\u3067\u3059\u3002\u74b0\u5883\u306b\u3088\u308a\u30d1\u30b9\u3084 DISPLAY \u756a\u53f7\u306f\u8aad\u307f\u66ff\u3048\u3066\u304f\u3060\u3055\u3044<\/small><\/p>\n<p><small>\u3002<img loading=\"lazy\" decoding=\"async\" title=\"ubuntu_xfce_firefox_trouble.png\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/2025\/08\/ubuntu_xfce_firefox_trouble.png\" alt=\"Ubuntu xfce firefox trouble\" width=\"598\" height=\"375\" border=\"0\" \/><\/small><\/p>\n","protected":false},"excerpt":{"rendered":"<p>XFCE \u3067 Firefox \u304c\u8d77\u52d5\u3057\u306a\u3044\uff08X \u8a8d\u8a3c\u30a8\u30e9\u30fc\uff09\u5bfe\u51e6\u30e1\u30e2 \u73fe\u8c61\uff1a\u30e9\u30f3\u30c1\u30e3\u30fc\u304b\u3089 Firefox \u304c\u8d77\u52d5\u305b\u305a\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u304b\u3089\u306f\u8d77\u52d5\u3059\u308b\u3002\u30a8\u30e9\u30fc\u306f\u6b21\u306e\u901a\u308a\u3002 Authorization required, but [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1847,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","footnotes":""},"categories":[],"tags":[148,218],"class_list":["post-1848","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-ubuntu","tag-xfce"],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1848","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=1848"}],"version-history":[{"count":1,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1848\/revisions"}],"predecessor-version":[{"id":1849,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1848\/revisions\/1849"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/media\/1847"}],"wp:attachment":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=1848"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=1848"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=1848"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}