Skip to content

Instantly share code, notes, and snippets.

@zeen
Created September 20, 2009 16:08
Show Gist options
  • Save zeen/189835 to your computer and use it in GitHub Desktop.
Save zeen/189835 to your computer and use it in GitHub Desktop.
waqas Today 7:07 PM
Hello again.
Neustradamus Today 7:07 PM
:)
Today 7:07 PM
So I spoke with mwild
Today 7:07 PM
but you are windows developper
waqas Today 7:08 PM
Yep, I work on the windows side of things for Prosody.
Neustradamus Today 7:08 PM
I tried Prosody 0.5.1 and why you put command window by default ?
Today 7:08 PM
example with ejabberd, you do not see command window by default
waqas Today 7:09 PM
Having a graphical UI minimizing to the systray has always been on the todo list. Just never got around to it.
Today 7:10 PM
I'm considering throwing together something basic for the 0.5.2 release tomorrow.
Neustradamus Today 7:10 PM
OK :)
Today 7:11 PM
I have other point
waqas Today 7:12 PM
A 64 bit windows package?
Neustradamus Today 7:16 PM
yes
waqas Today 7:17 PM
The problem with that is I don't have a 64-bit OS installed at the moment. I intend to have a 64-bit package for 0.6 though.
Neustradamus Today 7:18 PM
ok but why you do not try windows 2008 server or 2008 R2 (evaluation) ?
waqas Today 7:18 PM
I will. I was just focusing on other items on my todo list (MUC, etc).
Neustradamus Today 7:18 PM
OK
waqas Today 7:18 PM
I have a win7 CD, so I'll probably try that.
Neustradamus Today 7:19 PM
ok
Today 7:20 PM
new point
Today 7:23 PM
%PROSODY_CFGDIR% is %APPDATA%\Prosody ?
waqas Today 7:24 PM
In the exe setup, yes.
Today 7:24 PM
In the zip it's "."
Neustradamus Today 7:24 PM
ok
Today 7:25 PM
why you used .bat and why not .cmd ? .cmd is better no ?
waqas Today 7:25 PM
They are the same thing really.
Today 7:25 PM
But the .bat files were supposed to be replaced by a .exe.
Today 7:25 PM
They are just there temporarily, until the exe is working.
Neustradamus Today 7:26 PM
ok
Today 7:28 PM
how to create an admin account ?
(I have success, but now I try a new install and I forget)
Today 7:28 PM
prosodyctl adduser me@example.com ?
Today 7:28 PM
prosodyctl register me example.com mypassword ?
waqas Today 7:28 PM
admins = {"admin@example.com"} -- in the config
Today 7:29 PM
http://prosody.im/doc/prosodyctl
Neustradamus Today 7:29 PM
you do not create a better solution ?
waqas Today 7:29 PM
A better solution (along with an API) is being worked on for 0.6.
Today 7:29 PM
We hope to have a web application (like openfire's)
Neustradamus Today 7:29 PM
http://prosody.im/doc/creating_accounts
On all platforms except for Windows (currently) Prosody has a command-line utility called prosodyctl. This can be used to add a user account like so ...
Today 7:30 PM
ok
waqas Today 7:30 PM
prosodyctl uses some linux specific stuff (posix stuff) which needs to be taken out for windows. But I thought having a web interface is better anyway.
Neustradamus Today 7:31 PM
ok
Today 7:31 PM
but prosodyctl function on windows
waqas Today 7:32 PM
It tends to fail with an error.
Neustradamus Today 7:32 PM
ok
Today 7:33 PM
why I the prosody.cfg.lua you do not put one section for create admin account ? (disabled)
Today 7:33 PM
why in the*
Today 7:34 PM
easy for start prosody ...
waqas Today 7:35 PM
That makes sense. I'll add it now.
Neustradamus Today 7:35 PM
:)
Today 7:37 PM
I search on my HDD my old config of prosody, I hope not to be erased :D
Today 7:40 PM
What compiler compile prosody ?
waqas Today 7:41 PM
VC2005. Because of some compatibility reasons. Will probably use a newer compiler for 0.6.
Neustradamus Today 7:41 PM
VC2008 for 0.6 ?
waqas Today 7:41 PM
Yes, probably.
Neustradamus Today 7:41 PM
ok
waqas Today 7:42 PM
Maybe even the 2010 beta, if it
Today 7:42 PM
's stable enough
Neustradamus Today 7:43 PM
ok it will be good.
Today 7:44 PM
I find my old config.
I see that :
logging was remove, why ?
Today 7:45 PM
-- logging = { type = "html", directory = "/var/logs", rotate = "daily" }
Today 7:46 PM
no ?
Today 7:50 PM
and :
--"posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
Today 7:52 PM
and why not put the prosody.cfg.lua in prosody folder /conf ?
waqas Today 7:53 PM
The logging line was only an example of what lua tables look like. It was replaced with a different example.
Today 7:54 PM
Not sure. I think Matt followed what other servers did. You'll have to ask him about the linux choices :)
Neustradamus Today 7:56 PM
ok ok
Today 7:58 PM
you know : http://www.software602.com/products/groupware/ ?
Today 7:59 PM
there is XMPP server, but it is very old, I think that you can contact this company, and prupose that prosody includes this groupware no ?
Today 7:59 PM
(jabberd)
waqas Today 8:00 PM
We could. I think it would be best to have a standard API first, to make integration easier.
Today 8:00 PM
A prosody API to maniuplate it's internals/
Neustradamus Today 8:01 PM
ok
Today 8:01 PM
keep this link for the futur ;)
Today 8:09 PM
you do not answer :
why not put the prosody.cfg.lua in prosody folder /conf ?
waqas Today 8:09 PM
In which package?
Neustradamus Today 8:10 PM
windows
waqas Today 8:10 PM
Because windows applications don't do that?
Neustradamus Today 8:11 PM
it is good, but it is strange for one file.
Today 8:11 PM
Prosody/conf is easy :D
waqas Today 8:11 PM
Do you mean in %appdata%?
Neustradamus Today 8:11 PM
yes
waqas Today 8:12 PM
Mainly because I saw no reason to.
Today 8:12 PM
Why make a folder for just one file?
Today 8:12 PM
Also, the file isn't alone. Prosody/data/ is where all the data goes.
Neustradamus Today 8:12 PM
no
Today 8:12 PM
actually one file in %APPDATA%\Prosody
Today 8:13 PM
it is prosody.conf.lua
Today 8:13 PM
other files is in Program Files\Prosody
Today 8:14 PM
for me %APPDATA%\Prosody is : C:\Users\UserName\AppData\Roaming\Prosody
Today 8:14 PM
on Windows 2008 Server
waqas Today 8:15 PM
Program Files\Prosody is only for static files, which prosody doesn't write to. Can't have data files in there.
Neustradamus Today 8:15 PM
ok
Today 8:16 PM
good answer :D
Today 8:16 PM
but it is strange that ejabberd configuration is in program files ... :D
waqas Today 8:17 PM
That was fine until XP. But with vista and beyond, programs are not supposed to write arbitrary data in the program files folder.
Neustradamus Today 8:17 PM
ok
Today 8:18 PM
I will inform ejabberd dev :D
Today 8:21 PM
but why certs is in program files ? /D
Today 8:21 PM
:D
waqas Today 8:22 PM
It's not really a bug. Vista also offers file and registry virtualization, so that older apps which wish to write in program files still work
Today 8:22 PM
But the reads/writes get redirected to C:\Users\User_name\AppData\Local\VirtualStore\Program Files\Application_name
Today 8:23 PM
The certs are there because of a limitation of our openssl wrapper. Known issue.
Today 8:23 PM
It works relative to the current path. It should work relative to the config. Something we need to fix.
Today 8:24 PM
(i.e., openssl's file loading stuff)
Today 8:24 PM
We may need to fork luasec (the openssl wrapper we use) to work around this.
Today 8:25 PM
As well as add support for other advanced cert stuff, like sasl external support.
Neustradamus Today 8:25 PM
C:\Users\User_name\AppData\Local\VirtualStore\Program Files\Application_name
I look and I do not VirtualStore folder
waqas Today 8:29 PM
I just copied that from MSDN. You did replace Users, User_name, etc, right? :)
Neustradamus Today 8:29 PM
yes
Today 8:30 PM
VirtualStore does not exist
waqas Today 8:30 PM
Could be some other name. Dunno. Or hidden.
Neustradamus Today 8:30 PM
no I look all folders !
Today 8:30 PM
I have windows 2008 server
waqas Today 8:31 PM
Thing is, %ProgramFiles% used to be used for shared data, but from vista onwards it's considered a protected folder. Writing there (by installers, etc) requires admin priveleges, which leads to UAC prompts, or folder virtualization, which defeats the purpose.
Neustradamus Today 8:32 PM
it is for vista or seven
Today 8:32 PM
but I do not UAC problem
Today 8:32 PM
with 2008 server
waqas Today 8:32 PM
Do you run with an admin account?
Neustradamus Today 8:32 PM
yes
waqas Today 8:32 PM
Prosody can run without an admin account.
Neustradamus Today 8:33 PM
ok
waqas Today 8:33 PM
A non-admin can't really write to program files.
Neustradamus Today 8:33 PM
now I understand
waqas Today 8:33 PM
We had no reason to require admin rights, so we don't.
Today 8:34 PM
Quoting from msdn:
The following list details additional reasons it is difficult to run as a standard user on computers running operating systems earlier than Microsoft Windows Vista.
Many Windows applications require that the logged on user be an administrator, but these applications do not actually require administrator-level access. These applications perform a variety of administrator access checks before being permitted to run, including:
Administrator access token checks.
"All access" access requests in system protected locations.
Data writing to protected locations, such as %ProgramFiles%, %Windir%, and HKEY_LOCAL_MACHINE\Software.
Today 8:34 PM
There was a very detailed page specifically about this, but I can't find it at the moment.
Neustradamus Today 8:35 PM
ok
Today 8:35 PM
where is this page ?
waqas Today 8:35 PM
The one I pasted from is http://msdn.microsoft.com/en-us/library/aa905330(loband).aspx
Today 8:36 PM
But it doesn't go into any details about the program files folder.
Neustradamus Today 8:37 PM
ok
Today 8:38 PM
but how prosody sucess to install in program files ?
Today 8:39 PM
success*
Today 8:39 PM
with run as administrator ?
waqas Today 8:39 PM
The setup program asks for admin rights (which shows a UAC prompt if you have that enabled).
Today 8:40 PM
In the future, we would have a low-privilege setup option as well.
Today 8:40 PM
Which would install to %UserData% (e.g., like Chrome).
Neustradamus Today 8:40 PM
bad solution !
waqas Today 8:40 PM
You would be able to specify locations.
Today 8:41 PM
You can always use the zip as a portable install.
Neustradamus Today 8:41 PM
yes but I do not understand why install program in other folder that program files ...
Today 8:42 PM
userdata is bad idea
Today 8:42 PM
my personal opinion
waqas Today 8:42 PM
Err, I meant %appdata%
Today 8:42 PM
Note that this is only for per-user install.
Today 8:43 PM
Where else would you install a per-user program?
Today 8:43 PM
Program files is global, not per-user.
Today 8:43 PM
The default install would always go into program files
Today 8:43 PM
Note that many applications do install to %AppData%. Google chrome is one example which comes to mind.
Neustradamus Today 8:44 PM
ok
waqas Today 8:44 PM
Try looking at any application which does a per-user no-admin install. That's how they do it.
Today 8:45 PM
Mainly because there is no other place for a no-admin install :)
Neustradamus Today 8:46 PM
all program that I install, it is in program files :D
waqas Today 8:46 PM
You are an admin, with UAC probably disabled :)
Neustradamus Today 8:46 PM
ok
Today 8:47 PM
talk about prosody :D
waqas Today 8:47 PM
We'll also probably have temporary install options in the future, which run directly off prosody.im.
Neustradamus Today 8:48 PM
I do not arrive to create admin account :(
Today 8:48 PM
prosodyctl not exist
Today 8:48 PM
docs are not good :(
waqas Today 8:48 PM
prosodyctl can't make users admins. You do that in the config.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment