{"componentChunkName":"component---src-templates-post-template-js","path":"/kali-faild-launch-en","result":{"data":{"markdownRemark":{"id":"6aeecb55-883a-54d2-a5bc-98a47e9f55b0","html":"<blockquote>\n<p>This page has been machine-translated from the <a href=\"/kali-faild-launch\">original page</a>.</p>\n</blockquote>\n<p><strong>After updating Kali Linux, pressing <code class=\"language-text\">Ctrl+Alt+t</code> to launch the terminal started showing the following error.</strong></p>\n<p><code class=\"language-text\">Failed to launch preferred application for category</code></p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 521px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/aaa5a46bce5ccd0b696f719b45463022/bb9c5/kalierror.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 43.75%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAJCAYAAAAywQxIAAAACXBIWXMAAA7DAAAOwwHHb6hkAAACTElEQVQozy2R20sUURzHxywz0LR2ddf2Nruzzl5mZi+zl9mL7uyUuWHgtrkqrEpgPUj5kFBGmRAEhVAWUdFDFEJUTyEbhv/dp+PWw5fv5fx+P87vHOnq5lf2Ph9z++0RQ5vf8e10Gb3/G8/uH4Y3ugzf6RLcPSbw/Ehkh7judRlsfmOg+ZOzS4ecFnx+45CBtV/0CS+1dw5IF2cwcg4+w8aXtvEkbCaMeg+euGCtji/jcCll49VrjEXKuEMlxmPCx20CmctEzFmm1/eQhudf4/NFCfoVVCVJIWthpvPkBLKpnIDZ81kjR0Y3xXmRslWlmLew8iUSqoYciBLxhzBaD5DOzb5BDotQjjOpppm/sUx7cZW5uRZNoeeby3RW1llod2gtdFhcWqVmz1IoTFG0bGKxDOFIEo9Xptp+iDQ4s09IToqBMTQ9z9TUFer1Rq+hVKr3fKXiUK062GKQZdVIJLIkNVPU59AERxUNtztAc+0R0mjnE0H53w1jCVGk5YmLhpPhqbSFruVQ1VQv0408usgNo4BpVshkSsLnUBQdj0em0bqLNLL8ATmoooRVwUoP4VAUWSAYnCQQUMRaOgmBgC9CQLz1CfxC+/9rOaQS8sso5VtIQysHeDUHT8TCmxA/GqvhjVYYDxcJRdJE4xaRZI1YYY6k6TCZEitnpoW2iRsV4qkq8axDWM1zfW0H6czNH/Q3viBl9zlVfUdfaR8pLxB7woXCNpqzhTSxQL+xhav8mBFzm4v2S9zX3jNWfoqr8gxX4yOu2gvGnFf8BW7sLoWY0URlAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <picture>\n          <source\n              srcset=\"/static/aaa5a46bce5ccd0b696f719b45463022/8ac56/kalierror.webp 240w,\n/static/aaa5a46bce5ccd0b696f719b45463022/d3be9/kalierror.webp 480w,\n/static/aaa5a46bce5ccd0b696f719b45463022/0d442/kalierror.webp 521w\"\n              sizes=\"(max-width: 521px) 100vw, 521px\"\n              type=\"image/webp\"\n            />\n          <source\n            srcset=\"/static/aaa5a46bce5ccd0b696f719b45463022/8ff5a/kalierror.png 240w,\n/static/aaa5a46bce5ccd0b696f719b45463022/e85cb/kalierror.png 480w,\n/static/aaa5a46bce5ccd0b696f719b45463022/bb9c5/kalierror.png 521w\"\n            sizes=\"(max-width: 521px) 100vw, 521px\"\n            type=\"image/png\"\n          />\n          <img\n            class=\"gatsby-resp-image-image\"\n            src=\"/static/aaa5a46bce5ccd0b696f719b45463022/bb9c5/kalierror.png\"\n            alt=\"img\"\n            title=\"img\"\n            loading=\"lazy\"\n            style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n          />\n        </picture>\n  </a>\n    </span></p>\n<p>This time, I’m recording how I fixed the problem above.</p>\n<h2 id=\"solution\" style=\"position:relative;\"><a href=\"#solution\" aria-label=\"solution permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Solution</h2>\n<p>I was able to resolve this issue by referring to this <a href=\"https://stackoverflow.com/questions/65491788/kali-linux-update-breaks-the-package-shortcut-links\" target=\"_blank\" rel=\"noopener\">Stack Overflow</a> post.</p>\n<p>First, run the following command in the terminal.</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token function\">sudo</span> update-alternatives --config x-terminal-emulator</code></pre></div>\n<p>Then the following output appears, so choose an appropriate number.</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">There are 2 choices for the alternative x-terminal-emulator (providing /usr/bin/x-terminal-emulator).\n\nSelection Path Priority Status\n------------------------------------------------------------\n0 /usr/bin/qterminal 40 auto mode\n* 1 /usr/bin/mate-terminal.wrapper 35 manual mode\n2 /usr/bin/qterminal 40 manual mode\n\nPress &lt;enter> to keep the current choice[*], or type selection number: 0</code></pre></div>\n<p>Finally, run the update with apt.</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token function\">sudo</span> <span class=\"token function\">apt</span> update <span class=\"token operator\">&amp;&amp;</span> <span class=\"token function\">sudo</span> <span class=\"token function\">apt</span> upgrade -y</code></pre></div>\n<p>This successfully fixed the issue in my environment.</p>\n<h2 id=\"what-this-did\" style=\"position:relative;\"><a href=\"#what-this-did\" aria-label=\"what this did permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What this did</h2>\n<p>Judging from this <a rel=\"noopener\" href=\"https://stackoverflow.com/questions/65491788/kali-linux-update-breaks-the-package-shortcut-links\" target=\"_blank\">Stack Overflow</a> post, this error can occur when there is a problem with a symbolic-link reference.</p>\n<p>So, I used the <code class=\"language-text\">update-alternatives</code> command to reconfigure the symbolic link.</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token function\">sudo</span> update-alternatives --config x-terminal-emulator</code></pre></div>\n<p>Looking at the documentation below, you can see that <code class=\"language-text\">update-alternatives</code> is a command for maintaining the symbolic links that determine which application the OS uses by default.</p>\n<p><a href=\"http://manpages.ubuntu.com/manpages/trusty/man8/update-alternatives.8.html\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Ubuntu Manpage: update-alternatives - maintain symbolic links determining default commands</a></p>\n<p>On Kali using xfce5, it seems that either qterminal or mate-terminal is used for the default terminal, <code class=\"language-text\">x-terminal-emulator</code>.</p>\n<p>In this case, I believe the problem was that, for some reason, no terminal was properly associated with <code class=\"language-text\">x-terminal-emulator</code>, which is what the shortcut key launches.<br>\nBy the way, <code class=\"language-text\">--config</code> is an option that lists all available choices.</p>\n<h2 id=\"summary\" style=\"position:relative;\"><a href=\"#summary\" aria-label=\"summary permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Summary</h2>\n<p>When this error first appeared, it felt like “my computer broke even though I didn’t do anything,” but in the end I learned quite a bit, so I’m glad I looked into it.</p>","fields":{"slug":"/kali-faild-launch-en","tagSlugs":["/tag/kali-en/","/tag/notes-en/","/tag/english/"]},"frontmatter":{"date":"2021-01-01","description":"This post summarizes how to fix the problem where the terminal will not launch and shows “Failed to launch preferred application for category”.","tags":["Kali (en)","Notes (en)","English"],"title":"After Updating Kali Linux, the Terminal Won’t Launch and Shows “Failed to launch preferred application for category”","socialImage":{"publicURL":"/static/dc4d8b7f8795f3c3d3489d9957d155f2/no-image.png"}}}},"pageContext":{"slug":"/kali-faild-launch-en"}},"staticQueryHashes":["251939775","401334301","825871152"]}