1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Setting up a MyM Launcher on Ubuntu

Discussion in 'Tutorials, Tips and Tricks' started by Meli0, Sep 5, 2016.

  1. Meli0

    Meli0 Well-Known Member

    Messages:
    20
    Likes Received:
    6
    Local Time:
    11:26 PM
    Setting up a Mym Launcher on Ubuntu 5 SEPT 2016 by Meli0

    Intention:

    This instruction with 6 Steps intends to help setup a Ubuntu Launcher and Icon that you can quickly access without excessive navigating to launch it.

    Oracle Java JDK 8 will be installed first.

    There will be editing of scripts, extracting an icon from the MyM-Launcher.jar and editing the launcher application file (.desktop)

    * File edits will be done with sudo or gksu for graphical editors. nano, gedit, vi or any editor may be used based on familiarity.

    * This process is very similar to doing the same with vanilla Minecraft or other Java or "portable" applications that you desire to launch easily.

    * Commands using the home userland work directory paths will be instructed.

    From forum :
    • Positive edits suggestions to this instruction is recommended.
    • Alternative method suggestions recommended.
    • Inclusion in documentation without my permission is agreed and accepted.
    • MyM Forum Pinning for helping Ubuntu based MyM users is intended.


    Step 1 Install Oracle JDK 8 from the command line.

    Adding the Repository, updating and the Java Development Kit Installer is simple from command line.

    Code:
    sudo add-apt-repository ppa:webupd8team/java
    sudo apt-get update
    sudo apt-get install oracle-java8-installer
    Agree to terms and wait for install to finish.


    Step 2 Download and create a custom path to all files

    Download MyM-Launcher.jar directly from Mine Your Mind select Mac + Linux to download the jar file.

    * Please manage your folders and user land how you desire.

    Move or copy mv or cp. the MyM-Launcher.jar to a folder designated :
    * I suggest move (mv).

    ~/Programs/MyM is a work directory to store scripts, icons, jar files.

    * Please manage your folders and user land how you desire.
    * ~ is the path to your home directory /home/user/ simplified to ~

    Move the file

    Code:
    mkdir ~/Programs/MyM
    cd ~/Downloads
    mv MyM-Launcher.Jar ~/Programs/MyM

    Step 2 - Get the built in Icon graphic file from within the jar.

    To get the icon from within the MyM-Launcher.jar. You must open it with archive manager, or mount the archive to access files.

    Do this by right clicking the .jar file, then select open with Archive Manager. - It will open and you will see the contents of the Jar File.


    Code:
    com
    junit
    META-INF
    org
    LICENSE.TXT
    Within the com folder, you will find sub folders and the icon.
    /com/skcraft/launcher/bootstrapper_icon.png


    You must right click and open the image first to save it locally. Because it's within a Java archive, you cannot /copy/paste the image into a folder.

    Open it with Image Viewer of your choice. I use Image Viewer built into Ubuntu 16.04.1

    Once open save it to the /MyM folder using the Image Viewer Save feature. ~/Programs/MyM


    Step 3 Create the bash script.

    Create and edit a new MyM.sh bash script.

    The ~/Programs/MyM/MyM.sh script file will be stored in the /MyM work directory and ran from the MyM Launcher.desktop application file when you click it on the Ubuntu launcher as intended.

    Create the MyM.sh with sudo or gksu or gksudo with an editor of choice (

    *gksu/gksudo allow for gedit or graphical editor to operate under sudo permissions on the graphical desktop.
    * Cli/command line - Use a desired editor with sudo.

    gksudo gedit /home/user/Programs/MyM/MyM.sh


    Copy this script contents

    #!/bin/bash
    cd /home/user/Programs/MyM
    java -jar MyM-Launcher.jar


    Paste and save - Close editor.

    next, set permissions to this script by command line : This makes it executable to run

    Code:
    sudo chmod a+x ~/Programs/MyM/MyM.sh

    Step 4 Creating and editing MyM Launcher.desktop file.

    Edit the MyM Launcher.desktop file.


    The ~/.local/share/applications/MyM Launcher.desktop file will be stored in the user land of a personal user account and will only be reachable by you by using the ubuntu launcher search method.

    * Mind the case of the letters, and there is a space between MyM and Launcher.desktop

    At the command line.
    Code:
    gksu  gedit ~/.local/share/applications/MyM Launcher.desktop
    Copy this into the editor

    Code:
    [Desktop Entry]
    Name=MyM Launcher
    Comment= Launches MyM-Launcher quickly.
    Exec=~/Programs/MyM/MyM.sh
    Icon=bootstrapper_icon.png
    Terminal=false
    Type=Application
    StartupNotify=true

    paste it.
    Save it.
    Close editor application.


    Step 5
    Place the launcher application icon .

    Open File Manager on the launcher, select [Computer] from list and navigate to

    ~/.local/share/applications/


    Locate your MyM Launcher in the folder with the icon displayed, and drag it over to your launcher.


    Step 6 - test.. and Profit

    If all steps are followed properly, launching the MyM-Launcher.jar in Ubuntu will work as desired.

    Profit.

    Meli0
     
    Last edited: Sep 6, 2016
  2. Xfel11

    Xfel11 Consultant

    Messages:
    635
    Likes Received:
    157
    Local Time:
    5:26 AM
    Great guide! You really put great effort into explaining it clearly. But There are some small things you could improve.

    The package name is "oracle-java8-installer" (with a dash between the last two words).

    I noticed that you suggested to put the desktop file into /usr/share/applications. While this does work, it's not the best idea as this will add a global link to a program in your home directory, other users on the computer won't be able to use it.
    Instead, you should put the .desktop file into /home/user/.local/share/applications, that way it will only be visible to you.
    Also, as a general hint, you can replace any '/home/user' reference with the special path element '~', that's a bit more readable. (creating paths like ~/.local/share/applications)

    Additionally, I'd recommend you use code tags around the commands/file contents to make it more readable (Without the spaces inside the brackets):
    [CODE ]sudo apt-get install oracle-java8-installer[ /CODE]
    This will then look like this:
    Code:
    sudo apt-get install oracle-java8-installer
    Actually, as this guide is so well-done, you should consider putting it up for our wiki: Welcome to MineYourMind’s wiki and documentation! — MyM-Wiki 0.0.1 documentation
     
  3. Slind

    Slind Founder

    Messages:
    8,332
    Likes Received:
    3,018
    Local Time:
    5:26 AM
    You might want to update the first post so users don't try the old version.
    Great guide by the way.
     
  4. Meli0

    Meli0 Well-Known Member

    Messages:
    20
    Likes Received:
    6
    Local Time:
    11:26 PM
    Mr Slind, can you delete the second post that I edited it in. Please :)
     
  5. Slind

    Slind Founder

    Messages:
    8,332
    Likes Received:
    3,018
    Local Time:
    5:26 AM
    Gonna need to move my like then :)
     
    wyndman likes this.
  6. Meli0

    Meli0 Well-Known Member

    Messages:
    20
    Likes Received:
    6
    Local Time:
    11:26 PM
    so how do put it on the wiki, use my git account and request access?
     
  7. johnfg10

    johnfg10 Well-Known Member

    Messages:
    2,430
    Likes Received:
    200
    Local Time:
    4:26 AM
    ye pull request it
     
  8. Meli0

    Meli0 Well-Known Member

    Messages:
    20
    Likes Received:
    6
    Local Time:
    11:26 PM
    would anyone like to help me get this on the wiki, i'm not really sure where or how it would fit in anywhere.
     
  9. YourMCGeek

    YourMCGeek Well-Known Member

    Messages:
    473
    Likes Received:
    47
    Local Time:
    11:26 PM
    I can help you if you want.
     
  10. Meli0

    Meli0 Well-Known Member

    Messages:
    20
    Likes Received:
    6
    Local Time:
    11:26 PM
    sure. what do we do?
     
  11. YourMCGeek

    YourMCGeek Well-Known Member

    Messages:
    473
    Likes Received:
    47
    Local Time:
    11:26 PM
    Are you able to hop onto teamspeak?
     
  12. Meli0

    Meli0 Well-Known Member

    Messages:
    20
    Likes Received:
    6
    Local Time:
    11:26 PM
    teamspeak is kde based .. grr. I'll have to flub my system up with kde and qt libs. brb
     
  13. YourMCGeek

    YourMCGeek Well-Known Member

    Messages:
    473
    Likes Received:
    47
    Local Time:
    11:26 PM
    Uhm, does something else work better for you?
     
  14. Meli0

    Meli0 Well-Known Member

    Messages:
    20
    Likes Received:
    6
    Local Time:
    11:26 PM
    ok nevermind, it was just using libraries within.

    what server?
     
  15. YourMCGeek

    YourMCGeek Well-Known Member

    Messages:
    473
    Likes Received:
    47
    Local Time:
    11:26 PM
  16. Meli0

    Meli0 Well-Known Member

    Messages:
    20
    Likes Received:
    6
    Local Time:
    11:26 PM
    Thanks!
     
  17. YourMCGeek

    YourMCGeek Well-Known Member

    Messages:
    473
    Likes Received:
    47
    Local Time:
    11:26 PM
    Of course!
     
  18. Meli0

    Meli0 Well-Known Member

    Messages:
    20
    Likes Received:
    6
    Local Time:
    11:26 PM
    one thing needs to be added :)

    we forgot to set the permission to execute on the mymlauncher.jar :)[DOUBLEPOST=1473770524,1473729203][/DOUBLEPOST]Also- I don't know why. but the Mym-Launcher.Jar was renamed mymlauncher.jar from the download link.

    unless i changed it, i dono. it still needs to be specific.[DOUBLEPOST=1473780015][/DOUBLEPOST]trying to setup my client to pull the page to edit it. but I'm not a developer that uses github. any help on this?
     
  19. Slind

    Slind Founder

    Messages:
    8,332
    Likes Received:
    3,018
    Local Time:
    5:26 AM
    You don't need to pull, when you are logged in, there should be an edit button.
     
  20. Meli0

    Meli0 Well-Known Member

    Messages:
    20
    Likes Received:
    6
    Local Time:
    11:26 PM
    ok i'll check. thanks Slind. do i have access?
     

Share This Page