LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Open Text Editor through C-program at server-side and it should display to all client (https://www.linuxquestions.org/questions/linux-server-73/open-text-editor-through-c-program-at-server-side-and-it-should-display-to-all-client-801311/)

sarworld 04-11-2010 02:09 AM

Open Text Editor through C-program at server-side and it should display to all client
 
Hi to everyone , I am beginner in "tcp/ip socket programming" on ubuntu. I want to do the client-to-client manging by server but I am not getting any solution. I have an Idea if I open a text editor and that should be shown to each connected client so that client can read message to any other client. So if anyone know that how can we open text editor when I am running my server-side program. please try to solve my problem.



and My 2nd question is how can i open all commnds using my C-program on linux.

and my 3rd question is what is the extension of executable file in ubuntu.

Elv13 04-11-2010 08:27 PM

1: What you are looking for is a "screen" shared session. With this application and an ssh connection, you can share a terminal, running a command like based text editor like nano, emacs or vim.

2: You have many choices. this system(""); function will execute a command and wait until it end (and grab the returned integer). The popen() command from unistd.h (windows.h equivalent) will return the text of the command when it is over. And the fork+exec+pipe way (a standard Linux programming algorithm) will execute the command in real time in a thread (more specifically a child process, in this case) and will send the result as they arrive in the main process. All of these method are good depending on what is your goal.

3: They have none, but have the executable permission flag. The "chmod 755 yourFutureExecutableFilePath" will give execution and reading right to everybody and read, execute and write access to the owner of the file.

sarworld 04-12-2010 01:00 AM

thanks u very much I'll try and suggest me any book as I am a beginner.

chrism01 04-13-2010 02:54 AM

www.linuxtopia.org
http://tldp.org/LDP/Bash-Beginners-G...tml/index.html
http://www.tldp.org/LDP/abs/html/
http://rute.2038bug.com/index.html.gz


All times are GMT -5. The time now is 10:39 AM.