LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-07-2009, 04:49 PM   #1
jacatone
Member
 
Registered: Mar 2004
Posts: 282

Rep: Reputation: 30
Configuration question about a Java program


I'm running FreeRapid v.81 which is an auto downloader for Rapidshare files in Linux Mint 6 (Ubuntu 8.10). When I try using the auto shutdown option I get "System command "shutdown" is not supported or defined on this system. Check your settings in the file "syscmd.properties". In the syscmd.properties file it shows the following:


# The commands are called from the application (eg. shutdown system, when all downloads are complete).

# This configuration file has a syntax of Java properties file (key=value, # - line comment. \n - new line, \t - tabulator).

#

# Application searches for this file in its configuration directory as first (~/.APPCODE),

# then it searches for this file in application's home directory.

# It's recommended to copy this file to its configuration directory (~/.APPCODE) for easier upgrading to newer version of the application.



# ******************************

# ***** RUNTIME VARIABLES ******

# ******************************



# You can insert following variables into your values. These variables will be replaced on runtime.

# %DIR% - current application directory (absolut path) - like /home/userid/appname

# %VERSION% - application version - eg. 0.65

# %PRODUCT% - product name - SuperSoftware

# %APPVERSION% - product name + version - eg. SuperSoftware 0.65

# %AUTHORS% - one line info about authors - eg. (c) Vity 2008

# %ICON_PATH% - absolut path to icon file - eg. ~/appname/app.png

# %SH_SCRIPT_PATH% - absolut path to shell script file running application - eg. /home/userid/appname/app.sh

# %ARGS% - arguments, which were used for application start - eg. --debug





# ******************************

# ***** SYSTEM COMMANDS *******

# ******************************

# Uncomment line with command as needed





#### Shortcuts commands

# Meaning of these commands is obvious

# Application WAITS for a result code.







#create_desktop_shortcut=



#create_startmenu_shortcut=



#create_startup_shortcut=



#create_quicklaunch_shortcut=



#### Application restart command

restart_application=java -jar %DIR%/frd.jar %ARGS%



"#### System shutdown commands

# It's highly recommended to insert sleep pause (eg. 2 seconds) before executing this type of command.

# Application DOESN'T WAIT for a result code.





#

# system shutdown - poweroff - 'sudo poweroff'

#



#shutdown=



#

# system reboot - 'sudo reboot'

#



#reboot=



#

# system hibernate - suspend to disk

#



#hibernate=



#

# system standby - suspend to RAM

#



#standby=




Anyone know what I do here? Thanks.

Last edited by jacatone; 03-07-2009 at 04:55 PM.
 
Old 03-07-2009, 06:49 PM   #2
hedgy102
Member
 
Registered: Mar 2009
Distribution: Debian,Centos
Posts: 30

Rep: Reputation: 16
Hi,
I've never used FreeRapid before but it seems that the commented code below is causing your problem.

Quote:
#

# system shutdown - poweroff - 'sudo poweroff'

#



#shutdown=



Can you please try replacing

Code:
#shutdown=
With

Code:
shutdown='/sbin/shutdown -h +1'
?
 
Old 03-08-2009, 04:08 AM   #3
jacatone
Member
 
Registered: Mar 2004
Posts: 282

Original Poster
Rep: Reputation: 30
Just said "Shutdown command failed". Am I supposed to include the ' on either side of the command?
 
Old 03-08-2009, 08:44 AM   #4
hedgy102
Member
 
Registered: Mar 2009
Distribution: Debian,Centos
Posts: 30

Rep: Reputation: 16
I just checked the javadoc page http://java.sun.com/j2se/1.4.2/docs/...roperties.html, seems they are not
 
Old 03-09-2009, 03:23 PM   #5
jacatone
Member
 
Registered: Mar 2004
Posts: 282

Original Poster
Rep: Reputation: 30
Still didn't work. Thanks anyway.
 
Old 03-09-2009, 04:14 PM   #6
hedgy102
Member
 
Registered: Mar 2009
Distribution: Debian,Centos
Posts: 30

Rep: Reputation: 16
Thinking off the top of my hat. This does make sense. You need to be root to shutdown the system and as such the shutdown command might not be able to run due to lack of permissions.

Are you familiar with altering the sudoers file?
 
Old 09-02-2009, 05:04 PM   #7
hayunike
LQ Newbie
 
Registered: Jun 2009
Posts: 2

Rep: Reputation: 0
# It's highly recommended to insert sleep pause (eg. 2 seconds) before executing this type of command.

# Application DOESN'T WAIT for a result code.

What does that mean? Or how can I insert sleep pause??

P.S. In my OS (pardus) the command to shutdown the computer is "halt". It may be the same in the other Linux OS.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help with my Java program filsed Programming 1 05-02-2005 03:58 AM
a question about Java program on Linux jpan Programming 5 01-11-2005 06:05 PM
Stop java program(threaded program..should end cleanly) rmanocha Programming 4 11-09-2004 09:36 AM
Java Program merlin371 Linux - Software 11 01-18-2004 04:09 PM
help runing a java program matt_w_lambert Programming 4 10-31-2003 10:42 AM


All times are GMT -5. The time now is 12:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration