How to share eclipse installed by a user to other users in Linux

Source: Internet
Author: User

For example, to learn hadoop, I created a user user2 in my Ubuntu for installing the hadoop environment. The original user is user1, and the user user1 has installed eclipse, therefore, I want to use the eclipse installed by uesr1 directly after logging on to user2. The method is to log on to the system as user2 and enter the directory where user1 is installed with eclipse. My directory is/home/M /. java/eclipse, there is a folder named configuration here, we only need to change the permission of this folder to 777 to achieve sharing.

Chmod 777 configuration/

In this way, user2 can use eclipse.

However, when I Log On As user1 again and open eclipse, an error occurs:

Locking is not possible in the directory "/home/M /. java/Eclipse/configuration/org. eclipse. osgi ". A common reason is that the file system or runtime environment does not support file locking for that location. please choose a different location, or disable
File Locking passing "-dosgi. Locking = none" as a VM argument.
/Home/M/. Java/Eclipse/configuration/org. Eclipse. osgi/. Manager/. filetablelock (\ u6743 \ uffffffff

After searching for this problem on the Internet, we found:

Cause

The error occurs when the user does not have the required permission to access.fileTableLockFile. This file is in the configuration directory for installation manager.

The permission is not available because the umask settings for the previous user who ran installation manager were not set for group mode. the UMASK settings for the previous user did not allow files created in group mode to have group permissions equal
Owner permissions.

The configuration folder is used to store osgi cache information..fileTableLockFile is accessed by the osgi cache at runtime. Failing to access.fileTableLockFile
Can Impact osgi cache internal logic.

This is because after user2 uses eclipse, user1 no longer has the permission to operate the "File Table lock file" and needs to reset the permission. The solution is as follows:

Resolving the problem

To resolve this issue, take one of the following steps:

  • Change the permission.fileTableLockFile777

    • There are several directories that have. filetablelock files that might require a change of permissions:

      1. {IM_HOME}/eclipse/configuration/org.eclipse.core.runtime/.manager
      2. {IM_HOME}/eclipse/configuration/org.eclipse.equinox.app/.manager
      3. {IM_HOME}/eclipse/configuration/org.eclipse.osgi/.manager
  • Run this command on the configuration directory:
    chmod -R g+rwx
  • As a root user, change the owning group for the contents of the root directory of the eclipse configuration directory to the Group that uses installation manager in group mode:
    chgrp -R <groupName> <{IM_HOME}/eclipse/configuration>

First, modify the permissions of the three files to 777. The command is as follows:

CD org. Eclipse. osgi/. Manager/

Sudo chmod 777 .*

CD org. Eclipse. Equinox. APP/. Manager/

Sudo chmod 777 .*

CD org. Eclipse. Core. runtime/. Manager/

Sudo chmod 777 .*

Then in the configuration directory, I run:

Chmod-r g + rwx *.*

-R indicates recursive changes to folders.


At this time, I opened eclipse for the next time. The original error was lost, but the workspace directory could not be accessed again,



The reason is that the default project directory is changed when I log on with user2 and use eclipse. The project directories used by user1 and user2 are different, how can I prompt to select workspace every time I open eclipse?

The method is as follows:



Select the option in the figure, so that every time you open eclipse, you will be prompted to select a working directory. It is convenient for two different users to use their own project directories.


OK, I hope it will help you!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.