Well, you may have been noticing I've been busy with other things lately and not updating Wakaba or Kareha. One of the things I've been working on has now reached a state where I feel I can release a beta version of it. It is...
The Unnamed Javascript Desktop
http://wakaba.c3.cx/desktop-test/desktop.pl (Log in as test:test)
This is basically a remote administration tool. I got tired of messing around with ssh and scp and FTP and all kinds of horrible three-letter acronyms to keep my websites updated, and I started thinking about alternatives, and things got kind of out of hand. This is the result.
It's a graphical desktop system, written in Javascript, with a server backend written in Perl. It is not a very mature piece of software yet, and it has numerous bugs and issues with bugs in browsers, but it works, after a fashion. I've been using it for a little while now for my various servers. I am releasing it now so that I can take a break from coding it, and also with some sort of vain hope that somebody would find it cool enough to help me work on it, because I don't know if I'll ever have the time to do everything I want with this.
You can see the files on the web server at http://wakaba.c3.cx/desktop-test/files/
General Usage
Anybody comfortable with windowing and desktop systems should be able to figure out how to use this fairly easily. There's a file manager to browse the file system, drag-and-drop to move or copy files (shift-drag or right-click-drag to copy files instead of moving, on browsers where this works), a trashcan for deleting files, a context menu for further actions (This has issues on several browsers. Use either right-click or click-and-hold to trigger it, depending on what works).
From the context menu, you can change permissions on files, rename them (also works by clicking a selected file, like most OSes do), download files, upload files, make new files and directories...
There's a text editor to edit files, with basic support for different character sets. It's quite limited at the time, and has some bugs, but it works. It's set as the default action for most filetype, so just doubleclicking a file will open it.
You can minimize windows by double-clicking the title bar. The little red square (which really needs some actual graphics) is the close button.
Server-side installation and issues
There are two alternatives for installation of this thing. One is the good old zip archive:
http://wakaba.c3.cx/releases/desktop_0.1.0.zip
Unpack it on your server, chmod 755 desktop.pl
, and go to http://.../desktop.pl, and you should see a small config screen.
The other is more experimental and exciting. I have created a self-installing package in Perl:
http://wakaba.c3.cx/releases/desktop_inst.pl
Upload this to your webserver, chmod it to 755, and run it through a browser (or from a shell, but that's not as much fun). It should show you the files it has unpacked, and will then delete itself and set the right permissions on desktop.pl. You can then just hit desktop.pl, and you're good to go.
Well, that's the theory. There will no doubt be a lot of issues.
One thing to realize is this: The web server must have access to write all the files you want to work with! This will work fine under certain conditions: If you or your host uses mod_suexec to run CGI scripts under your user, things will work. If your web server runs as some other user, you will have to chown all files you want to be able to change to it. You might also be able to get it to work by suiding it to run as root, but if you want to do that, I'm going to assume you know what you're doing. It might be a bit risky.
Browser issues
Since this thing really goes far beyond most normal uses of JS and the DOM, it is very good at triggering bugs in browser implementations. No browser will run it entirely correctly as it stands now. I've added a lot of workaround for various browser bugs, but some things just can't be fudged to work. Here are some issues with various browsers:
Firefox, Windows
IE, Windows
Safari, Mac OS
Firefox, Mac OS
Things that need work
There are quite a number of things that I would like to have, but that I haven't yet implemented. Among these are:
Copyright
This early version, at least, is public domain. I might change to some sort of license later, but not yet. The icons are all stolen from David Vigoni's Nuvola icon set: http://www.icon-king.com/. Those are released under the LGPL, but I really have no idea what that means when it comes to icons. I'll have to ask the man himself at some point, but for now I hope he doesn't mind.
In closing
Sheesh, what a huge pile of text.
What I'm hoping for now are a few things. Bugreports and suggestions are very welcome, but read through this text first to see if I already know about it. What is even more welcome is actual code. This thing is very modular and extensible, and others can easily (or so I'd like to think) implement extra applications for it. If you've got code to fix bugs or add other functionality, I'd like to see that, too.
I should write a whole bunch of documentation for the internal APIs for this thing, but that will have to wait a little while. If you're interesting, dig into the .js files, or talk to me.
Well, I'd hope that's that, but I'm sure I forgot to mention something. But for now, I hope you'll have some fun with this.
When that thing says "Post too long", it really means it. That is one horrendous chunk of text. Make sure to read it, though, before reporting bugs and such.
Also, the server is having some problems, so things might be sluggish. Uploading especially - it might not work at all.
By God. You're flipping brilliant. Really stellar. I may have to test that thing on my own server.
Out of morbid curiousity I just tried it out in Internet Explorer for Macintosh (which Microsoft doesn't even maintain anymore). It appeared to completely fail to do anything, which is no great shock, and I'm not even sure why I'm telling you this.
http://wakaba.c3.cx/releases/desktop_0.1.1.zip
http://wakaba.c3.cx/releases/desktop_inst.pl
Small update. When I was fixing uploading in IE in the release rush, I accidentially broke it in most other browsers. Oops. Also, context menus act a little bit better in browsers that are not Safari (although there's still quite a bit of room for improvement), and pages are now sent as application/xhtml+xml when possible, which is useful on 100webspace, where the horribly buggy inserted ads would otherwise break the script.
Also, the self-installer now uses compression. Furhtermore, you can get the self-extracting archive maker here:
http://wakaba.c3.cx/releases/other/makearch.pl
Usage: makearch.pl [-d] [-e file.pl] archive.pl file1 file2 directory...
The -d flag makes the archive delete itself after unpacking. The -e flag specifies one or more files that will be inserted into the Perl header. You can use this to add extra code that needs to be run after unpacking - the desktop uses this to put in a chmod 0755 "desktop.pl";
, for instance.
Also, a request: Some better CSS files. There are some weird limitations on what you can do with the CSS styles - it's best to leave the positioning as absolute for those elements that have it set that way, but it shouldn't be too hard to make something better than what I have now.
Also, a mascot.
test:test doesn't work anymore?
Oh my god!! That's just awesome! However, no files are shown in the file manager. The context menu doesn't work either. Moving, resizing and creating new file managers works. I'm using Firefox 1.0.4 under Linux. Opera 8 for Linux isn't able to log on.
If you're able to sort that out, it will be even more awesome. I'm definately visiting this thread regularly from now on.
Keep it up. And stuff.
test:test does still work for me. There is a bug though where pressing return after typing the password will just reload the login page on some browsers. You have to click the button to log in properly. I'll fix that at some point.
Firefox should be the browser it works best in, and I have used it under Linux. Maybe the server was just feeling cranky again and not sending results promptly... Does it still not work?
Also, the context menu won't work if you've set Firefox to forbid blocking the default context menu. The workaround is to use Mac-style click-and-hold instead of the right mouse button to open the context menu.
Update: The hosting company's network is, in fact, messed up again. This is probably why the file listings wouldn't load. Let's hope it passes.
I get a "XML Parsing Error" in firefox.
Hmm, no such problem here. I'm blaming the server issues for that one too.
Did somebody screw with the thing? The text editor is gone, as are all folders and files and I cannot close any instances of the file manager...
Oh wait, I seem to have introduced a bug somewhere along the line that didn't show up in any of the browsers I tested with. It's fixed now, and I'll put out an updated install in a little bit.
http://wakaba.c3.cx/releases/desktop_0.1.2.zip
http://wakaba.c3.cx/releases/desktop_inst.pl
There. Fixed the Firefox bug (that for some reason didn't happen in Firefox on Mac OS), improved the login page a bit (pressing return in the password field should now trigger a login), and fixed a minor icon bug.
Test page also updated, so check it out.
Also, I forgot to mention: the XMLHttpRequest implementation in Opera 8 seems to be pretty broken. Until they fix it, the desktop probably won't work in Opera.
All I get out of 0.1.2 (auto-installer or manual) is:
Invalid [] range "}-\x" before HERE mark in regex m/([\x{100}-\x << HERE {ffff}])/
Compilation failed in require at desktop.pl line 17.
BEGIN failed--compilation aborted at desktop.pl line 18.
No idea what any of that means.
Well, now I got to the config, and the login screen, but now when I try to login with the info I put in, it says Auth Failed.
http://wakaba.c3.cx/releases/desktop_0.1.3.zip
http://wakaba.c3.cx/releases/desktop_inst.pl
This should work on Perl 5.6 (except that unicode and other character sets won't work). I'll admit I was too lazy to test it, so tell me if it doesn't work.
Well, that's a little better. I know get a wakaba-looking screen that says (and this is pretty long and I hope it doesn't get messed up when I post it):
XML Parsing Error: mismatched tag. Expected: </small>. Location: http://www.hgundam.com/imageboard/desktop.pl?task=config Line Number 1, Column 643:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>Configure the desktop</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> </head> <style type="text/css"> h1 { font-family: sans-serif; font-size: 1.2em; } td { vertical-align: top } </style> <body> <form action="desktop.pl" method="post"> <input type="hidden" name="task" value="setconf" /> <h1>Configure the desktop</h1> <table><tbody> <tr> <td>Change user name:<br /> <small>(Leave empty to keep the old value.)<small></td> <td><input type="text" name="new_user" /></td> </tr> <tr> <td>Change password:<br /> <small>(Leave empty to keep the old value.)<small></td> <td><input type="password" name="new_passwd" /></td> </tr> <tr> <td>Retype password:</td> <td><input type="password" name="check_passwd" /></td> </tr> <tr> <td>Base directory:<br /> <small>(Leave empty to use the<br /> same directory that the script<br /> resides in.)</small></td> <td><input type="text" name="base_path" value="" /></td> </tr> <tr> <td>Filesystem charset:<br /> <small>(Usually "utf8".)</small></td> <td><input type="text" name="fs_charset" value="utf8" /></td> </tr> <tr> <td></td> <td><input type="submit" value="Save settings" /></td> </tr> </table></tbody> </form> </body> </html>
Oops, clearly a case of nowhere near enough testing. Good thing I have you people to test stuff for me. Fixed, plus a fix to make the download command work in more browsers:
http://wakaba.c3.cx/releases/desktop_0.1.4.zip
http://wakaba.c3.cx/releases/desktop_inst.pl
Two feature requests:
> A "log out" button.
What exactly should it do? Erase the cached login information? As it is now, there can only be one user, and the cached data is erased when you close the browser. I don't know if there's much need for a log out button, except for if you use it somewhere where you just can't quit the browser. Was that what you had in mind?
> A place to click to access task=config (is it already there? I couldn't find it).
The thought here was that you're not supposed to need to access it often enough for it to need a link, but maybe I'm wrong about that.
Both things should be there, just in case you need them or they become more useful in the future. I assumed I could right click on the desktop and have some useful global functions pop up (changing the wallpaper? :) ) but actually nothing happened.
I'll hack it myself if you're busy.
Oh, pretty easy to fool around with. Don't know any javascript, so can't do the right-click thing :<
> Attempt to load a javascript: URL from one host
> in a window displaying content from another host
> was blocked by the security manager.
DAMN YOU FIREFOX, I THOUGHT I WAS SO CLEVER
this script is great :D
but, please make it more secure, maybe a option to deactivate desktop.pl?task=config after it has been set once
a option to make more users with other subdirectories would also be great!
task=config will only allow you to change the password freely once. After that, you have to supply the old password. Allowing access to your files over the net is of course insecure by design, so the only real protection is the password.
If you want more security, you can always hide the script behind Apache's authentication too, and use https.
Username Test, Password Test, refuses to run for me.
Oops, forgot to disable changing the user name on the test version. Changed it back to the right one, and disabled changing it.
Hi. Wow. This desktop env is amazing! I really like the idea behind it and it looks like it could really help me with maintaining my website instead of having to run a rather slow VNC terminal or just use MC over SSH. I'm trying currently to run this on my shell account at spunge.org and I'm having a little problem:
If I configure it to use the standard folder as the base dir, it makes / my base. This is fine other than the fact that getting from / to my home dir takes quite some time on spunge's machine. Now, if I change the base to my home (/home2/w00t/public_html/) I get the error popup:
/pub at .desktop/Libraries/File/fileutils.pl line 146.
I'm no perl programmer, so tracing this myself is a bit beyond what I can do, but I thought I should bring it to your attention. my setup is as follows:
Home: /home2/w00t
Public html: /home2/w00t/public_html
Desktop env: /home2/w00t/public_html/desk/
if I make the base dir the same as the desktop's folder (desk/) it works fine. The problem is that I want to access the files in the parent folder. I tried moving .desktop/ to public_html but I still got the same error.