Skip to main content

Run Python, Java or any other language in Linux using Gedit.

In the world of programming, Linux has always been a go-to platform for developers due to its flexibility, power, and open-source nature. Linux offers a multitude of options for coding and scripting, allowing programmers to leverage their favorite programming languages seamlessly. While there are numerous text editors available for Linux, one particular editor stands out for its simplicity, versatility, and widespread usage among developers - Gedit.

Gedit, the default text editor for the GNOME desktop environment, is lightweight, intuitive, and highly customizable, making it an excellent choice for editing code in Linux. But did you know that Gedit can do much more than just editing? It can also be transformed into a powerful integrated development environment (IDE) capable of running programs written in various programming languages, including Python, Java, C++, and many others.

In this blog post, we will explore how to harness the potential of Gedit and leverage it as a tool for executing and testing code in Linux. Whether you are a seasoned programmer or a beginner taking your first steps in the world of coding, this guide will provide you with a solid foundation for running Python, Java, or any other language right within Gedit, saving you the hassle of switching between different applications or terminals.

Let's dive in and discover the magic of running code within Gedit in Linux, streamlining your coding workflow and enhancing your productivity.

For this tutorial we will run the classic hello world python program.

 


 







1.In Gedit Click the menu icon and open the preferences tab.



 

 

 

 

 

 

 

 

 

 

 

 

 

 

 2. Select Plugins and tick the box labeled external tools.



 

 

 

 

 

 

 

 

 




 3.Once that is done go back to the menu icon and you will see an option to manage external tools.



 4. In the manage external tools tab click + icon to add external tool. paste the line bellow in the script and select a language and give a keyboard shortcut to the tool.

 


 

5. Replace highlighted "command" with the command that you need to run the code fr this example the command is python3. if you are unsure I will have the commands for a few programming languages on my GitHub, just click here. 


6. My keyboard shortcut was Shift+F1 so if I push those keys a new terminal will open withe the output of the code.



 

Thanks for visiting Net Cloud Insights comment bellow any questions or suggestions. a video tutorial will be out soon on YouTube and on an updated version of this post.

 


Comments

Popular posts from this blog

How to Host a Website/Web app on AWS Elastic Beanstalk with Node.js

 In this tutorial, we will learn how to deploy a website/web app on AWS Elastic Beanstalk using both Python. AWS Elastic Beanstalk is a fully managed service that makes it easy to deploy, manage, and scale applications. Whether you're building a simple personal website or a complex web application, Elastic Beanstalk simplifies the process of deployment and server management. We start of by visiting the AWS Elastic beanstalk developer guide, sample sand tutorial page  here . ☉ Extract the nodejs.zip file and open the index.html ☉ Replace the html code in the index.html file with your own code and save your changes. ☉ compress the contents. ☉ On the AWS console click services ⇨ compute ⇨   Elastic Beanstalk ⇨  Create Application ☉  Select "Web server environment" for the environment tier. ☉  Give the application a name. For this tutorial its "nodeJStutorial" ☉ The Environment name will be auto-generated. You can add a domain name, but check its avai...

How to Host a Website/Web app on AWS Elastic Beanstalk with Python

In this tutorial we will deploy a website/web app on AWS Elastic Beanstalk using Python. AWS Elastic Beanstalk is a fully managed service that makes it easy to deploy, manage, and scale applications. Whether you're building a simple personal website or a complex web application, Elastic Beanstalk simplifies the process of deployment and server management. We start of by visiting the AWS Elastic beanstalk developer guide, sample sand tutorial page  here . ☉ Download the python.zip file. ☉ Extract the python.zip file and open the application.py file in any text editor ☉ Replace the html code with your html code in the triple quotes of the welcome variable and save the changes. ☉ Compress the contents of the python folder. ☉ On the AWS console click services ⇨ compute ⇨   Elastic Beanstalk ⇨  Create Application ☉  Select "Web server environment" for the environment tier. ☉  Give the application a name. For this tutorial its "pythonTutorial" ☉ The Environm...