2015-01-27 2 views
-1

저는 IceWM 리눅스에서 Java 기반 GUI onBoot를 실행하려고했습니다. 다른 런레벨 ..rc3, rc4 및 rc5를 통해 실행하려고했지만 실행하지 못했습니다. 내가 노력하고 무엇을 여기 에 .. /etc/init.d/script에서시작시 IceWM에서 Java GUI를 실행하는 방법?

sudo java -jar /path/to/jar 나는 또한 script가 적절한 권한도 가지고 있음을 확인했다

sudo ln -s /etc/init.d/script /etc/rc3.d/S99script 

처럼 연결. 도움을 주시면 감사하겠습니다.

+0

실행 자바 응용 프로그램. 루트로 자바 애플 리케이션. Java 기반 gui를 루트로 사용합니다. init.d를 통해 루트로서 Java GUI. 잠 좀 자러 가야 겠어. – baldrs

+0

@baldrs가 투표했습니다. 투표가 다운되었습니다. –

+0

Java를 root로 실행하지 마십시오. init 스크립트에서 gui를 시작하지 마십시오. ~/.xinitrc 또는 ~/.xprofile에서 시작 – baldrs

답변

0

마침내 해결책을 찾았습니다! 분명히 그것은

그래서 내가 (내 시스템에 한 명의 사용자 만이 있기 때문에 내가 이런 짓을) /etc/sudoers/ 파일로 /path/to/java/binaries을 참조하고 /home/loggeduser/.profile에서 java 파일을 시작 문제를 만들고 된 sudo ..이었고, done..rebooted 나는이 Java GUI가 실행 중입니다. 루트로

-1
For Linux 
    +Go to Home directory of user.(eg:- cd /home/user) 
    +every user having ".bash_profile" file in home directory.(ls -a --> to check hidden (.)file) 
    +you can give path or export java in ".bash_profile. 
    eg:- vi /home/user/.bash_profile 
    # .bash_profile 
    # Get the aliases and functions 
    if [ -f ~/.bashrc ]; then 
    . ~/.bashrc 
    fi 
    # User specific environment and startup programs 
    export JAVA_HOME=/opt/jdk1.6.0_45 
    export PATH=$PATH:/opt/jdk1.6.0_45 
    #export JBOSS_HOME=/jbossdev/brms-standalone-5.3.1/jboss-as 
    #export PATH=$PATH:/jbossdev/brms-standalone-5.3.1/jboss-as/bin 
    PATH=$PATH:$HOME/bin 
    export PATH 
    :wq! 
    +then grant 755 permission to .bash_profile file (chmod -R 755 /home/user/.bash_profile). 
    +execute sh .bash_profile. 
    so now you can run it through different runlevels..rc3, rc4, and rc5. 
+0

내 리눅스에'.bash_profile'이 없다. –

1
1)login with your user then use "ls -a" command.you can find .bash_profile file. 
2)suppose still you dont have then create manually "vi .bash_profile" in your home directory(eg. vi /home/user/.bash_profile) 
3)give 755 permission to bash_profile .(chmod 755 /home/user/.bash_profile) 
4)then edit vi .bash_profile 
export JAVA_HOME=(Path of ur java location- {eg. /opt/jdk1.6.0_45}) 
export PATH=$PATH:(Path of ur java location- {eg. /opt/jdk1.6.0_45}) 
PATH=$PATH:$HOME/bin 

:wq (save and exit) 

5)run .bash_profile (sh .bash_profile) 
관련 문제