{"id":413,"date":"2026-01-29T15:06:55","date_gmt":"2026-01-29T08:06:55","guid":{"rendered":"https:\/\/blog.chaiyakul.com\/?p=413"},"modified":"2026-01-29T15:08:00","modified_gmt":"2026-01-29T08:08:00","slug":"close-kvm-autorun-linux-mint","status":"publish","type":"post","link":"https:\/\/blog.chaiyakul.com\/index.php\/2026\/01\/29\/close-kvm-autorun-linux-mint\/","title":{"rendered":"\u0e1b\u0e34\u0e14\u0e42\u0e21\u0e14\u0e39\u0e25 KVM \u0e41\u0e1a\u0e1a autorun \u0e1a\u0e19 Linux Mint"},"content":{"rendered":"\n<p>\u0e43\u0e0a\u0e49 autostart (.desktop) \u0e43\u0e19 home<\/p>\n\n\n\n<p>1.\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e42\u0e1f\u0e25\u0e40\u0e14\u0e2d\u0e23\u0e4c (\u0e16\u0e49\u0e32\u0e22\u0e31\u0e07\u0e44\u0e21\u0e48\u0e21\u0e35)<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nmkdir -p ~\/.config\/autostart\n<\/pre><\/div>\n\n\n<p>2.\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e44\u0e1f\u0e25\u0e4c \u0e40\u0e0a\u0e48\u0e19\u00a0<code>kvm.desktop<\/code><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nnano ~\/.config\/autostart\/kvm.desktop\n<\/pre><\/div>\n\n\n<p>3.\u0e43\u0e2a\u0e48\u0e40\u0e19\u0e37\u0e49\u0e2d\u0e2b\u0e32:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;Desktop Entry]\nType=Application\nExec=\/home\/&#x5B;\u0e0a\u0e37\u0e48\u0e2d\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49]\/kvm.sh\nHidden=false\nNoDisplay=false\nX-GNOME-Autostart-enabled=true\nName=kvm\n<\/pre><\/div>\n\n\n<p>4.\u0e1a\u0e31\u0e19\u0e17\u0e36\u0e01 \u0e41\u0e25\u0e49\u0e27 reboot \/ logout<\/p>\n\n\n\n<p>5.\u0e2a\u0e23\u0e49\u0e32\u0e07 script kvm.sh<\/p>\n\n\n\n<p><strong>\u0e17\u0e35\u0e48\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07<\/strong> \/home\/[\u0e0a\u0e37\u0e48\u0e2d\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49]\/kvm.sh<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n#!\/bin\/bash\nsudo \/usr\/sbin\/modprobe -r kvm_intel\nsudo \/usr\/sbin\/modprobe -r kvm\n<\/pre><\/div>\n\n\n<p>\u0e2d\u0e22\u0e48\u0e32\u0e25\u0e37\u0e21\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nchmod +x \/home\/&#x5B;\u0e0a\u0e37\u0e48\u0e2d\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49]\/kvm.sh\n<\/pre><\/div>\n\n\n<p>6. \u0e40\u0e1b\u0e34\u0e14 sudoers \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e44\u0e21\u0e48\u0e43\u0e2b\u0e49\u0e16\u0e32\u0e21 password \u0e40\u0e27\u0e25\u0e32\u0e23\u0e31\u0e19\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo visudo\n<\/pre><\/div>\n\n\n<p>\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e1a\u0e23\u0e23\u0e17\u0e31\u0e14\u0e19\u0e35\u0e49\u00a0<strong>\u0e1a\u0e23\u0e23\u0e17\u0e31\u0e14\u0e40\u0e14\u0e35\u0e22\u0e27<\/strong>  [\u0e43\u0e19\u0e17\u0e35\u0e48\u0e19\u0e35\u0e49 \u0e0a\u0e37\u0e48\u0e2d\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49 \u0e0a\u0e37\u0e48\u0e2d\u0e27\u0e48\u0e32 mill] :<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nmill ALL=(root) NOPASSWD: \\\n    \/usr\/sbin\/modprobe -r kvm_intel, \\\n    \/usr\/sbin\/modprobe -r kvm\n<\/pre><\/div>\n\n\n<p>7.\u0e17\u0e14\u0e2a\u0e2d\u0e1a\u0e01\u0e48\u0e2d\u0e19 autostart<\/p>\n\n\n\n<p>\u0e23\u0e31\u0e19\u0e17\u0e14\u0e2a\u0e2d\u0e1a\u0e40\u0e2d\u0e07\u0e43\u0e19 terminal:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\/home\/&#x5B;\u0e0a\u0e37\u0e48\u0e2d\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49]\/kvm.sh\n<\/pre><\/div>\n\n\n<p>\u0e16\u0e49\u0e32:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u274c \u0e44\u0e21\u0e48\u0e16\u0e32\u0e21 password<\/li>\n\n\n\n<li>\u274c \u0e44\u0e21\u0e48 error<\/li>\n<\/ul>\n\n\n\n<p>\u0e41\u0e1b\u0e25\u0e27\u0e48\u0e32 GNOME autostart \u0e08\u0e30\u0e17\u0e33\u0e07\u0e32\u0e19\u0e41\u0e19\u0e48\u0e19\u0e2d\u0e19 \u2714<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0e43\u0e0a\u0e49 autostart (.desktop) \u0e43\u0e19 home 1.\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e42\u0e1f\u0e25\u0e40\u0e14\u0e2d\u0e23\u0e4c (\u0e16\u0e49\u0e32\u0e22\u0e31 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":0,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","footnotes":""},"categories":[9,165,159],"tags":[],"class_list":["post-413","post","type-post","status-publish","format-standard","hentry","category-linux","category-linux-mint","category-virtualbox"],"_links":{"self":[{"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/posts\/413","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/comments?post=413"}],"version-history":[{"count":4,"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/posts\/413\/revisions"}],"predecessor-version":[{"id":417,"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/posts\/413\/revisions\/417"}],"wp:attachment":[{"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/media?parent=413"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/categories?post=413"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/tags?post=413"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}