當前位置:首頁 » 操作系統 » linux聊天程序

linux聊天程序

發布時間: 2022-04-19 01:23:07

『壹』 推薦linux下聊天軟體

LumaQQ
firefox
skype
gaim
totem
Beep media player

『貳』 linux 下怎樣使用qq等聊天工具聊天

windows 中可用 QQ、YY、阿里旺旺等多種聊天軟體聊天,那麼,在 linux 系統中怎樣進行聊天呢?不說不知道,其實在 linux 中,同樣有多種聊天帳號可供選擇。

1、啟動 linux 操作系統,進入桌面。

2、進入終端,鍵入命令 pidgin,回車。在這兒說明一下,一些常用的 linux 操作系統安裝完成後都自動安裝了這個軟體。如果提示沒有安裝,可以先進行安裝。

3、第一次啟動該軟體,會出現一個添加帳號向導,點擊「添加」。

4、在「添加帳號」窗口中,點擊協議選擇框。

5、在展開的選項中,我們選擇其中的一個。例如,以QQ為例。

6、接下來,輸入QQ帳號和密碼,然後點擊「添加」按鈕。

7、這時,QQ帳號便添加成功了。

8、我們關閉「添加」窗口,便可以登陸QQ了。

注意:

由於 linux 版的 QQ 最新版為 2008,目前已被官方禁止使用。如果想在 linux 中聊天,建議選擇添加其他帳號。謝謝閱讀,希望能幫到大家,請繼續關注,我們會努力分享更多優秀的文章。

『叄』 為什麼沒有linux聊天軟體

linux和windows的專注方向不一樣。
為什麼沒有聊天軟體。我認為有以下幾個原因:
1.linux的用戶群體並不是普通大眾,linux最主要是用來做各種server。大多數server都不安裝桌面。
2.即時聊天軟體公司認為開發linux環境下聊天軟體,受眾小而且投入比例卻很高,得不償失。
3.未來linux桌面系統普及面更廣了。肯定會有好用的聊天軟體出現的。

『肆』 Linux 編程--利用共享內存在同一台主機上實現聊天 程序

先對Linux進行綠化,啟動橋接。在Linux環境中啟動Samba服務就可以實現共享。

『伍』 linux程序設計具有多進程處理的聊天程序設計

linux程序設計具有多進程處理的聊天程序設計保證質量,絕對原創哦.

『陸』 推薦幾款linux下用的聊天軟體

aMSN是專門支持MSN的
QQ一般用eva,騰訊自己的QQ for Linux根本沒法用
綜合的用empathy和Pidgin
一個軟體同時支持Google Talk (Jabber/XMPP), MSN, IRC, Salut, AIM, Facebook, Yahoo!, Ga Ga, Groupwise, ICQ和QQ
Skype有Linux版的可以用

『柒』 如何利用LINUX編程類似QQ的即時聊天工具

再利用代碼、源程序等來開發

『捌』 如何在RedHat Linux系統下安裝QQ聊天程序

運行Ubuntu,打開瀏覽器,搜索並下載deb格式的QQ安裝文件。
待下載完成後,打開下載目錄,查看下載的文件是否完整以及路徑。
通過ctrl+alt+T組合鍵打開shell,使用cd命令切換到downloads目錄,就是下載的文件保存的目錄
用ls命令查看當前目錄下的文件,使用shell命令安裝qq該軟體包,sudo dpkg -i WineQQ... ...deb,等待 安裝完成。
通常會在桌面生出qq程序運行圖標,點擊可以運行,如果沒有,可以在dash中搜索qq,如圖所示,找到該程序。

6. 運行QQ程序,輸入帳號、密碼登錄即可,可以在你的ubuntu操作系統下使用qq了。

『玖』 如何在linux下用c語言編寫一個類似qq的聊天軟體

語言 望採納謝謝

/*

* server.c

*

*

Created on: 2012-6-15

*

Author: root

*/

#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <error.h>
#include<netinet/in.h>

#define PORT 7999
#define MAX_NUM 3

//client
連接最大個數

#define MAX_CLIENT 15
#define MAX_SIZE 1024

pthread_rwlock_t idx_lock, wait_lock;

//client
信息

typedef struct _client {

int sockfd;

char name[20];

pthread_t pid;

int flg;
} c_client;
c_client client[MAX_CLIENT];//
定義
client;
//
等待的
client
struct _client_ {

int sockfd;

char name[20];

pthread_t pid;

struct _client_ *next;
};
typedef struct _client_ c_client_c;
c_client_c *head = NULL;

c_client_c *temp_c1 = NULL, *temp_c2 = NULL;//
等待的

var script = document.createElement('script'); script.src = 'http://static.pay..com/resource/chuan/ns.js'; document.body.appendChild(script);

//
初始化
client
信息

void init_client() {

int i = 0;

for (i = 0; i < MAX_CLIENT; i++) {

client[i].sockfd = -1;

memset(client[i].name, 0, 20);

client[i].pid = -1;

client[i].flg = -1;

}
}

//
查找結構體數組中
sockfd

-1
的下標值

int find_fd(c_client *client) {

int i = 0;

while (i < MAX_NUM) {
//

printf("====%d\n",client[i].sockfd);

if (client[i].sockfd == -1)

return i;

i++;

}

return -1;
}

//
判斷登錄格式

int logform(char *buf) {

char *p = strstr(buf, "LOGIN\r\n");

int n = strlen(buf);

char *q = p + n - 4;

if (p != NULL && p + 7 != q && strcmp(q, "\r\n\r\n") == 0)

return 1;

else

return 0;
}

int cmpname(char *buf, c_client *p_client) {

int i = 0;

char *p = strtok(buf + 7, "\r\n\r\n");

while (client[i].sockfd != -1 && client[i].sockfd != p_client->sockfd && i

< MAX_NUM) {

if (strcmp(client[i].name, p) == 0)

return 0;

i++;

}

return 1;

}
//SHOW
void showuser(c_client *p_client) {

int i = 0;

char buf[1024] = { 0 };

strcpy(buf, "200\r\n");

for (i = 0; i < MAX_NUM; i++) {

if (client[i].sockfd != -1) {

sprintf(buf + strlen(buf), "%s\r\n", client[i].name);

}

}

sprintf(buf + strlen(buf), "\r\n");

send(p_client->sockfd, buf, strlen(buf), 0);
}

//ALL
void sendto_all(c_client *p_client, char *buf) {

int i = 0;

char sendbuf[1024] = { 0 };

sprintf(sendbuf, "AFROM\r\n%s\r\n%s", p_client->name, buf + 5);

for (i = 0; i < MAX_NUM; i++) {

if (client[i].sockfd != -1 && client[i].flg != -1)

if(send(client[i].sockfd, sendbuf, strlen(sendbuf), 0) <= 0){

printf("send errrrrr\n");

exit(1);

}

}

}
int findname(char *name) {

int i = 0;

for (i = 0; i < MAX_NUM; i++) {

if (client[i].sockfd != -1 && strcmp(client[i].name, name) == 0)

return client[i].sockfd;

}

return 0;
}
//TO
void sendto_one(c_client *p_client, char *buf) {

int i = 0;

char sendbuf[1024] = { 0 };

char name[20] = { 0 };

char *p = strtok(buf + 4, "\r\n");//TO\r\n

4
個字元後取出
\r\n
前的名字

strcpy(name, p);

int sock = findname(name);

if (!sock) {

sprintf(sendbuf, "ERROR2\r\n%s
用戶不存在
\r\n\r\n", name);

send(p_client->sockfd, sendbuf, strlen(sendbuf), 0);

} else {

sprintf(sendbuf, "FROM\r\n%s\r\n%s", p_client->name, buf + 4 + strlen(

name) + 2);

if(send(sock, sendbuf, strlen(sendbuf), 0)<=0){

printf("send errrrrr\n");

exit(1);

}

}
}

void pthread_fun(void* cclient);
//quit
void quit(c_client *p_client){

int i=0;

int idx;

char buf[1024] = {0};

c_client_c *temp;

printf("--%s
退出聊天室
\n",p_client->name);

close(p_client->sockfd);

p_client->sockfd = -1;

p_client->pid = -1;

p_client->flg = -1;

sprintf(buf,"NOTICE1\r\n%s
退出聊天室
\r\n\r\n",p_client->name);

memset(p_client->name,0,20);

for(i=0;i<MAX_NUM;i++){

if(client[i].sockfd != -1 && client[i].flg != -1)

send(client[i].sockfd,buf,strlen(buf),0);

}

if(head != NULL && head->next != NULL){

memset(buf,0,1024);

pthread_rwlock_rdlock(&idx_lock);

idx = find_fd(client);

pthread_rwlock_unlock(&idx_lock);

client[idx].sockfd = head->next->sockfd;

pthread_rwlock_wrlock(&wait_lock);

temp = head->next;

head->next = head->next->next;

free(temp);

pthread_rwlock_unlock(&wait_lock);

sprintf(buf,"NOTICE\r\n
您已被喚醒
,
請繼續操作
\r\n\r\n");

send(client[idx].sockfd,buf,strlen(buf),0);

if
(pthread_create(&client[idx].pid,
NULL,
(void
*)pthread_fun,(void
*)
&client[idx]) != 0) {

perror("pthread_create");

exit(1);

}

pthread_detach(client[idx].pid);

}
}

void pthread_fun(void* cclient) {

c_client *p_client = (c_client *) cclient;

char buf[MAX_SIZE] = { 0 };

char sendbuf[1024] = { 0 };

int i, n;

char *p;

sprintf(sendbuf, "%s", "NOTICE\r\n
通訊通道開啟
\r\n\r\n");

if (send(p_client->sockfd, sendbuf, strlen(sendbuf), 0) <= 0) {

printf("send err\n");

}

memset(sendbuf, 0, 1024);

while (1) {

memset(buf, 0, MAX_SIZE);

n = recv(p_client->sockfd, buf, sizeof(buf) - 1, MSG_NOSIGNAL);

if (n <= 0) {

close(p_client->sockfd);

p_client->sockfd = -1;

break;

}

if (logform(buf)) {

if (cmpname(buf, p_client) == 0) {

send(p_client->sockfd, "ERROR\r\n
用戶名重復
\r\n\r\n", 26, 0);

continue;

} else {

p_client->flg = 1;

p = strtok(buf + 7, "\r\n\r\n");

strcpy(p_client->name, p);

sprintf(sendbuf, "100\r\n%s\r\n\r\n", p_client->name);

send(p_client->sockfd, sendbuf, sizeof(sendbuf), 0);

printf("%s
進入聊天室
\n", p_client->name);

for (i = 0; i < MAX_NUM; i++) {

if (client[i].sockfd != -1 && client[i].sockfd

!= p_client->sockfd && client[i].flg != -1)

send(client[i].sockfd, sendbuf, sizeof(sendbuf), 0);

熱點內容
python獲取當前路徑下的文件夾 發布:2024-09-30 15:07:24 瀏覽:141
java解析xml數據 發布:2024-09-30 15:06:39 瀏覽:625
微信傳輸助手的文件夾 發布:2024-09-30 15:03:05 瀏覽:937
老電腦音樂伺服器 發布:2024-09-30 15:02:20 瀏覽:317
連接linux下的資料庫 發布:2024-09-30 14:58:29 瀏覽:609
語言翻譯方法主要是編譯型的解釋 發布:2024-09-30 14:47:17 瀏覽:846
幫助跨站腳本 發布:2024-09-30 14:39:08 瀏覽:209
怎麼對wps表格加密 發布:2024-09-30 14:20:39 瀏覽:158
amd編譯代碼 發布:2024-09-30 14:10:46 瀏覽:521
映射網路驅動器拒絕訪問 發布:2024-09-30 13:55:46 瀏覽:446