How to sort file from one position to another in Nano Text editor

am very new to ubuntu, i was using windows now am using ubuntu server. i have web application i need to set up and some of the instruction instruct me to open DIRECT.CONFIG file in nano text editor, i was able to open the file and when i open the file it opens with this file ordering

directoryindex index.html index.cgi index.pl index.php index.xhtml index.htm

now i want to move the index.php file above to the first position after the Directoryindex, so just after DIRECTORYINDEX it must be followed by index.php like this:

directoryindex index.php index.html index.cgi index.pl index.xhtml index.htm

what should i do if its shortcuts or whatever because in below of NANO editor i just see the shortcuts for replace, justify, cut etc. any help will be appreciated.

Teamviewer on Jetson nano: CheckCPU: unknown architecture aarch64

I’ve installed teamviewer on Jetson nano following this instruction. It fails in two ways:

  • if I launch it from command line, i get following output:
  Init...   Error: CheckCPU: unknown architecture 'aarch64' 
  • if I connect to it after setting password through command line, it allows to enter login remotely, but after entering password it immediately disconnects.

I tried changing WaylandEnable /etc/gdm3/custom.conf, but it doesn’t help. What else can I try?

How to send packets at 512 nano sec delay using Socket Programming and UDP socket

Using SOCK_DGRAM for UDP sockets

All packets are 22 bytes in length (ie 64 including headers)

client.c

...     no_of_packets--;     sprintf(buf, "#:!0 rem");     sprintf(buf, format , buf);     sprintf(buf_aux, "#: 0 rem");     sprintf(buf_aux, format , buf_aux);     buf[MAX_LINE-1] = '';     buf_aux[MAX_LINE-1] = '';     len = strlen(buf) + 1;     send(s, buf, len, 0);     while (no_of_packets-- > 1) {         nanosleep(&T, NULL);         send(s, buf, len, 0);     }     send(s, buf_aux, len, 0); 

server.c

... while(1) {         if (len = recv(s, buf, sizeof(buf), 0)){             // do nothing         } }  

When I open Wireshark to see avg delay between the packets which are sent,

I can see the following:

  • MIN delay: 0.000 006 795 sec => 6 micro sec

  • MAX delay: 0.000 260 952 sec => 260 micro sec

  • But I want to send packets every 512 nano sec (ie., 0.512 micro sec).

How can I achieve this speed?

Ubuntu Core 18 – nano editor permission denied for /etc/netplan/config.yaml

Using ubuntu core trying to edit netplan config in /etc/netplan/00-snapd-config.yaml

This command sudo nano /etc/netplan/00-snapd-config.yaml

Outputs [ Error reading /etc/netplan/00-snapd-config.yaml: Permission denied ]

nano was installed with sudo snap install nano Is there a way to edit /etc configuration files with a snap store text editor?

Mint for Jetson Nano [on hold]

Sorry if a stupid question, but I would like to ask if I install some other distribution (like Linux Mint – which is a Ubuntu 18 in core) to Jetson Nano will I be able to access stuffs like Nano’s temperature

 cat /sys/devices/virtual/thermal/thermal_zone*/temp 

or do a deep learing with GPU and CUDA? Or access a pwm fan connected to board etc? Or are this a special configurations just for Nano’s OS(that strange Nvidia’s green Ubuntu)?

Problema con libreria HX711 y millis() en arduino nano

Tengo un problemilla con el uso de millis() en la librería HX711. Tengo una celda de carga conectada a un arduino nano y me es imposible hacer una espera con millis(). Lo que estoy intentando es que la celda de carga al detectar un peso en concreto (que tengo previamente definido) haga una espera de dos segundos y tras ese periodo, si ese peso no ha cambiado ejecute una serie de sentencias… Adjunto el código a continuación a ver si alguien me puede echar una mano. El código funciona bien pero en cuanto intento usar la función millis() para efectuar la espera de comprobación deja de funcionar. A lo mejor hay algún tipo de incompatibilidad con la librería HX711 y millis(). He buscado información pero no encuentro nada al respecto. Algo estoy haciendo mal eso seguro. Espero que podáis arrojarme algo de luz al respecto y encontrar el camino por donde tirar… ¡¡¡Gracias de antemano!!!

#include "HX711.h" #define DOUT  A1 #define CLK  A0 #include "SoftwareSerial.h" #include "DFRobotDFPlayerMini.h" HX711 balanza(DOUT, CLK); SoftwareSerial mySoftwareSerial(10, 11); // RX, TX  DFRobotDFPlayerMini myDFPlayer;              //Modulo de reproduccion de mp3 void printDetail(uint8_t type, int value);  int const ReleApert = 12;  //Pin del rele que comanda el electroiman int const Leds = 3;        //Tira de leds para crear el efecto llama int const ReleHumo = 13;   //Pin del rele que comanda la maquina de humo   bool PesoCorrecto = 0;    //Variable de comprobacion de peso correcto en celda de carga bool CorrectoEspera = 0; int EstadoResuelto = 0;  float MargenSup = 124500.00; //Margen superior para comprobacion de peso correcto float MargenInf = 122000.00; //Margen inferior para comprobacion de peso correcto  int val=0;                //Variable que almacena los numeros random para crear el efecto llama en los leds int delayval = 0;         //Variable que almacena el delay random para crear el efecto llama en los leds int efectoFuego = 0;      //Variable de comprobacion para activar el efecto llama de los leds int volumen = 20;          //Variable de comprobacion para poder bajar el volumen del modulo dfplayer  int espera = 2000;                //Espera para comprobar si el peso es correcto transcurrido el tiempo indicado unsigned long tiempoActual = 0;   //Variable para almacenar cuando sea necesario el tiempo de millis  void setup() {    mySoftwareSerial.begin(9600);   Serial.begin(9600);   randomSeed(0);   pinMode(ReleApert, OUTPUT);   pinMode(Leds, OUTPUT);   pinMode(ReleHumo, OUTPUT);   //pinMode(ComandoApertura, INPUT);    Serial.println();   Serial.println(F("DFRobot DFPlayer Mini Demo"));   Serial.println(F("Initializing DFPlayer ... (May take 3~5 seconds)"));  if (!myDFPlayer.begin(mySoftwareSerial, false)) {  //Use softwareSerial to communicate with mp3.     Serial.println(F("Unable to begin:"));     Serial.println(F("1.Please recheck the connection!"));     Serial.println(F("2.Please insert the SD card!"));     while(true);   }   Serial.println(F("DFPlayer Mini online."));   myDFPlayer.volume(20);  //Set volume value. From 0 to 30   delay(1000);    Serial.print("Lectura del valor del ADC:  ");   Serial.println(balanza.read());   Serial.println("No ponga ningun  objeto sobre la balanza");   Serial.println("Destarando...");   Serial.println("...");   balanza.set_scale(); //Establecemos la escala   balanza.tare(20);  //El peso actual es considerado Tara. No es necesario que saque el peso real...   Serial.println("Listo para pesar");  }  void loop() {  float Peso;                    //Variable para poder ver por puerto serie el valor que devuelve la celda de carga Peso = (balanza.read()); Serial.println(Peso);   if(Peso > MargenInf && Peso < MargenSup)  //Si el valor de la celda de carga se encuentra entre el margen superior e inferior...   {    PesoCorrecto = 1;                      //establecemos la Variable que indica que el peso es correcto en 1    tiempoActual = millis();               //establecemos esta variable con el tiempo en este momento(momento en el que el peso es correcto)    }   else{         PesoCorrecto = 0;        }  if(PesoCorrecto == 1)                        {     if(millis() >= tiempoActual+espera)  //Comprobamos si el peso es correcto durante 2 segundos       {         EstadoResuelto = 1;              //Y si tras dos segundos sigue siendo correcto cambiamos esta variable a 1       }else{             EstadoResuelto = 0;              }   }     if(EstadoResuelto == 1)              //Comprobamos el estado de la variable para activar reles, efectos de humo, y sonido   {         digitalWrite(ReleApert, HIGH);         digitalWrite(ReleHumo, HIGH);    myDFPlayer.play(1);              while(efectoFuego < 200)           //Efecto de llamas       {        val = random(10,255);        analogWrite(Leds, val);          delayval= random(50,100);        delay(delayval);         efectoFuego ++;               }    digitalWrite(ReleHumo, LOW);        while(volumen >= 20)               //Bajar volumen del sonido       {        myDFPlayer.volume(volumen);        delay(100);        volumen --;       }              myDFPlayer.stop();              digitalWrite(ReleApert, LOW);          }  } 

Installed Ubuntu 18.04.2 LTS on Jetson Nano trying to install Atom

I am trying to install Atom editor on to Jetson nano and as far as I could determine. I selected the commands from link below to install atom. Being that I am not an expert I am wondering how to correct the unmet dependencies pasted below.

https://linuxize.com/post/how-to-install-atom-text-editor-on-ubuntu-18-04/

The issue is the following:

The following packages have unmet dependencies: atom:i386 : Depends: libgtk2.0-0:i386 but it is not installable Depends: libudev0:i386 but it is not installable or libudev1:i386 but it is not installable Depends: libgcrypt11:i386 but it is not installable or libgcrypt20:i386 but it is not installable Depends: libnotify4:i386 but it is not installable Depends: libxtst6:i386 but it is not installable Depends: libnss3:i386 but it is not installable Depends: python:i386 but it is not installable Depends: libdbus-1-3:i386 but it is not installable Depends: libcap2:i386 but it is not installable Depends: libxkbfile1:i386 but it is not installable Depends: libx11-6:i386 but it is not installable Depends: libasound2:i386 but it is not installable Depends: libsecret-1-0:i386 but it is not installable Depends: gir1.2-secret-1:i386 but it is not installable E: Unable to correct problems, you have held broken packages.

ASUS USB wifi driver in Linux – AC53 nano – EW-7811Un – Realtek RTL8188CUS

I have an ASUS AC53 Nano wifi receiver that I’m trying to get working on Solus Linux. Here’s some basic info:

$ lsusb

Bus 001 Device 004: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]

$ uname -r

5.0.7-114.current

I’m following the directions found here as they were said to be working for this person here and it’s the best lead I’ve had so far. But I’m wondering if they were on an older kernel than I am. I have added the line:

{USB_DEVICE(0x0B05, 0x184C), .driver_info = RTL8822B}, /* ASUS USB AC53 */

to the os_dep/linux/usb_intf.c file as per the instructions and attempted to run make. Here is the output:

$ make make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.0.7-114.current/build M=/home/morgan/rtl8822bu modules make[1]: Entering directory '/usr/src/linux-headers-5.0.7-114.current' CC [M] /home/morgan/rtl8822bu/os_dep/linux/os_intfs.o In file included from /home/morgan/rtl8822bu/include/drv_types.h:35, from /home/morgan/rtl8822bu/os_dep/linux/os_intfs.c:22: /home/morgan/rtl8822bu/include/wifi.h:1005: warning: "IEEE80211_MAX_AMPDU_BUF" redefined #define IEEE80211_MAX_AMPDU_BUF 0x40 In file included from /home/morgan/rtl8822bu/include/osdep_service_linux.h:84, from /home/morgan/rtl8822bu/include/osdep_service.h:41, from /home/morgan/rtl8822bu/include/drv_types.h:32, from /home/morgan/rtl8822bu/os_dep/linux/os_intfs.c:22: ./include/linux/ieee80211.h:1444: note: this is the location of the previous definition #define IEEE80211_MAX_AMPDU_BUF 0x100

/home/morgan/rtl8822bu/os_dep/linux/os_intfs.c:1170:22: error: initialization of ‘u16 (*)(struct net_device *, struct sk_buff *, struct net_device *, u16 (*)(struct net_device *, struct sk_buff *, struct net_device *))’ {aka ‘short unsigned int (*)(struct net_device *, struct sk_buff *, struct net_device *, short unsigned int (*)(struct net_device *, struct sk_buff *, struct net_device *))’} from incompatible pointer type ‘u16 (*)(struct net_device *, struct sk_buff *, void *, u16 (*)(struct net_device *, struct sk_buff *, struct net_device *))’ {aka ‘short unsigned int (*)(struct net_device *, struct sk_buff *, void *, short unsigned int (*)(struct net_device *, struct sk_buff *, struct net_device *))’} [-Werror=incompatible-pointer-types] .ndo_select_queue = rtw_select_queue, ^~~~~~~~~~~~~~~~ /home/morgan/rtl8822bu/os_dep/linux/os_intfs.c:1170:22: note: (near initialization for ‘rtw_netdev_ops.ndo_select_queue’) cc1: some warnings being treated as errors make[2]: *** [scripts/Makefile.build:277: /home/morgan/rtl8822bu/os_dep/linux/os_intfs.o] Error 1 make[1]: *** [Makefile:1576: _module_/home/morgan/rtl8822bu] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-5.0.7-114.current' make: *** [Makefile:1318: modules] Error 2

I really don’t know what to “make” of it (lol)! Is there anyone that can help me out? Many thanks in advance!