Skip to content

Conversation

@Floby
Copy link

@Floby Floby commented May 16, 2011

Hello,
I wanted to try TermKit but I don't own any Mac (and probably never will) and run an Ubuntu instead =) so I modified some bits in your code to get it to work in Chromium which is based on webkit.
I have not looked closely at the icons not displaying but I reckon I can find a way to serve them through HTTP as well.

I'm sure you've considered these things before so I wouldn't be surprised if you didn't pull my request. But you never know, maybe I can help. This is a cool project.

Floby added 2 commits May 16, 2011 23:47
this only requires to `npm install connect` and allow for TermKit to
work in the browser
@benjamine
Copy link

That would be great, maybe this deserves a separate project, it would be great TermKit could be used as a remote client

@franzliedke
Copy link

SSH-in-the-browser-like?

@benjamine
Copy link

Exactly!, I know TermKit is not intended to be that, but maybe TermKit could be used to build something like that...

@Floby
Copy link
Author

Floby commented May 18, 2011

the HTTP based user interface is very common pattern for node.js apps because no bindings to native GUIs are available yet (or not seriously usable). However given the latency I get when running it on localhost, I cannot begin to imagine how frustrating it would be to use it remotely. This patch is mainly intended to be able to run TermKit on other OS's than MacOS X (in my case, Ubuntu).
I know there is chromeless by Mozilla which is fun to play with for native-ish webapps but I don't believe there is such a thing with a webkit based browser.

Besides, I pulled from the repository today and I have trouble running a simple ls in my ~/ I'm looking into this and eventually will update the pull request.

@Floby
Copy link
Author

Floby commented May 19, 2011

@hemna glad it worked. I forgot to ask for your node version, I assumed it was the latest, sorry. (by the way, last stable release is 0.4.7)
I added some npm sugar to my pull request so that the socket.io submodule is not needed anymore.

I should consider doing a serious fork of this, unconed seems to be ignoring my pull request :/

@dhasenan
Copy link

I'm not getting icons with this. This makes me sad :(

Great concept, and I'm glad to see it mostly working on Linux.

@Floby
Copy link
Author

Floby commented May 20, 2011

@dhasenan I know, it's because icons use inline CSS and webkit-specific URIs. I have not worked out a solution for this at the moment.

@ghost
Copy link

ghost commented May 20, 2011

Is there any opportunity to use Curl or Wget instead of Get? Ubuntu and other Linux Distributions usually don't have get. Ubuntu uses Wget as Standard.

@jrudolph
Copy link

This works already pretty good. What to do if TermKit loses keyboard focus? I can't get it to accept any keystrokes after I switched away from the browser tab in which it runs. Ubuntu 10.10, Chrome 11

@ghost
Copy link

ghost commented May 21, 2011

Is this a bug, that chromium 13 output each time the content-type from not built in Applications? Content-Type: application/octet-stream

@ghost
Copy link

ghost commented May 21, 2011

So, I wrote a little Programm launcher for TermKit http://www.heypasteit.com/clip/YBB. you can change the chromium-browser by replacing it with chrome. I hope you enjoy it.

@Floby
Copy link
Author

Floby commented May 21, 2011

Cool, I never had much interest for this Gnome stuff, glad to see someone knows it better.
the line

cd "path to termkit"/Node && node nodekit.js & chromium-browser "path to termkit"/HTML/index.html

should read

cd "path to termkit"/Node && node nodekit.js & chromium-browser http://localhost:2222/

the rest seems ok to me, but again I'm no expert at this.

@ghost
Copy link

ghost commented May 21, 2011

@Floby: both should work:
http://forum.golem.de/kommentare/software-entwicklung/termkit-neue-generation-von-unix-werkzeugen/soeben-unter-linux-mit-google-chrome-getestet-meinung/51757,2708256,2708256,read.html .. but thanks for this, to give chromium a "web" path is much better then using html files. But be careful:
Name[de_DE]=TermKit
GenericName[de_DE]=TermKit should to be changed to your language.

@Floby
Copy link
Author

Floby commented May 21, 2011

No, both don't work. When you navigate to a local html file (using file:// as protocol in chrome) WebSockets don't work. I was ready to believe otherwise, but doing so logs an error Invalid url for WebSocket ws:///socket.io/websocket which makes total sense.

@ghost
Copy link

ghost commented May 21, 2011

Why it Works for me?
21 May 18:24:02 - Initializing client with transport "websocket"
21 May 18:24:02 - Client 7772779429797083 connected
worker: config @{}@

-- http://localhost:2222/ don't works for me

@Floby
Copy link
Author

Floby commented May 21, 2011

@check probably because I committed further changes on my master branch so that socket.IO doesn't have it's localhost:2222 target hardcoded (allowing for remote use). But when you load the index.html as a file, it can't find where it should connect.

@Shifty0x88 You should try and send me pull request =) this isn't very hard and I promise you'll have fun :D see github help

@ghost
Copy link

ghost commented May 21, 2011

@Shifty0x88 not the best way to do this, with this way you've alwas have the same icon.
I think i will use php to choose a icon for each filetype..
defaultUrl = 'http://localhost/extensions.php?extension=' + extension ;
.. the problem is, i don't know how to get the mime type, that would make my work much easier.
@Floby: thx

@Floby
Copy link
Author

Floby commented May 21, 2011

this is what the mime module is used for. You can use it from node.js

On 21 May 2011 21:58, check <
[email protected]>wrote:

@Shifty0x88 not the best way to do this, with this way you've alwas the
same icon.
I think i will use php to choose a icon for each filetype..
defaultUrl = 'http://localhost/extensions.php?extension=' +
extension ;
.. the problem is, i don't know how to get the mine type, that would make
my work much easier.

Reply to this email directly or view it on GitHub:
#6 (comment)

@ghost
Copy link

ghost commented May 21, 2011

@Floby: do you know why this happens?
http://r46.img-up.net/?up=TermKithj0l1.png

@Shifty0x88
Copy link

Oh that, no I haven't figured that out yet. Nice I'm glad to see you got the
icons working. I think it might have to do with the css or possible the
outputview classes and how it splits up the outputviewnodes? (Whatever the
actual name+size+icon)

On May 21, 2011 6:49 PM, "check" <
[email protected]>
wrote:

@Floby: do you know why this happens?
http://r46.img-up.net/?up=TermKithj0l1.png

Reply to this email directly or view it on GitHub:
#6 (comment)

@ghost
Copy link

ghost commented May 21, 2011

@Shifty0x88: actully icons not work as good as possible. I made a php skript, but i think it gonna work better. The php skript use the icons of Faenza. http://paste.bradleygill.com/index.php?paste_id=289746 .. but i still working on this.
Thx!

@Shifty0x88
Copy link

Hey its better then no icons or what I had done just a file icon. Still had
to figure out how to check the type and if it was a folder or not etc

On May 21, 2011 7:16 PM, "check" <
[email protected]>
wrote:

@Shifty0x88: actully icons not work as good as possible. I made a php
skript, but i think it gonna work better. The php skript use the icons of
Faenza. http://paste.bradleygill.com/index.php?paste_id=289746 .. but i
still working on this.

Reply to this email directly or view it on GitHub:
#6 (comment)

@ghost
Copy link

ghost commented May 21, 2011

@Shifty0x88
Copy link

Nice although its a shame we had to add the extra icons to it, and not use
his existing images. I think when the extension is "..." it means the file
stat mode & 0x4000 is true.

On May 21, 2011 7:57 PM, "check" <
[email protected]>
wrote:

update: http://paste.bradleygill.com/index.php?paste_id=289749

Reply to this email directly or view it on GitHub:
#6 (comment)

@kuno
Copy link

kuno commented Jun 13, 2011

I just started a linux client for TermKit, using gnome seed flamework, which is a javascript binding to libwebkit.
This make it perfect to demonstrate how javascript can do with next generation web technology on the desktop experience.

I have not any previous experience with gtk, so , may someone can help me make it better?
If you are interesting, check it out:
https://github.com/kuno/TermSeed

@jonashaag
Copy link

You're a Java/C++ programmer, right? Please don't write Java in Javascript. Don't do getters and setters -- they're just about the most stupid things in programming I've ever seen.

@unconed
Copy link
Owner

unconed commented Jun 13, 2011

FYI, the icons being chopped up across columns is a WebKit issue. They don't allow you to control column breaking inside elements yet.

@sneilan
Copy link

sneilan commented Jan 23, 2012

Oy. And I used the recursive option too. This is on ubuntu 11.10 with
$ node -v
v0.7.1-pre

and
[email protected] /usr/local/lib/node_modules/npm

sneilan@sneilan-ubuntu:~/build/TermKitProj/TermKit$ node Node/nodekit.js
node.js:218
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: require.paths is removed. Use node_modules folders, or the NODE_PATH environment variable instead.
at Function. (module.js:378:11)
at Object. (/home/sneilan/build/TermKitProj/TermKit/Node/nodekit.js:5:8)
at Module._compile (module.js:434:26)
at Object..js (module.js:452:10)
at Module.load (module.js:353:32)
at Function._load (module.js:310:12)
at Array.0 (module.js:472:10)
at EventEmitter._tickCallback (node.js:209:41)

@Shifty0x88
Copy link

Which version of Node are you using?

From the error message it looks like require.paths() is no longer valid.

Seems like they removed the require.paths() function. Check out http://nodejs.org/docs/v0.4.3/api/all.html#loading_from_the_require.paths_Folders for some tips to fix the issue.

I have all but given up on the project from the amount of JS code, and how I hate JS programming as it is not very static and everyone seems to have a different style.

Was thinking about making a C clone of this, but I gave up. Check out Floby's (which I based my off of) or go back to the parent fork of Unconed for more information.

Oh and a little google on: "Error: require.paths is removed. Use node_modules folders, or the NODE_PATH environment variable instead." will give you a bunch of hits from other GitHub projects that are using Node.js

Sorry I am not much help... but good luck.

-- Rob (Shifty0x88)

@Floby Floby closed this Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.