PtokaX forum

PtokaX => FAQ section => Topic started by: PPK on 13 September, 2009, 19:35:46

Title: Step by step guide for PtokaX compile and setup on Debian/Ubuntu GNU/Linux
Post by: PPK on 13 September, 2009, 19:35:46
First important note. It is looks long, it is looks hard, but it is easy and everything can be done in less than 5 minutes  ;)

This guide was tested on clean installation of Debian GNU/Linux 5.0 and Ubuntu GNU/Linux 9.04. Everything is done from command line, that means that everything can be done over ssh on remote server.

In my case was only base system installed, that means that after startup and login i was already in command line and working directory was my home directory. If you are not in command line then you need to go here some way (ie if gnome is installed then open terminal).

1. First thing needed for PtokaX compile is source, you will download it with this command:
Code: [Select]
wget http://www.PtokaX.org/files/0.4.1.1-posix-src.tgzResult should looks similar to this:
(http://www.PtokaX.org/files/images/01-wget-px.png)
To decompress source use this command:
Code: [Select]
tar -xf 0.4.1.1-posix-src.tgz
2. Next thing needed for PtokaX compile is tinyxml, for that you need to go to PtokaX source tinyxml directory.
Use these to commands to change working directory:
Code: [Select]
cd PtokaX
cd tinyxml
Result looks like this:
(http://www.PtokaX.org/files/images/02-cd-tinyxml.png)
Download tinyxml source with this command:
Code: [Select]
wget http://downloads.sourceforge.net/project/tinyxml/tinyxml/2.5.3/tinyxml_2_5_3.tar.gzResult should looks similar to this:
(http://www.PtokaX.org/files/images/03-wget-tinyxml.png)
To decompress tinyxml source use this command:
Code: [Select]
tar -xf tinyxml_2_5_3.tar.gz
Because my makefile want tinyxml source in src subdir (now is empty) and tinyxml was unpacked to tinyxml remove that src directory with this command:
Code: [Select]
rmdir srcAnd rename tinyxml directory to src with this command:
Code: [Select]
mv tinyxml src
3. Before we can start tinyxml compile we need make and g++ packages.
We can install them using apt-get. In case when you are not root you need to get root permissions to install new packages with apt-get.
I'm used for that this command:
Code: [Select]
suAnother way is to use sudo command, but that was not installed in my case.

To install make package use this command:
Code: [Select]
apt-get install makeResult can looks similar to this:
(http://www.PtokaX.org/files/images/04-apt-get-make.png)

To install g++ package use this command:
Code: [Select]
apt-get install g++Result can looks similar to this:
(http://www.PtokaX.org/files/images/05-apt-get-gpp.png)

4. Now we can compile tinyxml, use this command:
Code: [Select]
makeResult should looks similar to this:
(http://www.PtokaX.org/files/images/06-make-tinyxml.png)

5. Now when tinyxml is compiled we can prepare things for PtokaX compile.
First change directory from tinyxml sub dir to PtokaX root, use this command:
Code: [Select]
cd ..
Again we use apt-get to get packages needed for compile.
Install zlib with this command:
Code: [Select]
apt-get install zlib1g-devResult can looks similar to this:
(http://www.PtokaX.org/files/images/07-apt-get-zlib.png)

Install Lua 5.1 with this command:
Code: [Select]
apt-get install liblua5.1-devResult can looks similar to this:
(http://www.PtokaX.org/files/images/08-apt-get-lua.png)

6. Now we can start PtokaX compile.
Use this command:
Code: [Select]
makeResult should looks similar to this (http://www.PtokaX.org/files/images/09-make-PtokaX-1.png) and this (http://www.PtokaX.org/files/images/10-make-PtokaX-2.png) (images not posted here because they are f*cking big ;D)

7. If everything was ok you now have PtokaX executable. Before you run it you should do atleast basic setup.
In source we have config examples, we use them to setup your PtokaX hub.
First we rename cfg.example directory to cfg with this command:
Code: [Select]
mv cfg.example cfg
Go to cfg dir with this command:
Code: [Select]
cd cfg
To be able to run PtokaX we need to set atleast hubname and hub address.

Open Setting.xml in text editor with this command:
Code: [Select]
vim Settings.xml
Use cursor keys on keyboard to move in that file. To start editing press Insert key on keyboard.

Search for this line:
Code: [Select]
<String Name="HubName">&lt;Enter hub name here&gt;</String><!-- Hub name. Min length 1, max 256. -->And change this:
Code: [Select]
&lt;Enter hub name here&gt;To your hubname. For example like that:
Code: [Select]
<String Name="HubName">PtokaX test</String><!-- Hub name. Min length 1, max 256. -->
Search for this line:
Code: [Select]
<String Name="HubAddress">&lt;Enter hub address here&gt;</String><!-- Hub address. Min length 1, max 256. -->And change this:
Code: [Select]
&lt;Enter hub address here&gt;To your hub address. For example like that:
Code: [Select]
<String Name="HubAddress">192.168.0.19</String><!-- Hub address. Min length 1, max 256. -->
To end editing press Esc key on keyboard.

To save file use this:
Code: [Select]
:w
And to quit editor use this:
Code: [Select]
:q
8. This part is not needed, but is good to create registered user for yourself.

Open RegisteredUsers.xml in text editor with this command:
Code: [Select]
vim RegisteredUsers.xml
And edit it similar as Settings.xml...

Search for this line:
Code: [Select]
<Nick>Example_Nick</Nick>And change this:
Code: [Select]
Example_NickTo your nick name. For example like that:
Code: [Select]
<Nick>PPK</Nick>
Search for this line:
Code: [Select]
<Password>Example_Password</Password>And change this:
Code: [Select]
Example_PasswordTo your password. For example like that:
Code: [Select]
<Password>test</Password>
Search for this line:
Code: [Select]
<Profile>3</Profile><!-- 0 for master, 1 for operator, 2 for vip, 3 for reg -->And change this:
Code: [Select]
3To your profile. For example like that:
Code: [Select]
<Password><Profile>0</Profile><!-- 0 for master, 1 for operator, 2 for vip, 3 for reg --></Password>
End editing, save file and quit editor like before with Settings.

9. Now you can run PtokaX.
Change from cfg directory to PtokaX root with this command:
Code: [Select]
cd ..
And run PtokaX with this command:
Code: [Select]
./PtokaXResult should looks like this:
(http://www.PtokaX.org/files/images/11-start-PtokaX.png)
And from client similar to this:
(http://www.PtokaX.org/files/images/12-check-run.png)
Title: Re: Step by step guide for PtokaX compile and setup on Debian GNU/Linux
Post by: CrazyGuy on 13 September, 2009, 20:24:45
nice guide PPK :)
Title: Re: Step by step guide for PtokaX compile and setup on Debian GNU/Linux
Post by: abodh84 on 13 September, 2009, 21:55:03
i wana try it on linux slackware.
wat do u think it will work or not?
Title: Re: Step by step guide for PtokaX compile and setup on Debian GNU/Linux
Post by: PPK on 13 September, 2009, 22:41:57
It will not work with this guide  :P
Title: Re: Step by step guide for PtokaX compile and setup on Debian GNU/Linux
Post by: Hamachi on 14 September, 2009, 17:04:57
Thanks nice work :D

work the linux whit 64 bit ?
Title: Re: Step by step guide for PtokaX compile and setup on Debian GNU/Linux
Post by: P_pan on 14 September, 2009, 20:46:34
a very cool guide! thnx for building this!! ;)
Title: Re: Step by step guide for PtokaX compile and setup on Debian GNU/Linux
Post by: Psycho_Chihuahua on 14 September, 2009, 21:03:10
work the linux whit 64 bit ?

it should, iirc i have/had it running on a 64bit version of debian. anyway gonna give it a shot and i'll let you know afterwards ;)



Edit: yep runs fine on 64bit debian
Title: Re: Step by step guide for PtokaX compile and setup on Debian GNU/Linux
Post by: PPK on 14 September, 2009, 22:46:02
work the linux whit 64 bit ?
Of course it is working on 64bit. I'm used amd64 version of Debian and Ubuntu for this guide 8)
Title: Re: Step by step guide for PtokaX compile and setup on Debian GNU/Linux
Post by: Hamachi on 15 September, 2009, 22:51:58
;)

are the 64 debian faster or ?
Title: Re: Step by step guide for PtokaX compile and setup on Debian/Ubuntu GNU/Linux
Post by: mixted on 10 January, 2010, 15:48:02
well i must say the tutorial doesn't work....
i am using ubuntu 8.10 server and lua 5.1.4 installed from source
while trying to install ptokax 0.4.1.1 i receive this folowing error
Code: [Select]
mixted@mixted:/home/PtokaX$ sudo make
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/ClientTagManager.cpp -o /home/PtokaX/obj/ClientTagManager.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/colUsers.cpp -o /home/PtokaX/obj/colUsers.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/DcCommands.cpp -o /home/PtokaX/obj/DcCommands.o
/home/PtokaX/src/DcCommands.cpp: In member function ?void cDcCommands::Supports(User*, char*, const uint32_t&)?:
/home/PtokaX/src/DcCommands.cpp:3177: warning: suggest parentheses around comparison in operand of ==
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/DeFlood.cpp -o /home/PtokaX/obj/DeFlood.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/eventqueue.cpp -o /home/PtokaX/obj/eventqueue.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/globalQueue.cpp -o /home/PtokaX/obj/globalQueue.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/hashBanManager.cpp -o /home/PtokaX/obj/hashBanManager.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/hashUsrManager.cpp -o /home/PtokaX/obj/hashUsrManager.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/hashRegManager.cpp -o /home/PtokaX/obj/hashRegManager.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/HubCommands.cpp -o /home/PtokaX/obj/HubCommands.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/IP2Country.cpp -o /home/PtokaX/obj/IP2Country.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/LanguageManager.cpp -o /home/PtokaX/obj/LanguageManager.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/LuaBanManLib.cpp -o /home/PtokaX/obj/LuaBanManLib.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/LuaCoreLib.cpp -o /home/PtokaX/obj/LuaCoreLib.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/LuaIP2CountryLib.cpp -o /home/PtokaX/obj/LuaIP2CountryLib.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/LuaProfManLib.cpp -o /home/PtokaX/obj/LuaProfManLib.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/LuaRegManLib.cpp -o /home/PtokaX/obj/LuaRegManLib.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/LuaScript.cpp -o /home/PtokaX/obj/LuaScript.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/LuaScriptManager.cpp -o /home/PtokaX/obj/LuaScriptManager.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/LuaScriptManLib.cpp -o /home/PtokaX/obj/LuaScriptManLib.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/LuaSetManLib.cpp -o /home/PtokaX/obj/LuaSetManLib.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/LuaTmrManLib.cpp -o /home/PtokaX/obj/LuaTmrManLib.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/LuaUDPDbgLib.cpp -o /home/PtokaX/obj/LuaUDPDbgLib.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/ProfileManager.cpp -o /home/PtokaX/obj/ProfileManager.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/PtokaX.cpp -o /home/PtokaX/obj/PtokaX.o
/home/PtokaX/src/PtokaX.cpp: In function ?int main(int, char**)?:
/home/PtokaX/src/PtokaX.cpp:529: warning: format not a string literal and no format arguments
/home/PtokaX/src/PtokaX.cpp:558: warning: format not a string literal and no format arguments
/home/PtokaX/src/PtokaX.cpp:651: warning: format not a string literal and no format arguments
/home/PtokaX/src/PtokaX.cpp:665: warning: format not a string literal and no format arguments
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/pxstring.cpp -o /home/PtokaX/obj/pxstring.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/RegThread.cpp -o /home/PtokaX/obj/RegThread.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/ResNickManager.cpp -o /home/PtokaX/obj/ResNickManager.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/ServerManager.cpp -o /home/PtokaX/obj/ServerManager.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/ServerThread.cpp -o /home/PtokaX/obj/ServerThread.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/serviceLoop.cpp -o /home/PtokaX/obj/serviceLoop.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/SettingManager.cpp -o /home/PtokaX/obj/SettingManager.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/TextFileManager.cpp -o /home/PtokaX/obj/TextFileManager.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/UdpDebug.cpp -o /home/PtokaX/obj/UdpDebug.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/UDPThread.cpp -o /home/PtokaX/obj/UDPThread.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/User.cpp -o /home/PtokaX/obj/User.o
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/utility.cpp -o /home/PtokaX/obj/utility.o
/home/PtokaX/src/utility.cpp: In function ?void AppendLog(const string&, const bool&)?:
/home/PtokaX/src/utility.cpp:1111: warning: format not a string literal and no format arguments
/home/PtokaX/src/utility.cpp: In function ?void AppendSpecialLog(const string&)?:
/home/PtokaX/src/utility.cpp:1139: warning: format not a string literal and no format arguments
g++ -g -Wall -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/PtokaX/src/ZlibUtility.cpp -o /home/PtokaX/obj/ZlibUtility.o
g++ -lpthread -lz -llua5.1 -lrt -o PtokaX \
        /home/PtokaX/obj/ClientTagManager.o /home/PtokaX/obj/colUsers.o /home/PtokaX/obj/DcCommands.o /home/PtokaX/obj/DeFlood.o /home/PtokaX/obj/eventqueue.o /home/PtokaX/obj/globalQueue.o /home/PtokaX/obj/hashBanManager.o /home/PtokaX/obj/hashUsrManager.o \
        /home/PtokaX/obj/hashRegManager.o /home/PtokaX/obj/HubCommands.o /home/PtokaX/obj/IP2Country.o /home/PtokaX/obj/LanguageManager.o /home/PtokaX/obj/LuaBanManLib.o /home/PtokaX/obj/LuaCoreLib.o /home/PtokaX/obj/LuaIP2CountryLib.o \
        /home/PtokaX/obj/LuaProfManLib.o /home/PtokaX/obj/LuaRegManLib.o /home/PtokaX/obj/LuaScript.o /home/PtokaX/obj/LuaScriptManager.o /home/PtokaX/obj/LuaScriptManLib.o /home/PtokaX/obj/LuaSetManLib.o /home/PtokaX/obj/LuaTmrManLib.o \
        /home/PtokaX/obj/LuaUDPDbgLib.o /home/PtokaX/obj/ProfileManager.o /home/PtokaX/obj/PtokaX.o /home/PtokaX/obj/pxstring.o /home/PtokaX/obj/RegThread.o /home/PtokaX/obj/ResNickManager.o /home/PtokaX/obj/ServerManager.o /home/PtokaX/obj/ServerThread.o \
        /home/PtokaX/obj/serviceLoop.o /home/PtokaX/obj/SettingManager.o /home/PtokaX/obj/TextFileManager.o /home/PtokaX/obj/UdpDebug.o /home/PtokaX/obj/UDPThread.o /home/PtokaX/obj/User.o /home/PtokaX/obj/utility.o /home/PtokaX/obj/ZlibUtility.o \
        /home/PtokaX/tinyxml/tinyxml.a
/usr/bin/ld: cannot find -llua5.1
collect2: ld returned 1 exit status
make: *** [PtokaX] Error 1
mixted@mixted:/home/PtokaX$

also i tried to install ptokax 0.4.1.2 based on this tutorial but i receive the same error.this tutorial should be updated on how to install the latest version
Title: Re: Step by step guide for PtokaX compile and setup on Debian/Ubuntu GNU/Linux
Post by: PPK on 10 January, 2010, 15:58:08
well i must say the tutorial doesn't work....
It is working, but because you don't use that tutorial and do things differently...
and lua 5.1.4 installed from source
it is not working for you :P
Title: Re: Step by step guide for PtokaX compile and setup on Debian/Ubuntu GNU/Linux
Post by: mixted on 11 January, 2010, 08:33:24
well i folowed the tutorial except the part with lua i already had lua installed on the system.could be aded in a future version the posibility to find the lua version an use that?
Title: Re: Step by step guide for PtokaX compile and setup on Debian/Ubuntu GNU/Linux
Post by: PPK on 10 September, 2011, 16:35:57
Updated version of this guide is in PtokaX Wiki (http://wiki.ptokax.org/doku.php/settingup/compile_and_setting_debian_bugbuntu)  8)
Title: Re: Step by step guide for PtokaX compile and setup on Debian/Ubuntu GNU/Linux
Post by: swee on 26 May, 2012, 12:08:17
Is there any way to make PtokaX start automatic  when the computer reboots ?
I am using Debian and havent found any where how to make it start .
When the computer reboots after an power failure. or something else.

I guess there should be an line written somewhere but i havent figured it out yet.

If any one have an suggestion it would be nice.

regards /swee
Title: Re: Step by step guide for PtokaX compile and setup on Debian/Ubuntu GNU/Linux
Post by: the-master on 26 May, 2012, 19:08:07
http://www.adminsehow.com/2009/05/how-to-autostart-a-service-on-debian-centos-and-redhat/
Title: Re: Step by step guide for PtokaX compile and setup on Debian/Ubuntu GNU/Linux
Post by: swee on 26 May, 2012, 20:13:46
Thank You the-master

so all I have to type is

update-rc.d servicename defaults

as root ?

Since I followed this guide I have mine PtokaX in root/PtokaX

so it was a nice try

update-rc.d: using dependency based boot sequencing
update-rc.d: error: unable to read /etc/init.d/PtokaX





kind off not so sure on linux commands.
thanks for reply will try

regards /swee
Title: Re: Step by step guide for PtokaX compile and setup on Debian/Ubuntu GNU/Linux
Post by: Sketer0070 on 27 August, 2012, 23:22:52
The PtokaX is running on my Raspberry PI (debian)
But when i changed the file "Settings.xml" to get a vallid name and IP adres (and port) en run the program by typing ./PtokaX
The file "Settings.xml" is changed in the file below.
It's reduced !!!!!

<PtokaX Version="0.4.1.1">
<Booleans/>
<Integers>
<Integer Name="MaxUsersPeak">2</Integer>
</Integers>
<Strings>
<String Name="HubName">Raspberry PI TEST Hub</String>
<String Name="HubAddress">192.168.1.16</String>
<String Name="TCPPorts">1500;411</String>
</Strings>
</PtokaX>

The orignal file contains more information. What is the cause of this problem ? Can someone help me !

Question 2:
How can i'll add other scripts ?
I have a Hub running (PotoaX 0.3.6 under windows) Can i use the same lua scripts in debian ? And how do i do it ?

Hope to hear a answer soon. Thanks
Title: Re: Step by step guide for PtokaX compile and setup on Debian/Ubuntu GNU/Linux
Post by: PPK on 28 August, 2012, 00:27:13
PtokaX is saving to Settings.xml only settings that are different from default. That way future PtokaX updates can contains different (better) default settings and they will work automatically for all users who don't change them ::)

Scripts from 0.3.6.0 not working on newer PtokaX versions  ::)
Title: Re: Step by step guide for PtokaX compile and setup on Debian/Ubuntu GNU/Linux
Post by: Sketer0070 on 28 August, 2012, 21:01:57
Thanks for your answer.

Is there a Debian version of 3.6.0  ?
Title: Re: Step by step guide for PtokaX compile and setup on Debian/Ubuntu GNU/Linux
Post by: PPK on 28 August, 2012, 22:35:22
No.