{"id":6887,"date":"2024-01-25T15:35:13","date_gmt":"2024-01-25T15:35:13","guid":{"rendered":"https:\/\/picockpit.com\/raspberry-pi\/?p=6887"},"modified":"2024-01-25T16:26:28","modified_gmt":"2024-01-25T16:26:28","slug":"easily-write-a-script-on-your-raspberry-pi-with-picockpit","status":"publish","type":"post","link":"https:\/\/picockpit.com\/raspberry-pi\/es\/escribe-facilmente-un-script-en-tu-raspberry-pi-con-picockpit\/","title":{"rendered":"Escriba f\u00e1cilmente un script en su Raspberry Pi con PiCockpit"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2024\/01\/Easily-Write-Scripts-Title-Image-1024x576.png\" alt=\"Easily Write Scripts on Your Raspberry Pi with PiCockpit Title Image\" class=\"wp-image-6888\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2024\/01\/Easily-Write-Scripts-Title-Image-1024x576.png 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2024\/01\/Easily-Write-Scripts-Title-Image-300x169.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2024\/01\/Easily-Write-Scripts-Title-Image-768x432.png 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2024\/01\/Easily-Write-Scripts-Title-Image-18x10.png 18w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2024\/01\/Easily-Write-Scripts-Title-Image-24x14.png 24w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2024\/01\/Easily-Write-Scripts-Title-Image-36x20.png 36w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2024\/01\/Easily-Write-Scripts-Title-Image-48x27.png 48w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2024\/01\/Easily-Write-Scripts-Title-Image.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>PiCockpit makes scripting for your Raspberry Pi both intuitive and easy to manage. With our <a href=\"https:\/\/picockpit.com\/raspberry-pi\/control-your-raspberry-pi-remotely-using-picontrol\/\">PiControl App<\/a>, you can easily write a script and create a button to run it from anywhere in the world.<\/p>\n\n\n\n<p>In this blog post, I&#8217;ll guide you through the process of writing a simple script to open Firefox on your Raspberry Pi using PiControl with a button.<\/p>\n\n\n\n<p>You can use this outline to create your own scripts with PiControl.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p>You&#8217;ll need a Raspberry Pi with PiCockpit installed. If you haven&#8217;t yet, you can sign up for PiCockpit with just the click of a button.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-16018d1d wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link has-black-color has-text-color has-background has-link-color wp-element-button\" href=\"https:\/\/picockpit.com\/user\/login\" style=\"background-color:#ea9364\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Sign up for PiCockpit<\/strong><\/a><\/div>\n<\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>And once you&#8217;ve done that, installing PiCockpit is a piece of cake.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-16018d1d wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link has-black-color has-text-color has-background has-link-color wp-element-button\" href=\"https:\/\/picockpit.com\/raspberry-pi\/installation-of-picockpit\/\" style=\"background-color:#ea9364\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Install PiCockpit<\/strong><\/a><\/div>\n<\/div>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Steps to Write the Script<\/h2>\n\n\n\n<p>So now that you&#8217;ve got a PiCockpit account and you have the PiCockpit Client installed on your Raspberry Pi, writing the script is a fairly straightforward process.<\/p>\n\n\n\n<p>I&#8217;m going to show you how to do this with the terminal. If you want to see how to do it with a graphical user interface, you can find our <a href=\"https:\/\/picockpit.com\/raspberry-pi\/control-your-raspberry-pi-remotely-using-picontrol\/\">PiControl App documentation here<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Access PiControl Configuration Files<\/h3>\n\n\n\n<p>So the first thing you need to do is either open a terminal up on your Raspberry Pi or SSH into it. After that, you&#8217;ll want to navigate to the following directory:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"\/etc\/picockpit-client\/apps\/com.picockpit\/picontrol\/modules\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">etc<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">picockpit<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">client<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">apps<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">com<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">picockpit<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">picontrol<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">modules<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Create a New Script File<\/h3>\n\n\n\n<p>I&#8217;m going to use Nano, but feel free to use whichever text editor you please. So I&#8217;ll run:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"sudo nano firefox.json\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">sudo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">nano<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">firefox<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">json<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>Thus creating a new JSON file. This will then open up an empty file in Nano. And here is where we&#8217;ll be putting the script.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Edit the Script File<\/h3>\n\n\n\n<p>Input the following JSON content into the text field:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"{ \n  &quot;name&quot;: &quot;Firefox Opener&quot;, \n  &quot;icon&quot;: &quot;mdi-firefox&quot;, \n  &quot;handle&quot;: &quot;open-firefox&quot;, \n  &quot;description&quot;: &quot;Open Firefox&quot;, \n  &quot;commands&quot;: { \n    &quot;open-firefox&quot;: { \n      &quot;name&quot;: &quot;Open Firefox&quot;, \n      &quot;icon&quot;: &quot;mdi-firefox&quot;, \n      &quot;description&quot;: &quot;Launches Firefox&quot;, \n      &quot;confirm&quot;: false, \n      &quot;user&quot;: &quot;&lt;user&gt;&quot;, \n      &quot;command&quot;: [&quot;firefox&quot;, &quot;--display=:0&quot;] \n    } \n  } \n}\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #ECEFF4\">{<\/span><span style=\"color: #D8DEE9FF\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">name<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Firefox Opener<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">icon<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">mdi-firefox<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">handle<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">open-firefox<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">description<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Open Firefox<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">commands<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">{<\/span><span style=\"color: #D8DEE9FF\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">open-firefox<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">{<\/span><span style=\"color: #D8DEE9FF\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">name<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Open Firefox<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">icon<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">mdi-firefox<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">description<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Launches Firefox<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">confirm<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">false<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">user<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">&lt;user&gt;<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">command<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> [<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">firefox<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">--display=:0<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">] <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #ECEFF4\">}<\/span><span style=\"color: #D8DEE9FF\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">}<\/span><span style=\"color: #D8DEE9FF\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>Before we move on, allow me to explain each of these elements.<\/p>\n\n\n\n<p>The <code>name<\/code> gives the module a human-readable name, which will appear on the PiCockpit interface.<\/p>\n\n\n\n<p>The <code>icon<\/code> is an optional field that gives the module a <a href=\"https:\/\/pictogrammers.com\/library\/mdi\/\">Material Design Icon<\/a>.<\/p>\n\n\n\n<p>The <code>handle<\/code> gives the module a unique identifier. And the <code>description<\/code> ensures that you will be able to quickly identify the script on your interface.<\/p>\n\n\n\n<p>The <code>name<\/code>, <code>icon<\/code>, and <code>description<\/code> all equally apply to the <code>command<\/code> itself. But the <code>confirm<\/code> element indicates whether or not you&#8217;d like a confirmation dialogue to appear before running the command. If you put <code>true<\/code>, then the dialogue will appear.<\/p>\n\n\n\n<p>You&#8217;ll then need to enter in the <code>user<\/code> for the Raspberry Pi.<\/p>\n\n\n\n<p>And finally, the actual <code>command<\/code>, of which each element is separated. In the above example, PiCockpit will spur Firefox to open then on the primary X server display, which is why I included &#8220;&#8211;display=:0&#8221;.<\/p>\n\n\n\n<p>Ensure that you save the file after entering the content by clicking &#8220;Ctrl&#8221; + &#8220;X&#8221; and then typing &#8220;Y&#8221; and hitting &#8220;Enter&#8221;.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Restart PiCockpit Client<\/h3>\n\n\n\n<p>To apply the changes, restart the PiCockpit Client. Run the following command in the terminal:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"sudo service picockpit-client restart\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">sudo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">service<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">picockpit<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">client<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">restart<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: Verify the New Command<\/h3>\n\n\n\n<p>Visit the PiControl web interface. If the script is correctly configured, you should now see the &#8220;Open Firefox&#8221; command.<\/p>\n\n\n\n<p><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"852\" height=\"445\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2024\/01\/Screenshot-from-2024-01-25-15-52-08.png\" alt=\"\" class=\"wp-image-6898\" style=\"width:475px\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2024\/01\/Screenshot-from-2024-01-25-15-52-08.png 852w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2024\/01\/Screenshot-from-2024-01-25-15-52-08-300x157.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2024\/01\/Screenshot-from-2024-01-25-15-52-08-768x401.png 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2024\/01\/Screenshot-from-2024-01-25-15-52-08-18x9.png 18w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2024\/01\/Screenshot-from-2024-01-25-15-52-08-24x13.png 24w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2024\/01\/Screenshot-from-2024-01-25-15-52-08-36x19.png 36w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2024\/01\/Screenshot-from-2024-01-25-15-52-08-48x25.png 48w\" sizes=\"auto, (max-width: 852px) 100vw, 852px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 6: Run the Script<\/h3>\n\n\n\n<p>Click on the &#8220;Open Firefox&#8221; command in the PiControl web interface. Firefox should now launch on your Raspberry Pi.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>So that&#8217;s how you successfully create a script to automate the process of opening Firefox on your Raspberry Pi using PiControl. <\/p>\n\n\n\n<p>This demonstrates the flexibility and customization options that PiControl offers, allowing you to tailor your Raspberry Pi experience to suit your specific needs.<\/p>\n<div class=\"shariff shariff-align-center shariff-widget-align-left shariff-buttonstretch\"><ul class=\"shariff-buttons theme-white orientation-horizontal buttonsize-medium\"><li class=\"shariff-button twitter shariff-nocustomcolor\" style=\"background-color:#595959\"><a href=\"https:\/\/twitter.com\/share?url=https%3A%2F%2Fpicockpit.com%2Fraspberry-pi%2Fes%2Fescribe-facilmente-un-script-en-tu-raspberry-pi-con-picockpit%2F&text=Easily%20Write%20a%20Script%20on%20Your%20Raspberry%20Pi%20with%20PiCockpit\" title=\"Compartir en X\" aria-label=\"Compartir en X\" role=\"button\" rel=\"noopener nofollow\" class=\"shariff-link\" style=\"; background-color:#000; color:#000\" target=\"_blank\"><span class=\"shariff-icon\" style=\"fill:#000\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\"><path fill=\"#000\" d=\"M14.258 10.152L23.176 0h-2.113l-7.747 8.813L7.133 0H0l9.352 13.328L0 23.973h2.113l8.176-9.309 6.531 9.309h7.133zm-2.895 3.293l-.949-1.328L2.875 1.56h3.246l6.086 8.523.945 1.328 7.91 11.078h-3.246zm0 0\"\/><\/svg><\/span><span class=\"shariff-text\" style=\"color:#000\">compartir<\/span>&nbsp;<\/a><\/li><li class=\"shariff-button facebook shariff-nocustomcolor\" style=\"background-color:#4273c8\"><a href=\"https:\/\/www.facebook.com\/sharer\/sharer.php?u=https%3A%2F%2Fpicockpit.com%2Fraspberry-pi%2Fes%2Fescribe-facilmente-un-script-en-tu-raspberry-pi-con-picockpit%2F\" title=\"Compartir en Facebook\" aria-label=\"Compartir en Facebook\" role=\"button\" rel=\"nofollow\" class=\"shariff-link\" style=\"; background-color:#3b5998; color:#3b5998\" target=\"_blank\"><span class=\"shariff-icon\" style=\"fill:#3b5998\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 18 32\"><path fill=\"#3b5998\" d=\"M17.1 0.2v4.7h-2.8q-1.5 0-2.1 0.6t-0.5 1.9v3.4h5.2l-0.7 5.3h-4.5v13.6h-5.5v-13.6h-4.5v-5.3h4.5v-3.9q0-3.3 1.9-5.2t5-1.8q2.6 0 4.1 0.2z\"\/><\/svg><\/span><span class=\"shariff-text\" style=\"color:#3b5998\">compartir<\/span>&nbsp;<\/a><\/li><li class=\"shariff-button telegram shariff-nocustomcolor\" style=\"background-color:#4084A6\"><a href=\"https:\/\/telegram.me\/share\/url?url=https%3A%2F%2Fpicockpit.com%2Fraspberry-pi%2Fes%2Fescribe-facilmente-un-script-en-tu-raspberry-pi-con-picockpit%2F&text=Easily%20Write%20a%20Script%20on%20Your%20Raspberry%20Pi%20with%20PiCockpit\" title=\"Compartir en Telegram\" aria-label=\"Compartir en Telegram\" role=\"button\" rel=\"noopener nofollow\" class=\"shariff-link\" style=\"; background-color:#0088cc; color:#0088cc\" target=\"_blank\"><span class=\"shariff-icon\" style=\"fill:#0088cc\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 32 32\"><path fill=\"#0088cc\" d=\"M30.8 6.5l-4.5 21.4c-.3 1.5-1.2 1.9-2.5 1.2L16.9 24l-3.3 3.2c-.4.4-.7.7-1.4.7l.5-7L25.5 9.2c.6-.5-.1-.8-.9-.3l-15.8 10L2 16.7c-1.5-.5-1.5-1.5.3-2.2L28.9 4.3c1.3-.5 2.3.3 1.9 2.2z\"\/><\/svg><\/span><span class=\"shariff-text\" style=\"color:#0088cc\">compartir<\/span>&nbsp;<\/a><\/li><li class=\"shariff-button reddit shariff-nocustomcolor\" style=\"background-color:#ff5700\"><a href=\"https:\/\/www.reddit.com\/submit?url=https%3A%2F%2Fpicockpit.com%2Fraspberry-pi%2Fes%2Fescribe-facilmente-un-script-en-tu-raspberry-pi-con-picockpit%2F\" title=\"Compartir en Reddit\" aria-label=\"Compartir en Reddit\" role=\"button\" rel=\"noopener nofollow\" class=\"shariff-link\" style=\"; background-color:#ff4500; color:#ff4500\" target=\"_blank\"><span class=\"shariff-icon\" style=\"fill:#ff4500\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path fill=\"#ff4500\" d=\"M440.3 203.5c-15 0-28.2 6.2-37.9 15.9-35.7-24.7-83.8-40.6-137.1-42.3L293 52.3l88.2 19.8c0 21.6 17.6 39.2 39.2 39.2 22 0 39.7-18.1 39.7-39.7s-17.6-39.7-39.7-39.7c-15.4 0-28.7 9.3-35.3 22l-97.4-21.6c-4.9-1.3-9.7 2.2-11 7.1L246.3 177c-52.9 2.2-100.5 18.1-136.3 42.8-9.7-10.1-23.4-16.3-38.4-16.3-55.6 0-73.8 74.6-22.9 100.1-1.8 7.9-2.6 16.3-2.6 24.7 0 83.8 94.4 151.7 210.3 151.7 116.4 0 210.8-67.9 210.8-151.7 0-8.4-.9-17.2-3.1-25.1 49.9-25.6 31.5-99.7-23.8-99.7zM129.4 308.9c0-22 17.6-39.7 39.7-39.7 21.6 0 39.2 17.6 39.2 39.7 0 21.6-17.6 39.2-39.2 39.2-22 .1-39.7-17.6-39.7-39.2zm214.3 93.5c-36.4 36.4-139.1 36.4-175.5 0-4-3.5-4-9.7 0-13.7 3.5-3.5 9.7-3.5 13.2 0 27.8 28.5 120 29 149 0 3.5-3.5 9.7-3.5 13.2 0 4.1 4 4.1 10.2.1 13.7zm-.8-54.2c-21.6 0-39.2-17.6-39.2-39.2 0-22 17.6-39.7 39.2-39.7 22 0 39.7 17.6 39.7 39.7-.1 21.5-17.7 39.2-39.7 39.2z\"\/><\/svg><\/span><span class=\"shariff-text\" style=\"color:#ff4500\">compartir<\/span>&nbsp;<\/a><\/li><\/ul><\/div>","protected":false},"excerpt":{"rendered":"<p>PiCockpit hace que la creaci\u00f3n de scripts para su Raspberry Pi sea intuitiva y f\u00e1cil de gestionar. Con nuestra PiControl App, puede escribir f\u00e1cilmente un script y crear un bot\u00f3n para ejecutarlo desde cualquier parte del mundo. En esta entrada de blog, te guiar\u00e9 a trav\u00e9s del proceso de escribir un simple script para abrir Firefox en tu...<\/p>","protected":false},"author":2,"featured_media":6888,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[67],"tags":[964,2291,189,193,596,486,447,476,187,456,1058,2292,1848,2139,680],"class_list":["post-6887","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-picockpit-apps","tag-bash","tag-json","tag-pi","tag-picockpit","tag-picontrol","tag-project","tag-projects","tag-python","tag-raspberry-pi","tag-raspberry-pi-projects","tag-remote","tag-remotely","tag-scripting","tag-scripts","tag-ssh"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Easily Write a Script on Your Raspberry Pi with PiCockpit | PiCockpit<\/title>\n<meta name=\"description\" content=\"In this blog post, I&#039;ll guide you through the process of writing a script to open Firefox on your Raspberry Pi using PiCockpit.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/picockpit.com\/raspberry-pi\/es\/escribe-facilmente-un-script-en-tu-raspberry-pi-con-picockpit\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Easily Write a Script on Your Raspberry Pi with PiCockpit | PiCockpit\" \/>\n<meta property=\"og:description\" content=\"In this blog post, I&#039;ll guide you through the process of writing a script to open Firefox on your Raspberry Pi using PiCockpit.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/picockpit.com\/raspberry-pi\/es\/escribe-facilmente-un-script-en-tu-raspberry-pi-con-picockpit\/\" \/>\n<meta property=\"og:site_name\" content=\"PiCockpit\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/pi3gshop\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-25T15:35:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-25T16:26:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2024\/01\/Easily-Write-Scripts-Title-Image.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"675\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"raspi berry\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@pi3g\" \/>\n<meta name=\"twitter:site\" content=\"@pi3g\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"raspi berry\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/easily-write-a-script-on-your-raspberry-pi-with-picockpit\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/easily-write-a-script-on-your-raspberry-pi-with-picockpit\\\/\"},\"author\":{\"name\":\"raspi berry\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#\\\/schema\\\/person\\\/7af3a7a8c999bc722029ef9ca9d78eee\"},\"headline\":\"Easily Write a Script on Your Raspberry Pi with PiCockpit\",\"datePublished\":\"2024-01-25T15:35:13+00:00\",\"dateModified\":\"2024-01-25T16:26:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/easily-write-a-script-on-your-raspberry-pi-with-picockpit\\\/\"},\"wordCount\":579,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/easily-write-a-script-on-your-raspberry-pi-with-picockpit\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/Easily-Write-Scripts-Title-Image.png\",\"keywords\":[\"bash\",\"JSON\",\"Pi\",\"picockpit\",\"Picontrol\",\"project\",\"Projects\",\"python\",\"Raspberry Pi\",\"Raspberry Pi projects\",\"remote\",\"remotely\",\"scripting\",\"Scripts\",\"ssh\"],\"articleSection\":[\"PiCockpit Apps\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/easily-write-a-script-on-your-raspberry-pi-with-picockpit\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/easily-write-a-script-on-your-raspberry-pi-with-picockpit\\\/\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/easily-write-a-script-on-your-raspberry-pi-with-picockpit\\\/\",\"name\":\"Easily Write a Script on Your Raspberry Pi with PiCockpit | PiCockpit\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/easily-write-a-script-on-your-raspberry-pi-with-picockpit\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/easily-write-a-script-on-your-raspberry-pi-with-picockpit\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/Easily-Write-Scripts-Title-Image.png\",\"datePublished\":\"2024-01-25T15:35:13+00:00\",\"dateModified\":\"2024-01-25T16:26:28+00:00\",\"description\":\"In this blog post, I'll guide you through the process of writing a script to open Firefox on your Raspberry Pi using PiCockpit.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/easily-write-a-script-on-your-raspberry-pi-with-picockpit\\\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/easily-write-a-script-on-your-raspberry-pi-with-picockpit\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/easily-write-a-script-on-your-raspberry-pi-with-picockpit\\\/#primaryimage\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/Easily-Write-Scripts-Title-Image.png\",\"contentUrl\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/Easily-Write-Scripts-Title-Image.png\",\"width\":1200,\"height\":675},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/easily-write-a-script-on-your-raspberry-pi-with-picockpit\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PiCockpit Apps\",\"item\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/category\\\/picockpit-apps\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Easily Write a Script on Your Raspberry Pi with PiCockpit\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#website\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/\",\"name\":\"PiCockpit\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#organization\",\"name\":\"PiCockpit.com\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/Screenshot-from-2023-07-24-15-01-24.png\",\"contentUrl\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/Screenshot-from-2023-07-24-15-01-24.png\",\"width\":1165,\"height\":283,\"caption\":\"PiCockpit.com\"},\"image\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/pi3gshop\",\"https:\\\/\\\/x.com\\\/pi3g\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#\\\/schema\\\/person\\\/7af3a7a8c999bc722029ef9ca9d78eee\",\"name\":\"raspi berry\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g\",\"caption\":\"raspi berry\"},\"description\":\"I'm here to help you with all your Raspberry Pi related questions &amp; love to share about new project ideas for the Raspberry Pi, and give quick tips. Of course I'll also help you with PiCockpit and how to make your Raspberry Pi even easier to use with this raspberry pi monitoring solution :-)\",\"sameAs\":[\"https:\\\/\\\/picockpit.com\"],\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/es\\\/author\\\/raspi-berry\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Escribir f\u00e1cilmente una secuencia de comandos en su Raspberry Pi con PiCockpit | PiCockpit","description":"En esta entrada de blog, te guiar\u00e9 a trav\u00e9s del proceso de escribir un script para abrir Firefox en tu Raspberry Pi usando PiCockpit.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/picockpit.com\/raspberry-pi\/es\/escribe-facilmente-un-script-en-tu-raspberry-pi-con-picockpit\/","og_locale":"es_ES","og_type":"article","og_title":"Easily Write a Script on Your Raspberry Pi with PiCockpit | PiCockpit","og_description":"In this blog post, I'll guide you through the process of writing a script to open Firefox on your Raspberry Pi using PiCockpit.","og_url":"https:\/\/picockpit.com\/raspberry-pi\/es\/escribe-facilmente-un-script-en-tu-raspberry-pi-con-picockpit\/","og_site_name":"PiCockpit","article_publisher":"https:\/\/www.facebook.com\/pi3gshop","article_published_time":"2024-01-25T15:35:13+00:00","article_modified_time":"2024-01-25T16:26:28+00:00","og_image":[{"width":1200,"height":675,"url":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2024\/01\/Easily-Write-Scripts-Title-Image.png","type":"image\/png"}],"author":"raspi berry","twitter_card":"summary_large_image","twitter_creator":"@pi3g","twitter_site":"@pi3g","twitter_misc":{"Escrito por":"raspi berry","Tiempo de lectura":"4 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/picockpit.com\/raspberry-pi\/easily-write-a-script-on-your-raspberry-pi-with-picockpit\/#article","isPartOf":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/easily-write-a-script-on-your-raspberry-pi-with-picockpit\/"},"author":{"name":"raspi berry","@id":"https:\/\/picockpit.com\/raspberry-pi\/#\/schema\/person\/7af3a7a8c999bc722029ef9ca9d78eee"},"headline":"Easily Write a Script on Your Raspberry Pi with PiCockpit","datePublished":"2024-01-25T15:35:13+00:00","dateModified":"2024-01-25T16:26:28+00:00","mainEntityOfPage":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/easily-write-a-script-on-your-raspberry-pi-with-picockpit\/"},"wordCount":579,"commentCount":0,"publisher":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/#organization"},"image":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/easily-write-a-script-on-your-raspberry-pi-with-picockpit\/#primaryimage"},"thumbnailUrl":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2024\/01\/Easily-Write-Scripts-Title-Image.png","keywords":["bash","JSON","Pi","picockpit","Picontrol","project","Projects","python","Raspberry Pi","Raspberry Pi projects","remote","remotely","scripting","Scripts","ssh"],"articleSection":["PiCockpit Apps"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/picockpit.com\/raspberry-pi\/easily-write-a-script-on-your-raspberry-pi-with-picockpit\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/picockpit.com\/raspberry-pi\/easily-write-a-script-on-your-raspberry-pi-with-picockpit\/","url":"https:\/\/picockpit.com\/raspberry-pi\/easily-write-a-script-on-your-raspberry-pi-with-picockpit\/","name":"Escribir f\u00e1cilmente una secuencia de comandos en su Raspberry Pi con PiCockpit | PiCockpit","isPartOf":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/#website"},"primaryImageOfPage":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/easily-write-a-script-on-your-raspberry-pi-with-picockpit\/#primaryimage"},"image":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/easily-write-a-script-on-your-raspberry-pi-with-picockpit\/#primaryimage"},"thumbnailUrl":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2024\/01\/Easily-Write-Scripts-Title-Image.png","datePublished":"2024-01-25T15:35:13+00:00","dateModified":"2024-01-25T16:26:28+00:00","description":"En esta entrada de blog, te guiar\u00e9 a trav\u00e9s del proceso de escribir un script para abrir Firefox en tu Raspberry Pi usando PiCockpit.","breadcrumb":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/easily-write-a-script-on-your-raspberry-pi-with-picockpit\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/picockpit.com\/raspberry-pi\/easily-write-a-script-on-your-raspberry-pi-with-picockpit\/"]}]},{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/picockpit.com\/raspberry-pi\/easily-write-a-script-on-your-raspberry-pi-with-picockpit\/#primaryimage","url":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2024\/01\/Easily-Write-Scripts-Title-Image.png","contentUrl":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2024\/01\/Easily-Write-Scripts-Title-Image.png","width":1200,"height":675},{"@type":"BreadcrumbList","@id":"https:\/\/picockpit.com\/raspberry-pi\/easily-write-a-script-on-your-raspberry-pi-with-picockpit\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/picockpit.com\/raspberry-pi\/"},{"@type":"ListItem","position":2,"name":"PiCockpit Apps","item":"https:\/\/picockpit.com\/raspberry-pi\/category\/picockpit-apps\/"},{"@type":"ListItem","position":3,"name":"Easily Write a Script on Your Raspberry Pi with PiCockpit"}]},{"@type":"WebSite","@id":"https:\/\/picockpit.com\/raspberry-pi\/#website","url":"https:\/\/picockpit.com\/raspberry-pi\/","name":"PiCockpit","description":"","publisher":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/picockpit.com\/raspberry-pi\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/picockpit.com\/raspberry-pi\/#organization","name":"PiCockpit.com","url":"https:\/\/picockpit.com\/raspberry-pi\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/picockpit.com\/raspberry-pi\/#\/schema\/logo\/image\/","url":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/07\/Screenshot-from-2023-07-24-15-01-24.png","contentUrl":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/07\/Screenshot-from-2023-07-24-15-01-24.png","width":1165,"height":283,"caption":"PiCockpit.com"},"image":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/pi3gshop","https:\/\/x.com\/pi3g"]},{"@type":"Person","@id":"https:\/\/picockpit.com\/raspberry-pi\/#\/schema\/person\/7af3a7a8c999bc722029ef9ca9d78eee","name":"baya raspada","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/secure.gravatar.com\/avatar\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g","caption":"raspi berry"},"description":"Estoy aqu\u00ed para ayudarte con todas tus preguntas relacionadas con la Raspberry Pi y me encanta compartir sobre nuevas ideas de proyectos para la Raspberry Pi, y dar consejos r\u00e1pidos. Por supuesto, tambi\u00e9n te ayudar\u00e9 con PiCockpit y c\u00f3mo hacer que tu Raspberry Pi sea a\u00fan m\u00e1s f\u00e1cil de usar con esta soluci\u00f3n de monitoreo de la frambuesa Pi :-)","sameAs":["https:\/\/picockpit.com"],"url":"https:\/\/picockpit.com\/raspberry-pi\/es\/author\/raspi-berry\/"}]}},"_links":{"self":[{"href":"https:\/\/picockpit.com\/raspberry-pi\/es\/wp-json\/wp\/v2\/posts\/6887","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/picockpit.com\/raspberry-pi\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/picockpit.com\/raspberry-pi\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/es\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/es\/wp-json\/wp\/v2\/comments?post=6887"}],"version-history":[{"count":11,"href":"https:\/\/picockpit.com\/raspberry-pi\/es\/wp-json\/wp\/v2\/posts\/6887\/revisions"}],"predecessor-version":[{"id":6902,"href":"https:\/\/picockpit.com\/raspberry-pi\/es\/wp-json\/wp\/v2\/posts\/6887\/revisions\/6902"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/es\/wp-json\/wp\/v2\/media\/6888"}],"wp:attachment":[{"href":"https:\/\/picockpit.com\/raspberry-pi\/es\/wp-json\/wp\/v2\/media?parent=6887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/es\/wp-json\/wp\/v2\/categories?post=6887"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/es\/wp-json\/wp\/v2\/tags?post=6887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}