ksafranski / codiad-terminal Goto Github PK
View Code? Open in Web Editor NEWTerminal Emulator Plugin for Codiad IDE
Terminal Emulator Plugin for Codiad IDE
When I run a simple ls
, the prompt immediately without any response, when I try ls -la
, the console stalls with "Processing...". This also happens when I do anything als like cd, echo, ....
ideas?
This is after
git config --global push.default simple
Folder with Codiad inside folder of my project, and I make chmod -R 777
to all files and chown -R www-data:www-data
Kent, Hello! A very useful plugin. But there was a problem. Launched in the Terminal Grunt watch — everything is fine, the process is started, everything works. But! It is not clear how to stop the process. Tried ctrl+c, ctrl+b — did not help, the process does not stop. Thought to cheat the system — closed the browser. :-) Didn't help. The process is left running, it does not let me on the page codiad. Now it is not clear how to get out of this state and to kill a running process.
Hello. I'm find the Isue in Terminal Plugin installed from Marketplace. I can sign in to it. I can run script. But when i try in script read data from keyboard (like raw_input) and I can't. Python show me EOF Error. It's means, the input is empty. I think, the Codiac Terminal auto "hit enter" when user is ask to input data from keyboard.
Hi,
As default, for example, 'ssh' is on blocked command list. But it can execute simple way.
Maybe this is a bug.
ML, Hiro
Currently it uses a dark font which makes it almost invisible to see that one is entering a password.
May be the simplest and safest fix would be to have an <input type="password">
just for that thing. I'd actually prefer to have it in a bright text, at least the cursor to see.
Hello,
I installed the plugin and tried to start the terminal. But I am getting a 404 when calling this URL while loading the terminal
http://[mydomain.tld]/[BASEPATH TO CODIAD]/plugins/Codiad-Terminal-master/emulator/index.php?id=kd9kdi8nundj
Since the BASEPATH includes the absolute path to my codiad installation, the terminal can not be loaded. I tried to change the basepath in the config.php of codiad, but then the ide is not be loaded anymore.
I guess I just configured something wrong. Can you help me ?
Thanks!
Nadir.
I don't now why cin statement doesn't wait input in Codiad terminal, whereas the same code works well in normal bash shell.
Hi,
I'll proposal an enhancement.
By cd without specified directory as argument, it means to move back to user's home directory normally.
But almost case, it is a user of web server. Normally, they are www or wwwrun. And this kind user don't have home directory.
So, I think it is better when user input only "cd", then it will move to project root directory.
ML, Hiro
No commands work on my Terminal Plugin.
In term.php
define('ROOT',WORKSPACE . '/' . $_SESSION['project']);
define(' ','ssh,telnet');
Should the second line be
define('ROOT',WORKSPACE . '/' . $_SESSION['project']);
define('BLOCKED','ssh,telnet');
I'm getting the error:
Notice: Use of undefined constant BLOCKED - assumed 'BLOCKED' in /opt/codiad/html/Codiad-master/plugins/Codiad-Terminal-master/emulator/term.php on line 107
It should work like pretty much all terminals: Clicking anywhere within the terminal should focus the input field. May be simplest is to intercept the clicks on the container. Else some CSS magic may also work.
This is not bug report, just enhancement.
On term.php, we can specify command by black list.
When I think to use CODIAD for green user instruction, too many command to inhibit. Maybe, I will permit for only command : cd, pwd, ls and php.
So, please add white list way. Maybe it is useful for others.
ML, Hiro
Hey, I'm trying to figure out how to use the BASH shell with this plugin? my server is running Ubuntu 16, and I can make a new user dedicated to Codiad, I mean, I already have user directories for users that don't exist, just so I can store my webpage in a NON-root folder.
It's be useful that you explain why there should be a password. I guess it's only because all there is no terminal access per user and all Codiad users run under the same UID/GID, and I guess there is no "public" exploit known risks (i.e. from non-logged in users). Those are all guesses and it'd be nice to update the README with a bit of details.
Hi,
I'll report a bug.
I made a new project with specified absolute path.
Then I started this plugin, and checked pwd
. It showed this plugin's directory, instead of project root directory.
I read term.php. In the beginning of Terminal class, tried to set home by this code :
define('ROOT',WORKSPACE . '/' . $_SESSION['project']);
But when I set absolute path project, ROOT is not correct path, so path wouldn't set.
So, maybe you will change class constructor code. Like this :
if(!isset($_SESSION['dir']) || empty($_SESSION['dir'])){
if(substr($_SESSION['project'],0,1) == '/'){
$this->directory = $_SESSION['project'];
} else {
$this->directory = rtrim(WORKSPACE, '/').'/'.$_SESSION['project'];
}
$this->ChangeDirectory();
}else{
$this->directory = $_SESSION['dir'];
}
$this->ChangeDirectory();
Sorry, I don't have time to make pull request.
ML, Hiro
Autocomplete for commonly used commands would be really helpful and is there any way to get auto complete on changing directory.?
I installed Codiad-Terminal in plugins folder.
I activated it trough Plugins option.
It appears in the side panel.
But when I click it, the emulator asks me to enter a password.
I don't know how to handle this.
Regards,
in term.php in the function Execute
you wrote
else if(function_exists('exec')){
exec($this->command_exec , $this->output);
$this->output = implode("\n" , $output);
}
it should be
else if(function_exists('exec')){
$output = array();
exec($this->command_exec , $output);
$this->output = implode("\n" , $output);
}
Hello,
Really useful, is there a way to open the terminal in a split windows (espcially in the bottom)?
Thanks a lot for the answer
That's the error I get when I load the terminal. I assume its a configuration error but would you have any insight into where I could look to correct it?
Hi,
I have one enhancement idea.
Now user can change working directory anywhere by cd command. It is not secure.
So how about introduce 'JAILED' constant, and when it is true, user can move within only project directory.
It is not hard to implement, I think.
How about this?
ML, Hiro
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.