Friday, March 27, 2015

Packeth Patch to display All interfaces ( Down and Non IP Assigned)

Src/callbacks.c
static GtkWidget *file_menu = NULL;
@@ -2167,6 +2167,11 @@ on_Interface_button_clicked
        struct ifreq        IfcBuf[512];
        struct ifreq        *pIfr;
        int num_ifreq;
+
+       struct if_nameindex *pif;
+       struct if_nameindex *head;
+       head = pif = if_nameindex();
+
        int i, fd, length;
        char buff[100];
        char *ptr;
@@ -2201,6 +2206,16 @@ on_Interface_button_clicked
        ptr = buff;
+       while (pif->if_index) {
+                       snprintf(ptr, 100, "%s", pif->if_name);
+                        glist = g_list_append(glist, ptr);
+                        ptr = ptr + strlen(pif->if_name) + 1;
+                        length = length + strlen(pif->if_name) + 1;
+                       pif++;
+
+       }
+       /*
+
        for ( pIfr = Ifc.ifc_req, i = 0, length = 0 ; i < num_ifreq; pIfr++, i++ ) {
                if ( (length + strlen(pIfr->ifr_name) + 1) < 100) {
                        snprintf(ptr, 100, "%s", pIfr->ifr_name);
@@ -2211,7 +2226,8 @@ on_Interface_button_clicked
                else
                        break;
        }
-
+       */
+       if_freenameindex(head);
        gtk_combo_set_popdown_strings(GTK_COMBO(combo), glist) ;
        gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo)->entry), iftext);

Monday, March 23, 2015

X11 on Non X11 Server remotely ( MobaXterm)

I had a server running that was not running a X-server , so i couldn't run any Graphical application

also i didn't had root access to do so , So i downloaded ( MobaXterm ) on windows, which has embedded X-server ( not X-client)

and u can run Graphical on Windows via SSH. Also supports SFTP so if you edit any file its save on the

server.

 

image

 

Just You have to set DISPLAY on remote machine as

exporrt DISPLAY=IP_OF_WINDOWSPC>:0.0

Also has Cygwin, where u can install packages through apt-get install <package>

Check some of the exiting features.

http://mobaxterm.mobatek.net/features.html

Wednesday, March 4, 2015

Cheap USB Remote control for PC and RaspberryPI

I purchased a USB remote control from Ebay , Costing Just rs 340

http://www.ebay.in/itm/New-PC-Remote-Controller-With-USB-Receiver-for-Windows-Laptops-/121450953360?ssPageName=ADME:L:OC:IN:3160

clip_image002

Just connect the Reciever to Laptop or Rasperry Pi. For windows 7 it creates two device entry

1.HID generic mouse

2.HID genric Keyboard

Now if remote u can use it as mouse+ keyboard, increase decrease volume..etc

 

Raspberry Pi with XBMC OS

No configuration required , Just Plug and Play. These remotes are recognized as a keyboard/mouse device. Just ensure that “Remote control sends keyboard presses” is enabled under “Input Devices”.

clip_image004

Raspberry Pi Remote Control Settings

Featured Post

XDP - Getting Started with XDP (Linux)