Some questions about Ubuntu permissions and shortcuts - eclipse

I just downloaded Eclipse IDE and Netbeans directly from the websites and installed then in my Ubuntu 12.04. I have some questions:
1 - How can I add their shortcuts in the Ubuntu's sidebar?
2 - When I add shortcuts in desktop using the gnome-desktop-item-edit app, I can't have super user permissions to manipulate then, the Netbeans IDE (that uses a script file to start) shows lots of erros telling that some files are read-only. How can I add sudo privileges in a launcher created with gnome-desktop-item-edit?
Sorry by my poor english.

As far as question #1, first, open the program. Find its icon on the side bar, and right-click it, then select “Keep in Launcher.”
As for #2, in Ubuntu, you can edit the item to run with gksudo COMMAND, but that's extremely unwise (running anything with elevated privileges on the desktop. You should probably instead fix the permissions of the relevant files (right-click on the file, and give yourself permission)

Well, after some days trying to find the better solution for my problem, I think that the better solution is first, Download Eclipse and/or NetBeans IDE from the Ubuntu Software Center and after:
For NetBeans:
Use the IDE's plugin's manager to download the needed ones, and make (if you want) an IDE update process.
For Eclipse:
After download, follow the steps of this link.
After follow this, you can easely create favorite links to your "sidebar" if you use Gnome 3 as me, or make desktop shortcuts without needing sudo privileges, just using the gnome-desktop-item-edit tool or whatever you prefer.

Related

Editing WSL config files\code etc with Visual Studio Code, in Windows

I am really enjoying WSL and using it for a lot of stuff these days, including my Ansible workstation, also writing a lot more code in it...
Question: I can see where the WSL file system is:
https://askubuntu.com/questions/759880/where-is-the-ubuntu-file-system-root-directory-in-windows-nt-subsystem-and-vice
All of the docs tell you very clearly to stay away from the Linux file system and not to access it from the Windows instance it is running under. Fine. But! I hate to ask redundant question, but I would dearly, dearly love to be able to use full blown graphical VS Code in Windows in my text editor for WSL. Am i missing a trick somewhere for a way to do this without breaking anything?
Apologies for the non question. Hopefully it is allowed.
In vscode...
You can press the green icon bottom-left
This will open the command palette
Choose "New WSL Window"
Open a folder, you will be able to navigate from ~ to choose location in command palette
Once folder is choosen, you're set to go, vscode will display file tree from opened folder and you can do your thing :)

Install VSCode in a specific folder

I just downloaded the Visual Studio Code App from https://code.visualstudio.com/ and when I tried to install it, it simply just installed it by itself, without the option to change the installation path.
I have an external harddrive, which is where I want the IDE to be placed instead of the Local Harddrive. How can I change this?
On the VSCode download page select "System Installer" instead of "User Installer". The System installer will prompt you for the install location.
Full credit to Hans Passant for giving the following working solution as a comment.
The installer does very little beyond copying the files, it just creates some Explorer context menu shortcuts ("Open with Code"). Otherwise following Chromium conventions and copying itself to c:\Users\yourname\AppData\Local\Code\app-0.1.0 so it can update itself without you noticing. Boo. So high odds that simply moving that folder to the other drive works just fine, put it anywhere and create a shortcut to Code.exe. If you still want the context menu entry to work then use Regedit and search for "code\app-0.1.0".

Anypoint Studio (Eclipse) on Windows 7 with multiple users

I'm trying to create a Windows 7 VM that can be used be developers to do various development work. I've installed Anypoint Studio, and I find that each of the user's workspaces is visible to all of the other users, and in fact the workspace launcher defaults to the last used workspace. Is there a way around this? I.e., when user A logs in, user A can only use user A's workspace? Thanks!
That's the way that Eclipse works on Windows, it will happen with any IDE based on Eclipse.
I believe what you can do, probably not the best, is to have an installation of Studio in a folder inside of the user profile, so each user will have it's own installation.
Or, probably better, you can create an specific shortcut for each user and in the shortcut you can add the command line to open an specific workspace.
You need to add -data your_workspace_location
And be sure that each workspace is saved in a user profile directory, so the rest of the users will not have OS permissions to access that folder, but that depends on how you create the users and the permissions in your Windows.
Hope this helps you.

Eclipse Update Failing with Message "Insufficient access privileges to apply this update"

I'm running Eclipse under a Windows 7, 64-bit installation on which I have administrator privileges.
Since I first installed Eclipse many months ago, I've been able to keep it up to date with the Help > Check for Updates function—but starting a couple of weeks ago, it gave the message
Insufficient access privileges to apply this update.
Even when I ran Eclipse as an administrator, I continued to get this message. How can I fix it?
For anyone using Linux: I had this problem in Ubuntu because I had installed Eclipse in /opt, which was owned by root.
To get the updates, simply run Eclipse as root and then select the Help -> Check for Updates again. In general running applications as root is not a good idea, but if it's just to do an update... well that's what the root account is for :)
cd /opt/eclipse
sudo ./eclipse
Another (simpler?) approach which worked for me is to simply give the group "Users" write permission on C:\Program Files (x86)\eclipse.
Now, this is a security consideration, but you're NOT granting access to the whole of C:\Program Files (x86), just the eclipse installation.
I found a workaround for this stupid bug in Eclipse. Selecting updates one-by-one is disabled, but if you click Select all and then deselect the ones you do not need, you can proceed.
In Windows another option is to set the "Run as administrator" property on the Eclipse shortcut that you're using to start Eclipse. Right click on the shortcut and choose "Properties" from the dropdown menu. Click on the "Shortcut" tab in the Properties dialog and then click on the "Advanced..." button. In the Advanced Properties dialog set the "Run as administrator" option.
Hit same problem on Macos sierra 10.12.3 after clean install of Eclipse JEE Neon R. A clue was that my mac showed a dialog when I launched the app that asked:
“Eclipse.app” is an application downloaded from the Internet. Are you sure you want to open it?
When the updater dialog box showed "Insufficient access privileges to apply this update" I checked the Eclipse.app directory (I had downloaded & unpacked the .tar.gz file, if that matters) and saw this:
drwxrwxr-x# 3 chris staff 102 Jun 13 2016 Eclipse.app
I examined the extended attribute and saw this:
$ xattr Eclipse.app
com.apple.quarantine
That quarantine attribute seems to block the Eclipse updater! I removed that extended attribute like this:
xattr -d -r Eclipse.app
After that Eclipse updated itself very happily. HTH
For Linux Distros, most personal apps for all users are installed in the /opt/ folder. This folder is owned by root. My solution which has been tested to work is simply to open the opt folder in terminal call 'ls' to make sure you see the 'eclipse' folder in your current directory. It may be inside another folder.
Then simply use this command replacing 'user' with your username.
sudo chown -R user:user eclipse/
and that's it. Of course only you will be able to run updates on eclipse but I imagine you are the primary user of the computer.
Solving the problem was a multi-step process for me:
In a thread on another forum I found the advice that Eclipse should not be installed in C:\Program Files (x86). I had indeed installed (unzipped) it into that folder, so I moved it as advised to C:\Users\....
When I loaded Eclipse in its new location, I got a different message when I attempted to scan for updates: "There are no update sites to search".
I temporarily re-established my installation in C:\Program Files (x86), loaded it, and used Window > Preferences > Install/Update > Available Software Sites > [select all] > Export... to create an .xml file with my software sites.
Back in the C:\Users\... installation, I used the the same menu command (except Import instead of Export) to pull in the contents of that .xml file.
Now Help > Check for Updates is again functioning as it used to.
I fixed this problem (windows) by re-opening eclipse by right-clicking the eclipse.exe and selecting "Run as administrator".
Not sure why this step was needed all of the sudden but it worked. After my upgrade (I upgraded from eclipse sdk 4.3 -> 4.4) it still lets me make updates without running as administrator.
From Powershell, I set permissions on the folder like so:
& icacls "C:\ProgramData\chocolatey\lib\eclipse-java-neon\eclipse" "/grant" "domain\user:(OI)(CI)F" "/T"
Note: I had a different install location, as I used chocolatey to install eclipse

Can't run eclipse on netbook MSi wind! HELP

I just got this MSI wind netbook and tried to run eclipse on it. I installed JDK6 on the netbook already. Whenever I open eclipse there is nothing show up on the screen except a "warning sound" that alerts. What is the problem here?
ps.I just started learning java.
Most likely the Eclipse starter program can't find where you installed Java. Since Eclipse is a Java program, it needs a JRE installed (comes with the JDK typically) to run. Assuming you're running Windows on your MSI Wind, check to make sure the java executable is on your path in your computer environment settings (windows key + printscreen button, or windows key + pause button are the shortcuts to open the computer properties dialog if I remember correctly. Then go to advanced).
You can test if java is on the path by opening a cmd.exe shell window and typing 'java'. If it says it cannot find java, then you need to fix the path.
See this link for additional troubleshooting details: http://www.eclipsezone.com/eclipse/forums/t99010.html
You could try reinstalling the JDK. Perhaps having it on a different disk than the default (D: versus C:) is causing some trouble? It certainly isn't a problem with the hardware, I'm running Eclipse on Windows on an MSI Wind.
Use "Add/Remove programs" in the control panel to remove the java versions you have installed.
Then visit "java.com" and use it to install Java, and verify that it is working. You do not need more than that to use Eclipse.