I have a task with these requirements: On Ubuntu 12.04, I need to open an instance of Nautilus (file manager) with a defined path which is set in the Perl script by an user.
Are there any approaches to do it? Thanks for a response.
UPD
And is it possible to select a particular file from all files which are located in a folder (path)?
Your question is really very vague. Without anything else to go on:
system("nautilus", $path);
Related
I am not able to find checkout option for a file when I right click on it in ClearCase explorer while the option is available for rest of the files.
The only difference is that the file I want to check in has a very long name ( I am using Windows ).
While I am able to check in via cleartool commands, it isn't possible from front end ( CC explorer) Is there any way to check out such files from CC explorer?
There are two possible causes for a checkout unavailable:
the path of the file itself is too long (combined with the long filename, more than 256 characters): a subst command can help shorten the path.
or the file is already checked out.
A cleartool status can help distinguish between those two cases.
And a cleartool lsvtree -graph aFile (replace aFile with your long filename) can help see the file history and see if it is checked out (reserved or not) in another view.
The window 255 characters restriction for file name can't be bypass or any sidestep if it.
You have the following options:
1. Try to shorten the name. Including all the folders that are the prefix for the view. Like vonC suggested.
2. Try create the view on Linux, and mount the folder to some shared area that can be seen in windows.
3. Use dynamic view, but Im not sure it will work.
Keep in mind, that other apps can also fail even after you solve it for clearcase as it is a Windows problem. Like msbuild or visual studio.
In our ansible role ,there is a main file which calls tasks from multiple files.
One of the sample task is given below
- name: Delete folder
include_tasks: folder_delete.yml
vars:
folder: "{{folder_name}}"
If i need to go to the file folder_delete.yml thne currently i am copying the file name folder_delete then use Ctrl+p then in it i am copying and open the file.
In other languages , If we click on function and click f12 ,it will go to definition. Like that in ansible extension ,is there any way to go to the file by using some shortcut? I am opening files many times, a shortcut will be a great help
Or is there a way to write that in some macro ?
I found an answer by myself but recording it for future user.
I used the Openfileatcursor extension . I select the file and type alt+d then it shows it in quick open. From there i am able to open it. This helps me a lot.
Also another extension named Openfile . This is even more useful, I have to select the file name and type Alt+p it will open the file
I want to install the lates version of MUSCLE downloaded from http://www.drive5.com/muscle/downloads.htm
named muscle3.8.31_i86win32.exe . As the guidelines
http://www.drive5.com/muscle/manual/install.html
says I have to write the below line in the command prompt:
C:\Program Files (x86)\muscle3.8.31_i86win32 -in seqs.fa -out seqs.afa
However, I faced this error:
MUSCLE v3.8.31 by Robert C. Edgar
http://www.drive5.com/muscle This software is donated to the public
domain. Please cite: Edgar, R.C. Nucleic Acids Res 32(5), 1792-97.
* ERROR * Cannot open 'seqs.fa' errno=2
I am sure the file exists in the mentioned directory, but I don't why has this happened and how can I fix it. Any idea?
The program is reporting that the OS reported that the file doesn't exist. (That's what errno 2 is.)
Testing reveals that relatives paths are resolved relative to the current work directory as expected.
So, your operating system is saying there's no file named seqs.fa in the current work directory.
Double check the name of the file you have. Keep in mind that File Explorer hides known file extensions by default so using dir would be more reliable.
I try to install/run emacs on a Win7 64-bit machine after using it for years on a WinXP 32-bit machine and run into a problem I do not find any help for in the documentation or on the web.
Symptom:
when starting runemacs.exe for the first time it creates the file
*C:\Users\USER\My Documents.emacs.d*
as one would expect (for my administrator as well as for my user account)
and comes up operational
from the second start of runemacs.exe it breaks in the startup phase,
displaying the scratch buffer, ringing the warning bell and displaying in
bottom line the error:
File exists: c:/Users/USER/My Documents/.emacs.d/
buffer messages specifies:
make-directory: File exists: c:/Users/USER/My Documents/.emacs.d/
if runemacs was called with a file to open, i.e. because the file type was
associated with it and the file was opened to edit, the file is not open
and ready to be edited, but a file can be opened via the menu File->Open File...
but my configurations in the file
C:\Users\USER\My Documents.emacs
are not loaded
My goal:
I want to regain the way I used emacs on the old WinXP 32-bit system:
click a file associated with emacs, get it opened and ready for editing, get my configurations in .emacs loaded automatically, i.e. work with emacs seamlessly.
Checks done and failed attempts to fix this:
I tried the following newly downloded versions of emacs
emacs-23.4-bin-i386.zip
emacs-23.2-bin-i386.zip (the one I used on the WinXP)
I had the emacs directory containing the directory stucture (bin, etc, ...)
located at:
C:\Program Files (x86)\emacs-23.4\ (my preferred location)
C:\Emacs\emacs-23.4\
in the download directory, where I originally extracted it
My HOME variable points to:
C:\Users\USER\My Documents (default)
C:\Users\USER\My Documents\ (tried)
My PATH variable contains:
C:\Program Files (x86)\emacs-23.4\bin (default)
or the corresponding other locations which I tried
The ownership and permissions of my C:\Users\USER\My Documents.emacs.d
look OK:
owner is the USER (administrator or standard_user)
permissions grant Full Control
Having originally installed emacs to *C:\Program Files (x86)\emacs-23.4*
using the administrator account, I also tried to use user account installation
instead (to check for some non- obvious parameter/access permission not set
right if the admin account is uses for setup)
For the runemacs.exe executable I manually set the compatibility settings to
Windows XP (Service Pack 3)
default setting after unpacking: no compatibility setting enabled
I removed the private configuration file C:\Users\USER\My Documents.emacs
(inherited from my XP installation) to check whether it produces a screw-up
All that did not change a bit of the described symptom, i.e. either I screwed up
in testing the above and missed a particular setting which should work, or I am looking into the wrong direction...
It is still unclear to me whether this has anything to do with:
W7 64-bit vs. XP 32-bit
environmental parameter screw-up
emacs configuration (.emacs, .emacs.d) screw-up
general stupidity (of me ;-)
... and why is it has emacs a problem with it in the first place, that the .emacs.d directory already exists... That should be the standard case...
Any help and wisdom much appreciated.
First of all, nice question. The details and listing of what you've already tried is helpful.
Some points:
Don't have spaces in key paths (Emacs, and %HOME%). Generally, things work
fine. But when things break it's often hard to debug and trace back to the
fact that some package author didn't take spaces properly into account.
Set a HOME environment variable to your %USER_PROFILE%. Make it
%USER_PROFILE%/home if you must, but I use the former.
Start by running emacs without any customization.
runemacs -Q
When that works, add your customizations one at a time.
n.b. This answer is not relevant to the original question (which was about Windows), but may be useful to Unix users searching for this error message
You will get this error also if emacs does not have the correct permissions on the .emacs.d directory.
Check it
ls -ld $HOME/.emacs.d
And make sure the user you are running under has rwx permissions!
I got similar problems when I installed the new version of emacs on a new installation of the ubuntu 12.10. I get the problem fixed by chmod 777 .emacs.d, that is, as the previous post pointed out, the emacs does not have the access right to .emacs.d directory. Hope this help.
I was wondering if you could help me with my new python program. I recently added a browse button to the GUI to make things more "user-friendly." I told python to only accept *.pvt files when the user is asked to browse for a file... Now, I am left wondering how to tell python to take the path the user browsed to and open a cmd window[using subprocess.Popen("cmd.exe")] and cd to that user defined path.. any ideas???
subprocess.Popen() accepts a cwd argument:
Popen(["cmd.exe"], cwd=mypath)