Tag: Linux

  • Installation of Salome-MECA (Salome and Code_Aster)

    Installation of Salome-MECA (Salome and Code_Aster)

    If you are interested in serious open source FEM software, this is a tool stack to look at.

    Salome platform is a CAD and meshing software mainly for Linux systems. When combined with Code_Aster FEA package it is generally called Salome-MECA. Together this combination of software provides very extensive tool set for Finite Element Analysis.

    Let’s start by downloading the appropriate version of Salome-MECA from here. In this tutorial we go with Salome-MECA version 2017.0.2.

    After downloading the package, you may want to check the md5sum to be correct. Type

    md5sum Salome-Meca-2017.0.2-LGPL-2.tgz

    and see if it matches with the one given on the download page.

    After that move the package to a preferred location (for example in /home/user/). And then type

    tar xvf Salome-Meca-2017.0.2-LGPL-2.tgz && ./Salome-Meca-2017.0.2-LGPL-2.run

    This installs Salome-MECA in the directory of your choice.

    Also a shortcut is created on your desktop automatically during the installation.

    After successful installation you can run the program by clicking the shortcut icon or by opening the terminal in the installation folder named salome_meca/appli_V2017.0.2. and typing ./salome

    You will also see Salome-MECA splash screen..

    ..as the graphical user-interface of Salome will open up.

    Now you are ready to explore the capabilities of your new tool set.

    Some document in Code_Aster website’s support section are translated from French automatically and hence not always convenient to read. However, there are very good training materials available at https://www.code-aster.org/V2/spip.php?rubrique68. I recommend you start there.

    Please, leave me a comment if you have any further questions or you would like see some Salome-MECA tutorials in this blog.

  • Enabling USB Keyboard and Mouse to Wake-up Ubuntu from Suspension

    Enabling USB Keyboard and Mouse to Wake-up Ubuntu from Suspension

    After having a new all-in-one type of computer with Bluetooth keyboard and mouse set, I faced the problem that Ubuntu could not be waken up from suspension by using the keyboard nor the mouse. After searching for a solution for some ten minutes, I decided to make some notes after finding the best solution to fix this. My article is based on this thread.

    Let’s first check the status of USB devices:

    I my case it is the 1-1.3 device which is the keyboard and mouse set, more precisely named as HP Wireless Keyboard Mouse Kit. This can be found out by looking at the following file:

    /sys/bus/usb/devices/1-1.3/product

    Now we would like to enable all the ports.

    echo enabled > /sys/bus/usb/devices/1-1.3/power/wakeup
    echo enabled > /sys/bus/usb/devices/1-1.4/power/wakeup
    echo enabled > /sys/bus/usb/devices/1-1/power/wakeup
    echo enabled > /sys/bus/usb/devices/usb1/power/wakeup
    echo enabled > /sys/bus/usb/devices/usb2/power/wakeup
    echo enabled > /sys/bus/usb/devices/usb3/power/wakeup

    Make sure that works well for you. After that we want to make the script executed after every reboot.

    sudo su
    sudo nano /etc/rc.local

    Copy paste all the code rows which begin echo enabled.. to the file before exit 0.

    Exit with “ctrl+X” and save with “yes”.

    Now you should be able to wake up your computer by using a keyboard or a mouse. And the status of usb ports should be set as enabled after every reboot. In my case, looks like this:

     

     

     

  • Installing Calculix Launcher

    Installing Calculix Launcher

    Calculix is an open source finite element analysis software. And Calculix Launcher is a tool that provides a nice graphical user-interface between the components of the tool stack. Read more from here.

    This guide is primarily written for my self to point out the steps of the procedure of installing the tool set on a fresh Linux desktop environment. There is a video (by calculix09) of which shows the same steps in very detail, so I recommend using that if you are not familiar with the software. However, the list below may be used as a handy checklist later.

    1. Download appropriate installation package from Yandex drive (by launcher3) via this link. Note: Use the link at your own risk. All software are licensed by their authors. The writer of this blog post has no responsibility related to the software.
    2. Extract the archive
    3. Change the permission to “Allow executing file as a program” by right clicking the executable icon and selecting the Permissions tab on Properties window.
    4. Copy the path of bin -folder under the CL32-linux64 -directory (press ctrl+L inside the folder).
    5. Open terminal and type cd and paste the path, for example: cd /home/joni/CL32-linux64/bin
    6. Let’s make all binaries executable by typing command: chmod 777 *
    7. Now we can run the Launcher by double-clicking the executable icon (you may want to pin the icon to Ubuntu launcher after that)

    That’s it. The Calculix Launcher is now available.

    Let’s change some settings.

    1. On Launcher Menu, select Settings and set gedit as Name of Text Editor.
    2. On Menu, select Run GSMH.
    3. On GSMH Tools, select Options, General and Advanced tab, to Text editor command add gedit '%s'
    4. Select File, and Save Options As Default

    In case you want to see examples how to use it, please leave a comment below and I will publish some tutorials here.

  • The Most Essential Software to Install on Ubuntu

    The Most Essential Software to Install on Ubuntu

    Time to time you may want or need to refresh your linux desktop by re-installation or you are forced to switch from a hardware or an operating system to another. And when it happens you need to setup everything for the basic usage. Of course, on many distros you may have a software center or similar where to download the software from. But it seems that often the default versions of these software are not the latest stable version or does not exist at all.

    This is my check list for Ubuntu how to install the most necessary stuff for myself.

    Git

    sudo apt install git
    git config --global user.email "you@example.com"
    git config --global user.name "Your Name"

    Spotify

    sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886 0DF731E45CE24F27EEEB1450EFDC8610341D9410
    echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list
    sudo apt-get update
    sudo apt-get install spotify-client

    Sublime Text

    wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
    echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
    sudo apt update
    sudo apt install sublime-text

    Openshot

    sudo add-apt-repository ppa:openshot.developers/ppa
    sudo apt update && sudo apt install openshot-qt

    Freecad

    sudo add-apt-repository ppa:freecad-maintainers/freecad-stable
    sudo apt-get update
    sudo apt-get install freecad freecad-doc && apt-get upgrade

    Chrome

    wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
    sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
    sudo apt-get update
    sudo apt-get install google-chrome-stable

    Nextcloud

    sudo add-apt-repository ppa:nextcloud-devs/client
    sudo apt-get update
    sudo apt install nextcloud-client

     

  • Nextcloud Client for Linux

    Nextcloud Client for Linux

    If you have been following the open source cloud storage software scene lately, you may know the history of ownCloud and Nextcloud. In short, Nextcloud is a fork of ownCloud, an open source project that consists of client and server software for creating and running file hosting services for personal and enterprise use. I personally understood that the project split up after some key persons could not share a same vision  regarding the level of having close source code for the enterprise customers. Since I may have totally misunderstood what it was all about, have a look at yourself: Nextcloud’s introduction and ownCloud’s statement about it.

    I am a huge fan of the project, I liked the idea of former ownCloud and later I got along with Nextcloud. However, all the software were available for all kinds of platform very shortly after the split up. I still missed the Nextcloud branded desktop client for Linux. There was a some sort of theming repository available but it was not straight forward to install for a less advanced user. And even today the default client in the “app stores” of many Linux distributions for this service is the original ownCloud branded client software.

    In case you have also being looking forward the Linux Nextcloud client, here they are, you can download it for Ubuntu/Debian as a PPA (explanation). To do so, use command line (open Terminal) and type:

    sudo add-apt-repository ppa:nextcloud-devs/client
    sudo apt-get update
    sudo apt install nextcloud-client

    Happy Nextclouding!

  • Getting on with Hass.io

    Getting on with Hass.io

    The first time I tested Home Assistant software was couple of years ago and it was on Linux desktop. I liked the idea and the execution, and it made me think I would like to able to build my own custom kit for some random home automation. So I decided I will get back to this as soon as I have a suitable platform to constantly run the software on. Later on, I found myself having a spare piece of Raspberry Pi 2 mini computer. Since then I have happily run Home Assistant on my Raspy and used it mostly for some lighting adjustments etc. Back then I installed my Home Assistant as Hassbian, which is a customized operating system for the Raspberry Pi. It was so far the easiest to install and use but requires the traditional command line access for maintenance actions. And now this may have changed. Follow through this tutorial and become a Home Assistant user in no time! All you need is a Raspberry Pi and minimum 4 GB SD card.

    Hass.io is a dedicated operating system that takes care of installing and managing Home Assistant software on Raspberry Pi. It was introduced in H0me Assistant blog post at the end of July 2017.

    Installation

    Let’s dive in. You may start the installation by looking at these instructions. Choose and download the software package depending on which device you are going to install Hass.io on. I went with Raspberry Pi 2. Extract the resinos-hassio-1.0-raspberrypix.img.bz2 file and flask it to your SD card using Etcher. Flashing may take up to 5-10 minutes. At this point we could setup the WiFi or static IP as the instructions suggest as an optional step. However, we go now without it. Since I will be are using an Ethernet connection with a router there should be no configuration required and it should work out of the box. Also, one could consider setting up a static address being not necessary – or even recommended at all. All right, let’s insert the SD card into Raspberry Pi and switch on the device.

    You can open a new browser tab and navigate to http://hassio.local:8123/ and wait couple of minutes. After the reboot ResinOS downloads Home Assistant and starts the installation. You will be soon able to see the following view at your browser window:

    preparing hass.io

    For me it took around 15 minutes Hass.io being setup and running. You will see the default Home Assistant welcome screen in your browser:

    welcome screen

     

    Getting Started

    Nice. Now we have a fresh Home Assistant installation properly running. Obviously the next actions are setting up configurations and automations. To do so, we still need to do some adjustments. The design philosophy of Hass.io seems to be making the management of Home Assistant via web browser GUI as easy as possible. However, as far I know it does not yet support full control over the configuration files. Hence, we need to build some kind of access to the file base. There are couple of options for this but for sake of simplicity we deside not to prefer any command line tool for this but go with Samba add-on, which gives us a way to handle the files on our local desktop environment.

    To install Samba follow these step on your Home Assistant instant opened in browser windows:

    1. On the left hand side menu click on Hass.io tab
    2. You will be noted there are no add-on installed, click on the link to add-on store
    3. Add-on store opens in the same view
    4. Scroll down to Samba Share and select it
    5. Click install
    6. It shows Info and Options but go with the defaults and click Start
    7. On the left menu again, select the first icon (Services) under Developer Tools
    8. Select the Domain as homeassistant and as Service set restart
    9. Then click on Call Service
    10. You will see a notification Connection lost. Reconnecting…
    11. After a minute or two Home Assistant is rebooted and Samba Sharing should be enabled

    Now you are able to find your Hass.io files from your desktop computer that is using the same WiFi network as the Rasbperry Pi. You can browse in the file system Network folder and find HASSIO directory. On Ubuntu it looks like this:

    windows sharing

    There you can find configuration.yaml and automations.yaml-files, which allow you to freely tweak and customized your Home Assistant installation as normally. Look at the tutorial and example resources at Home Assistant website to get started. Also, come back to check my next Home Assistant post I will make for introducing some of the basic and most useful setups. Good luck!

  • Joomla! Installation on Remote Server

    Joomla! Installation on Remote Server

    To install Joomla! -publishing platform on remote server follow the these steps:

    1. Login to you server account via ssh: ssh username@service.com and enter your credentials.
    2. cd to the right directory you are intended to serve your web site from (public_html, www or similar)
    3. Download Joomla! installation package: wget https://downloads.joomla.org/cms/joomla3/3-7-3/Joomla_3.7.3-Stable-Full_Package.tar.gz You can check the latest version at: https://downloads.joomla.org/ but see the note at the end of this post!
    4. Extract the package: tar -xzvf Joomla_3.7.3-Stable-Full_Package.tar.gz
    5. Open browser and navigate to website.service.com
    6. Joomla! web installer opens up
    7. Define Site Name, Description and Super User Account Details
    8. Input Database details
    9. See the summary that all the system requirements are fulfilled and press install
    10. Installation is run in seconds
    11. After the installation is ready you may download language packages right away if needed or continue by logging into the site as administrator.

    Note: At the time of writing the latest stable version of Joomla! was Joomla_3-7.4-Stable-Full_Package. However, while trying to install that version I run into problems. The installation got stuck in the first step. It seemed that it was a bug that many people had faced and based on the this discussion on github it will be fixed for the next version. Until then I recommed installing 3.7.3 as done above and updating the software right after the process. The previous full packages of Joomla! can be found at https://downloads.joomla.org/cms. Click on Downloads to display the official series of Joomla! releases.

  • WordPressin asennus Kapsille

    WordPressin asennus Kapsille

    This tutorial is in Finnish language because it concerns a highly local service.

    WordPress -julkaisualustan asennus on helppoa. Näitä ohjeita seuraamalla asennat julkaisualustan Kapsin tai vastaavan palvelun serverille. Ohje toimii sellaisenaan Linux -käyttöjärjestelmällä, kuten Ubuntu tms. Windowsilla komentoja täytyy soveltaa ja esim. ssh:n sijasta käyttää Putty-ohjelmaa tai vastaavaa.

    1. Aluksi tarkista, että sinulta löytyy tarvittavat tiedot tulevia toimenpiteitä varten. Tarvitset tunnukset palvelimelle, jossa kotisivuhakemistosi sijaitsee sekä tunnukset ja salasanan tietokannan määrittämistä varten. Kapsilta tietokannan (MySQL) saa käyttöön ylläpidolta pyytämällä.  Mikäli haluat uuden alidomainin WP-sivustolle (esim. sivusto.kapsi.fi), myös näitä saa Kapsin ylläpidolta pyytämällä .
    2. Avaa ssh-yhteys palvelimelle. Linuxilla komennolla:
      ssh username@kapsi.fi
    3. Syötä palvelun salasana
    4. Navigoi oikeaan sivustohakemiston www-kansioon komennolla:
      cd sites/sivusto.kapsi.fi/www
      Vinkki: komentorivin kautta navigointia helpottaa jos esim cd sites -komennolla yhden hakemistoportaan siirtymisen jälkeen tarkistaa alikansiot komennolla ls.
    5. Lataa WordPressin asennuspaketti komennolla:
      wget https://wordpress.org/latest.tar.gz
    6. Pura pakattu asennuspaketti komennolla: tar -xzvf latest.tar.gz Tiedostot purkautuvat wordpress -nimiseen kansioon.
    7. Mikäli haluat että WP toimii sivuston juuressa, siirrä kansion sisältö yhden hakemistotason ylemmäs ja poista wordpress -hakemisto. Tai jos haluat käyttää WP -julkaisuja nykyisen kotivun alisivustona uudelleennimeä tämä uusi hakemisto esim. blog -nimiseksi, jolloin sen URL on sivusto.kapsi.fi/blog
    8. Siirry selaimella osoitteeseen sivusto.kapsi.fi tai sivusto.kapsi.fi/blog sen mukaan mikä polku asennukselle valittiin.
    9. Selaimeen aukeaa WP-asennuksen viimeistelyikkuna
    10. Ensimmäiseksi määritetään tietokanta: tietokannan nimi, käyttäjätunnus, salasana, tietokantapalvelin (db1.kapsi.fi) ja tietokantataulujen etuliite (wp_), eli prefix. Prefix mahdollistaa saman tietokannan käytön useammalle ohjelmalle (esim. OwnCloudin etuliitteksi oc_ jne).
    11. Tämän jälkeen asetetaan sivuston nimi, sivuston ylläpitäjän käyttäjätunnus ja salasana sekä sähköpostiosoite. Sivuston nimen voi vaihtaa myöhemmin, mutta käyttäjän tiedot kannattaa asettaa huolellisesti, jotta sivustolle pääsee heti ongelmitta kirjautumaan.
    12. Kirjaudu sisään. WP on valmis uusien julkaisujen tekemistä varten!