summaryrefslogtreecommitdiffstats
path: root/src/pvsDaemon.cpp
diff options
context:
space:
mode:
authorFabian Schillinger2010-07-09 21:18:44 +0200
committerFabian Schillinger2010-07-09 21:18:44 +0200
commit5acd0590258e9335cf4d3b1910a517efccd22a3e (patch)
tree5c2a127249fac6f8ba15d132c2cd6ef00e6a577f /src/pvsDaemon.cpp
parentBuilding rpms is now supported. On Debian based systems you need the rpm pack... (diff)
downloadpvs-5acd0590258e9335cf4d3b1910a517efccd22a3e.tar.gz
pvs-5acd0590258e9335cf4d3b1910a517efccd22a3e.tar.xz
pvs-5acd0590258e9335cf4d3b1910a517efccd22a3e.zip
first commit to test git
Diffstat (limited to 'src/pvsDaemon.cpp')
-rw-r--r--src/pvsDaemon.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/pvsDaemon.cpp b/src/pvsDaemon.cpp
index e87bfe7..961e0f3 100644
--- a/src/pvsDaemon.cpp
+++ b/src/pvsDaemon.cpp
@@ -66,13 +66,11 @@ int main(int argc, char** argv)
{
int frequency = 5;
int port = -1;
-
- QFileInfo script;
- script.setFile("/usr/bin/pvs-vncsrv");
- if (!script.exists())
- script.setFile("/usr/local/bin/pvs-vncsrv");
- if (!script.exists())
- script.setFile("/home/" + getUserName() + "/.pvs/pvs-vncsrv");
+ QString homeDir("/home/");
+ QString scriptPath = homeDir;
+ scriptPath.append(getUserName().append(QString("/.pvs/pvs-vncsrv")));
+ QString scriptName;
+ scriptName = getFilenameFromPath(scriptPath);
QCoreApplication app(argc, argv);
app.setOrganizationName("openslx");
@@ -261,7 +259,8 @@ int main(int argc, char** argv)
{
if (option_index + 1 < argc)
{
- script.setFile(QString(argv[option_index + 1]));
+ scriptPath = QString(argv[option_index + 1]);
+ scriptName = getFilenameFromPath(scriptPath);
option_index++;
continue;
}
@@ -348,13 +347,13 @@ int main(int argc, char** argv)
if (port <= 0)
port = SERVER_PORT_INT;
ConsoleLog writeLine(QString("TCP-Port: ").append(int2String(port)));
- mainClient->setScriptPath(script.filePath());
- ConsoleLog writeLine(QString("VNCScriptPath: ").append(script.filePath()));
+ mainClient->setScriptPath(scriptPath);
+ ConsoleLog writeLine(QString("VNCScriptPath: ").append(scriptPath));
createPolicyDir();
createPolicyFiles();
// long int gr = 0;
- mainClient->setScriptPath(script.filePath());
+ mainClient->setScriptPath(scriptPath);
app.exec();
delete mainClient;