Open current folder - directory

I recently reinstall ubuntu 16.04 and matlab. The problem is now, there is no "Open current folder' option available when I do the right-click in matlab. I have tried typing "filebrowser" in the command window but nothing happened. Besides, there is no "open/view outside matlab" option available for images. Thanks.

Typing filebrowser in command windows opens the 'current folder toolbar', or selects that if it is already open. If you aren't able to get the 'open current folder' option after right clicking in 'current folder toolbar' then there is the path to current folder shown above the command window, you can just visit that using regular system file browser/explorer, and if you do not have that address bar then just type 'pwd' without the quotes in command window and you get the current folder which you could visit using regular system file browser.

Related

Why do you need to source .zshrc for every new shell in iTerm?

I've used Iterm2 with zsh everyday for the past 3 years, but I got a new computer and had to set it up again. The problem is that when I run ~/.zshrc it works fine, but I have to do it on every new terminal window I open. Not a good experience.
I noticed that I don't have any bashrc, bash_profile, or profile (dot)files on my new machine.
Here's the code in ~/.zshrc:
export ZSH=/Users/healy/.oh-my-zsh
plugins=(
git
)
ZSH_THEME="agnoster"
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
DEFAULT_USER=healy
Again, it works perfectly (and as expected), but only after I run the source command, and that shouldn't be the case.
Make sure your export/source are added after the plugins in your zshrc, as stated in this post:
oh-my-zsh config file not loading
On starting a new shell just run the command source ~/.zshrc by configuring in the
Preferences -> Profiles -> Select Default Profile(default profile will be starred) -> General -> Command -> Select Login Shell -> Send text at start:
Enter the value source ~/.zshrc.
You may add source ~/.zshrc; clear in case you need to clear the screen contents after executing the command.
I had the same issue and changing the Shells Open with option fixed this for me.
To get here:
Open Preferences for Terminal
Select the General Tab
Change Sells open with from Default login shell to Command (complete path) with the /bin/zsh in the input box.
Screeshot:
On 11.2.1 with Terminal 2.11, assuming you have already created .zshrc in your home directory, launch Terminal and select Terminal >> Preferences >> Profiles >> Shell
Under "Startup" check "Run command:" and input source ~/.zshrc
In my case, oh-my-zsh is not loaded because the line was comment out.
# IT'S WRONG! NEED TO UNCOMMENT
# export ZSH=/Users/$(whoami)/.oh-my-zsh
Though this question is not due to the same "comment out" obviously, I came to a conclusion that, if you need to source ~/.zshrc every time opening a shell instance, there should be some issue with your .zshrc,
and check oh-my-zsh and antigen(maybe) work fine.
for me,It works like this.
Profiles 》Open Profiles 》Select “Edit Profiles” 》Profiles 》General
and put "source ~/.zsh" into Send text at start textfield.

Unable to open Atom

I am unable to open my Atom Editor. It was working fine until yesterday, but don't know why it won't open today. No windows update or anything on my computer. I tried deleting the 'Storage' folder as mentioned in some online forums, doesn't help. Any suggestions? I am using Atom version 1.19.6.0.
If you're using MAC OS and have similar problem, try this:
Open Window tab
and then click Zoom.
Atom will sometime fail to open because of a bad configuration-file.
To better diagnose this on Windows (10), try running atom from a CMD window:
Open the task-manager and kill any instance of Atom that is listed there
Open a Command-window -
Ctrl+Esc > (type "command") > Enter
Go to where Atom is installed -
cd %USERPROFILE%/AppData/Local/atom/app-*
Run Atom -
atom.exe
If you see an error message at this point, it should help identify the problem.
If still not clear, you can try moving the main configuration-file,
which is in a different folder:
cd %USERPROFILE%/.atom/
rename config.cson config.SAVE.cson
Go to where Atom is installed (again) -
cd %USERPROFILE%/AppData/Local/atom/app-*
Run Atom -
atom.exe
Based on this answer on the Atom forum:
https://discuss.atom.io/t/atom-will-not-open-windows/47489
I experienced this issue when my Atom windows all suddenly resized to be so small I could not see or find them anywhere (some weird glitch with opening it from a full-screen window on an external display). I resolved it by command-tabbing (I think it's ctrl-tab on Windows, I forget) to my open atom application to bring up the application's menu bar, and then selecting Window > Zoom from the menu.
I am using Atom on Windows 10 64-bit, and had similar problems of installation and not running later.
You can do the following:
Empty Trash, and Temp and Prefetch folders.
Change the security and read only properties of the temp folder.
IMP > Disable antivirus and run atom it will work, later add the Atom app to exclusion list of your antivirus.
Open the task-manager and kill any instance of Atom that is listed there
Got to where Atom installed : Mine:> C:\Users\%userprofile%\AppData\Local\atom
See this Image
Go to Folder indicated in the picture and find atom.exe by scrolling through the folder and open it and make a shortcut to desktop and it will work.
I found that mv command is not builtin Windows cmd as suggested by Gonen. So following the idea of Gonen, a working solution can also be like:
In windows explorer type %USERPROFILE%/.atom/, or manually go to the path
(in my case): C:\Users\hussainazhar.atom. Of course, go to your drive path accordingly. Close Atom application if already opened.
Simply rename the config.cson to config.SAVE.cson
Open up the Atom and now you can go to the settings :)
All you simply need to do is go the main directly where the file is located and open the FIRST folder.
After opening it, there you will see atom file, double click on it and it will be opened successfully.
The atom Window is just minimized, it gives the impression of not openning, but it is actually opening, again is just minimized.
I was able to see the atom interface, by maximizing the window using the keyboard:
on windows, it normally is Alt+SpaceBar+x.

rmarkdown: specify manually pandoc path?

I have a rmarkdown document that I render regularly with rmarkdown::render
It works fine on my computer (Windows) as I have RStudio installed, and it has setup automatically the path to pandoc.
However when I try to run it on my server (outside RStudio), it fails with error that pandoc is not found.
How can I set up manually the path the pandoc from my script? Without changing the configuration on the server.
I have tried this but it doesn't work:
Sys.setenv(RSTUDIO_PANDOC="PATH_TO_MY_PANDOC_BIN/binaries/pandoc/pandoc.exe")
I suggest to set the system path for pandoc (Windows 10 instructions):
1. In the Start menu, search for "Edit the system environment variables"
2. At this point, Windows may ask you for username + password (for a user with permission to change system settings)
3. Click "Environment Variables" button
4. In the lower part of the window (System variables), select the line with "Path" and click Edit
5. Add the path to the folder where pandoc.exe is, but not including "pandoc.exe" or a slash at the end
Sys.setenv(RSTUDIO_PANDOC="PATH_TO_MY_PANDOC_BIN/binaries/pandoc/pandoc.exe")
That is actually almost correct, just omit the *.exe files, write the path only up to folder contain pandoc.exe
like this :
Sys.setenv(RSTUDIO_PANDOC="PATH_TO_MY_PANDOC_BIN/binaries/pandoc")
i believe this doesn't require admin rights

Atom editor opens to empty window and dev tools

I installed a buggy package in Atom which has been crashing the editor repeatedly. So, I went into Atom Settings to remove it, but just out of curiousity I clicked the "Open Config Folder" button beforehand which opened an empty window and dev tools alongside:
Atom subsequently crashed (probably because of the buggy package I was about to install) and now when I open Atom, I only see the above window and nothing else, even if I open it from the "Open with Atom" context menu from any folder. So, now I'm stuck with just this window and no actual Atom Editor.
I tried re-installing Atom and it did not solve the issue. I checked the "Atom" menu available in that window and it only gives me basic options: "Check for Update", "Reload", "Close Window", "Toggle Dev Tools", and "Quit", none of which can get me back to the main editor window.
Anybody seen this before or know how to break out of it?
I got the same problem but on Ubuntu. I tried apt-get --reinstall and purge but both did not work.
Turns out it was just no read permissions for /home/username/.atom/
All I did to fix it was:
sudo chmod 777 -R '/home/username/.atom'
I found a quick solution for this. The Atom uses a BLOB file to store data from the last user session and re-open that when Atom is restarted. By removing that file, Atom restarted at it's default state.
You can find that file on a Windows machine here:
C:\Users\[Username]\.atom\blob-store
Just delete, or rename, the file BLOB. Then, just open up Atom and you should be good to go.
Try this:
Close Atom
Remove C:\Users\[Username]\.atom\storage\application.json
Start Atom

Shortcut for command line directory change cd in Windows?

I use Windows Vista and I was wondering if there was a shortcut to open the command line directly in the current directory (the one that has the focus). It is actually quite painful to copy/paste each time the current directory in the command line.
Hold down shift and right click in the directory. The menu that pops up will have the option to open a command prompt there.
Just hold down shift while right-clicking the folder and one of the additional options will be "Open Command Window Here".

Resources