How to open Joplin from terminal - bash

I have just installed Joplin on Fedora, by simply using wget; more specifically this is waht I typed in my terminal:
wget -O - https://raw.githubusercontent.com/laurent22/joplin/dev/Joplin_install_and_update.sh | bash
All went well and I can now open Joplin by searching it in the Gnome search bar; however I would really like to be able to open it from the terminal, instead of having to search it and then opening it by clicking on its icon.
Typing joplin on my terminal accomplishes nothing.
How can I set up a terminal command to open Joplin? In Windows, for example, I would add the .exe file to the PATH variable.. Is there an analogous way on Fedora or GNU/Linux in general?

I think I will answer my own question here! I realized it's really simple: just make an alias! We can use the search function of our file explorer to find the location of the .AppImage of Joplin, and then simply make the corresponding alias; so it's sufficient to simply type into the terminal:
alias joplin = "/path/to/joplin/appimage"
Done! The next time that we will type joplin the app will be launched! Easy as that!
This should work with any other app too!

Related

Its possible to change the "webstorm" shell command to open a file in WebStorm?

I open files in WebStorm from the terminal with the command webstorm . when I'm working in a directory.
Is there a way to change the command webstorm to anything more, like wstorm or something shorter to open files fluently?
I'm using macOS.
I Know one way but it's temporary, works untill you close the terminal.
-in your terminal
W=webstorm
then you can use $W in your command instead of webstorm.
Looks like the hint above is very good.
So assuming the shell script "webstorm" is working and your question is how to modify the command AND you want to do it fluently.
Make an alias (your shell may vary, mine is bash)
in the appropriate 'dot' file for your shell
add an alias for webstorm -e like this
alias we='webstorm -e'
now when I want to open a file quickly I type
we filename
And this opens Webstorm in LightEdit mode which opens faster and has a link to access full IDE.
Works like a charm. Also, you could make more than one alias so say ws for the full ide. Enjoy

How do you make .sh or .bash files open with Windows Terminal Ubuntu?

I really like coding in bash, but there used to be many limitations of bash functionality in Windows. Though now there are many benefits to the bash windows users now rather than how it was pre windows 10. However, with all of the improvements, there is one thing that I feel leaves to be desired for me. The default behavior of the double-click of .sh files never really was able to do anything in windows, the .sh file extension isn't even available in the "choose default apps by file type" section of the settings. I had a desire to be able to change the default action for .sh files but neglected it and shook it off for a while, but this link finally gave me hope.
Before Ubuntu terminal and the addition of Windows subsystem for Linux, there was really no way to access bash terminal on Windows without a VM. Now with the addition of Windows Terminal which combines Microsoft Azure Terminal, Command Prompt, Powershell, and Ubuntu, it is really awesome for people like me, but despite the new awesome additions to windows allowing further integration of Linux terminal into Windows, even being able to edit the C: drive with Ubuntu.
I am sure there is a way to allow double-click of .sh files to open in windows terminal Ubuntu, but I don't know how. This question helped me on my journey to figure out how to do it and helped me make the default .bat file behavior change to Windows terminal, but I still have come to an enpass where I truly believe that it is not possible. So here is where I go when I have given up, the magical land of Stack Overflow :)
Attempts
So far I have looked into the "Choose default apps by file extension" section of settings and could not find .sh in there nor could I find it in any of the default apps sections of normal settings.
After I couldn't find anything about .sh in settings, I looked into the registry and looked for HKEY_CLASSES_ROOT and looked for sh or anything bash file related in HCR alone, HCR\*\shell, HCR\*\shellx, and HCR\*\Openwithlist and could not find anything.
I then tried to do ftype, but I could not find how to use ftype with .sh. I tried doing ftype .sh="C:\Users\asian\AppData\Local\Microsoft\WindowsApps\wt.exe" -p "Ubuntu" "%1" %* but i got the error "File type '.sh' not found or no open command associated with it."
I Also tried just clicking the .sh file so it brings up the "How do you want to open this file" menu and went to Windows Terminal but it opened the bash file in powershell with the error [error 0x800700c1 when launching `C:\Users\asian\Desktop\test.sh']
These where everything I could think of and none of it was working. Help and pointers are appreciated. Thank you!
I suggest you install the Git for Windows package, as it comes with a light-weight bash environment. This is likely to be able to be in the list of available apps when right-click -> Properties on a .sh or .bash file and say Open With and click the Change button next to Open With.
Other options are Cygwin or WSL for a 95% pure Linux environment on Windows.

Get the command line version of Maple

I am a mac user and I have maple installed on my computer. I can open maple like any other app. However I would like to work in terminal. I googled and
found that I can do that but I need to change some path. It was not well explained. I would really appreciate if someone can help me setting my path.
Thanks in advance.
You do not have to adjust the PATH environment variable. Doing so just makes calling the maple launch script for the Commandline Interface (aka CLI) a little easier.
Open a terminal window (xterm). Find the maple script of your Maple installation. Perhaps it will be located in some directory like /Library/Frameworks/Maple.framework/Versions/Current/bin/ say. You should be able to run that script in your terminal by running it using the full name, eg. /Library/Frameworks/Maple.framework/Versions/Current/bin/maple.
You could also alias the full name (explicit location) to some single short word.
That maple script sets everything it needs to run the Maple binaries, etc. You just have to run it (in a terminal).
Or you could make OSX launch a terminal window and call the maple script. Doesn't OSX have an automator for adding such things to the Dock? I forget the syntax but could it be something like,
open -a "/opt/X11/bin/xterm" --args "-e /Library/Frameworks/Maple.framework/Versions/Current/bin/maple"

Read only for open directories in vim

Then I open vim from terminal and open an directory like vim ., my starts in Read Only Mode.
I cant figure out why this happen and how I can change it.
If I start MacVim everything is fine. But then I start vim from the terminal and open a directory this screen comes. I can navigate one dir up and back again, and I have write access.
EDIT
I installed all my vim settings on Ubuntu 15.04. Now I can use
Does anybody know how to change this behaviour of vim?
Now I can use netw with the command vim . like I always used.
As you can see, there is no RO (read only) mark. How can
I have this in Mac on iTerm too?
What you see is exactly what you are supposed to see when doing $ vim .: the built-in netrw plugin displays a listing of the current directory that you can use to navigate your project.
If you don't want that listing, don't ask for it:
$ vim
or:
$ vim file
ctrl-p is not mapped by netrw; on my system, its set up by the yankring plugin. If vim is doing something other than going up one line, then you have a plugin involved. Try using :map to see what its mapped to; then do a search for that in your plugins directory.
The netrw way of opening a file in the same window is to use the <enter> key, although the g:netrw_browse_split variable may be used to change that default behavior.
Netrw opens in read-only mode, and that's not going to change. The file being opened should not be in read-only mode, however, if that's what you meant. If you're having a problem of that sort, please update your netrw; the most up-to-date version is at http://www.drchip.org/astronaut/vim/index.html#NETRW .
After I installed macvim 7.4 Every thing works!

Associate a file type with emacs/cygwin

I want to use Emacs as and editor and shell.
On Windows 7 I installed cygwin , X11 and emacs.
In terminal I added to /etc/profile file these lines:
XWin -multiwindow 2> /dev/null&
export DISPLAY=:0.0
sleep 1
emacs 2> /dev/null&
I created a shortcut that execute this command: C:\rhcygwin64\bin\mintty.exe -
Now every time I start that shortcut it starts emacs. No problem.
My goal is: associate some file types like .txt , .csv and etc with emacs in order when I start foo.txt it'll open in emacs.
When I tried to do it 'Set Associtation' control it accepts only file name and it does not take '-'. Hence when I try to open foo.txt it does not work. I tried to create a shortcut to mintty.exe but it didn't work either.
Could someone help me to create association in order to start to mintty.exe but rather mintty.exe - ?
Thanks in advance
I am taking my question off .
I realized that my problem is related to subshell issue ... when I try to invoke first cygwin, then emacs under it and etc.
I decided that I will not use much Windows Explorer but rather go directly to the file and open it. This way I don't need file association.
Please close my ticket.
Thanks

Resources