Gudanar da aikace-aikace (gami da zane) a wata PC ɗin azaman wani mai amfani

Sannu,

Wannan yana da amfani da gaske, tunda ta wannan hanyar zamu iya sarrafa wani PC, ko kuma zai sa rayuwarmu ta ɗan sami sauƙi a wasu lokuta.

Sun san cewa idan sun haɗu ta hanyar SSH de Kwamfuta # 1 a Kwamfuta # 2 misali, kuma suna kokarin bude wani program kamar Firefox gudu da nunawa a ciki Kwamfuta # 2, ko wani kiɗa ko mai kunna bidiyo, muna yin shi kamar haka:

mai amfani @ pc2: ~$ Firefox

Amma, ya dawo da kuskuren mai zuwa:

(Firefox: 1704): Gtk-GARGADI **: ba zai iya bude nuni ba:

Da kyau, a nan zaku ga yadda ake buɗe softwares ɗin da muke so, warware wannan kuskuren da umarni ɗaya kawai.

Kazalika (kuma a ganina wannan ya fi ban sha'awa), a ce nine Kwamfuta # 1, Ina samun damar Kwamfuta # 2 menene PC din budurwata tare da mai amfani kzkgaara misali, to ina mata fata (mai amfani cc) an nuna maka a sanarwa (kamar waɗanda suke bayyana lokacin da muka ɗaga ko rage ƙarar, da sauransu) wanda ke cewa “Dakatar da sauraren Enrique Iglesias !!!”Hehe… za mu ga yadda ake yi, ba tare da sanin kalmar sirri ta mai amfani ba (cc a cikin wannan misalin).

Don samun dama ta hanyar SSH tare da mai amfani (kzkgaara a cikin wannan misalin) zuwa Kwamfuta # 2 (tare da adireshin IP = 192.168.151.209) mun sanya wani abu kamar haka:

  • ssh kzkggaara@192.168.151.209

Yanzu, da zarar cikin mai amfani da mu, muna so muyi amfani da mai kunna bidiyo misali, wanda aka girka ta tsoho a cikin Ubuntu shine Totem, zamuyi amfani da wannan don bayani.

Idan kawai muka sa a cikin tashar "totem”Zai bamu kuskuren da aka ambata, tunda kafin aiwatar da aikace-aikacen dole ne mu sanya layi mai zuwa:

  • fitarwa DISPLAY = = 0.0

Sanya wannan, kuma an warware matsalar hehe. (idan kuskure ya bayyana, canza "0.0"by"1.0“) Don haka, matakan aiwatarwa totem so:

  1. fitarwa DISPLAY = = 0.0
  2. totem

Kuma a shirye.

Idan kuwa haka ne muke son rufewa totem muna sanya kawai:

  • gaba daya

Yanzu idan muna son gudanar da bincike kamar Firefoxriga Ba za mu samu ba sake rubuta layin farko (fitarwa DISPLAY = = 0.0), kawai mun sanya:

  • Firefox

Kuma an warware matsala 😉

Koyaya, idan sun bar zaman kuma sun sake shiga ta hanyar SSH zuwa Kwamfuta # 2, Dole ne su rubuta layin suna magana akan fitarwa.

Yanzu ... mafi ban sha'awa a ganina:

Gudanar da aikace-aikace akan tebur na wani mai amfani:

An riga an haɗa mu da SSH zuwa Kwamfuta # 2, mun sami dama tare da mai amfani kzkgaara kuma abin da muke so shi ne nuna mai amfani cc daya sanarwa (kamar waɗanda suke bayyana lokacin da muka ɗaga ko rage ƙarar, da sauransu) wanda ke cewa “Dakatar da sauraren Enrique Iglesias !!!"

Domin aika sanarwar da hannu, dole ne mu girka fakitin da ake kira libnotify-bin, don shigar da shi mun sanya a cikin tashar:

  • sudo dace-samun shigar libnotify-bin

Kuma a shirye. Yanzu, zamu ƙirƙiri ƙaramin rubutu tare da umarnin:

  • sudo taba /opt/script.sh

Zamu shirya shi da:

  • sudo nano /opt/script.sh

Kuma a ciki zamu rubuta masu zuwa:

fitarwa DISPLAY = = 0.0

sanar-aika "Dakatar da sauraron Enrique Iglesias !!!"

Muna adanawa da fita tare [Ctrl] + [X], kuma yanzu zamu ba da izinin rubutun don gudana:

  • sudo chmod + x /opt/script.sh

Kuma yanzu muna buƙatar aiwatar da rubutun kawai, amma zamu aiwatar dashi azaman mai amfani cc, tunda abin da muke so shine don wannan sanarwar ta bayyana ga takamaiman mai amfani. Muna matsawa zuwa kundin adireshi wanda ya ƙunshi rubutun:

  • cd / fita /

Kuma yanzu muna gudanar da shi:

  • sudo -u cc ./script.sh

Anyi, wannan zai zama hakan.

Wannan cikakken keɓaɓɓe ne, zasu iya nuna muku wani gedit wannan ya ce "Na yi muku fashin kwamfuta“, Ko duk abin da suke so, duk ya dogara da yadda suka san yadda ake inganta abubuwa.

Babu komai, koyawa ya ƙare anan.

Duk wani kuskuren da ya taso, matsala, shakka ko tambaya, korafi ko shawara, zan yi godiya idan kun sadar da shi, ana samun karɓa mai kyau koyaushe.

Gaisuwa da ... Na san wannan zai zama da amfani ga wani ^ _ ^


Abubuwan da ke cikin labarin suna bin ka'idodinmu na ka'idojin edita. Don yin rahoton kuskure danna a nan.

11 comments, bar naka

Bar tsokaci

Your email address ba za a buga.

*

*

  1. Mai alhakin bayanan: Miguel Ángel Gatón
  2. Dalilin bayanan: Gudanar da SPAM, gudanar da sharhi.
  3. Halacci: Yarda da yarda
  4. Sadarwar bayanan: Ba za a sanar da wasu bayanan ga wasu kamfanoni ba sai ta hanyar wajibcin doka.
  5. Ajiye bayanai: Bayanin yanar gizo wanda Occentus Networks (EU) suka dauki nauyi
  6. Hakkoki: A kowane lokaci zaka iyakance, dawo da share bayanan ka.

  1.   a0 m

    Ina tsammanin kun rikitar da abubuwa da yawa a kalla ni a gani na, don yin irin abin da kuka bayyana a sashi na farko kawai lokacin haɗawa zuwa uwar garken ssh muna ƙara saitin -X kuma bayan tabbatarwa kawai buga sunan aikace-aikacen zai buɗe ba tare da babu kuskure
    amfani

    ssh - X kzkggaara@192.168.151.209
    Firefox

    kuma da wannan zamu guji yin fitarwa ...

    1.    KZKG ^ Gaara <° Linux m

      Sannu da zuwa barka da zuwa shafin 😀
      Matsalar ita ce, abin da nake so shi ne in rubuta a cikin m «Firefox»(Don ba da misali), kuma wannan yana buɗewa a waccan PC ɗin, a, amma kuma an nuna shi a kan allonka / saka idanu, ma’ana, abin da nake gudu a cikin tashar da aka nuna wa ɗayan mai amfani da kwamfutar ta su sa shi ya fahimta ko kuma ya zama kamar cewa kwamfutar ta "haukace" 🙂

      Idan nayi ssh -X $ mai amfani @ $ ip sannan na rubuta «Firefox»A wannan tashar, aikace-aikacen (Firefox a wannan yanayin) zai buɗe mini akan abin sa ido / allon allo, kuma ba abin da za a nuna a kan saka idanu na waccan kwamfutar (wanda na haɗa ta nesa ta hanyar SSH).

      Akalla wannan shine abin da zan iya godiya da shi -XIdan na kuskure, da fatan za a bayyana shakkar.
      Gaisuwa da sake, barkanmu da zuwa shafinmu 😉

  2.   a0 m

    Daidai hakan yana faruwa idan abin da ya faru shine na fahimci cewa abin da aka nufa kenan, amma na ga ba kyau sosai, aƙalla hanya ce ta buɗe aikace-aikace a nesa, duk da cewa ba wasa bane 🙂 kuma godiya ga maraba a nan zamuyi tafiya.

    1.    KZKG ^ Gaara <° Linux m

      Wannan ita ce matsalar hehehehe, ba ya mini aiki don raha, amma aiki ne yake yi, saboda sarrafawa da ɗorawa ana ɗauka ta waccan PC ɗin da ke nesa, yayin da ake nuna aikace-aikacen a kan nuni na, kyakkyawar shawara 😉

      Gaisuwa kuma mun karanta juna anan 🙂

  3.   Da launin ruwan kasa m

    Idan na fahimci aikin sosai, yanzu yaya zan sami IP na inji 2 daga na'ura mai kwakwalwa na? Ze iya ?

    Ban san komai game da cibiyoyin sadarwa ba, abin kunya 🙁

    1.    KZKG ^ Gaara <° Linux m

      A cikin tashar sa: idanconfig
      A can zaka iya ganin cikakkun bayanai game da kowace hanyar sadarwa, watau idan kana da LAN (cibiyar sadarwa ta USB), ko Wifi, ko waninsu.

      Inda aka rubuta "inet", anan zaku iya sanin IP 😀
      Kuma kar ku damu, ba wanda aka haifa da sanin hahaha, duk muna koya yayin da muke tafiya.

      gaisuwa

  4.   rashin lafiya m

    Na gode!!! wannan shine ainihin abin da nake nema ...

  5.   david m

    Kuma idan ina so in yi shi daga yanar gizo ta amfani da php, sannan kuma nuna hoto daga yanar gizo, ba tare da amfani da rubutun da kuka kirkira ba, ma'ana a faɗi wani abu haka, ta yaya zan cimma shi ???
    $ image = »http://website.net/imagen.png»;
    $ sako = »dakatar da sauraron Enrique Iglesias»;
    exec ("fitarwa nuni =: 0.0 | sanar-aika $ sako -i $ hoto");

  6.   alexweb m

    hello shawara mai kyau!
    Game da ssh, yana aiki idan kun fitar da nuni.
    Aƙalla na samu hakan a kan na'urar wasan bidiyo.

    Gaisuwa.-

  7.   lida m

    Lokacin daidaita fayil ɗin sshd_config, ya zama dole a canza x11Forwarding don yin abin da kuke yi? wannan shine shakku na

  8.   Ricardo Luis Ordaz Villalobos m

    Barka dai, ina da tambaya, shin zai iya zama akasin haka? Misali, idan ina kan PC1 ba tare da Firefox ba, kuma budurwata tana kan PC2 tare da Firefox, shin zan iya kunna Firefox daga PC2 kuma in sanya tagar burauzar ta bayyana akan PC1 inda ba a sanya mai binciken ba?