Monitor Resolution

  By default the OS will attempt to pick the most suitable resolution for a connected HDMI monitor. You can also select a setting yourself Viewing Resolutions Supported By Your Monitor tvservice -d edid edidparser edid Editing The Config File sudo nano /boot/config.txt If hdmi_mode and hdmi_group are commented out (# character at the start […]

Read More

Keypresses

  Detecting Key Presses #include <gtk/gtk.h> #include <gdk/gdkkeysyms.h> Setup the callback //Get keypresses g_signal_connect (G_OBJECT(MainWindow), "key_press_event", G_CALLBACK (on_key_press), NULL); Create A Function To Be Called //****************************** //****************************** //********** KEYPRESS ********** //****************************** //****************************** gboolean on_key_press (GtkWidget *widget, GdkEventKey *event, gpointer user_data) { if (event->state & GDK_SHIFT_MASK) { printf("SHIFT pressed\n"); } else if (event->state & GDK_CONTROL_MASK) { printf("CTRL […]

Read More

.Timers General

Implementing A Timer To Callback From gtk_main() #include <gtk/gtk.h> #include <time.h> Create the timer g_timeout_add(1000, (GSourceFunc) timer_event, (gpointer) MainWindow); //Register the timer and set time in mS. The timer_event() function is called repeatedly until it returns FALSE. gtk_widget_show_all(MainWindow); timer_event(MainWindow); //Call the timer function now if you don't want to wait for the first time period […]

Read More

.Creating A GTK Applicaiton

  Header FIles #include <gtk/gtk.h> In The Main Function GTK replaces the normal main loop to make your application become event driven. This is an example of a basic main function, but you add to this all of the widgets etc your application needs before finally calling gtk_main(), which takes over running the application from […]

Read More

SMB-Network File Sharing

The following instructions will set your RPi to share its files on your local network and be accessible by Windows. This is based on the great guide here. Install Samba sudo apt-get install samba samba-common-bin Samba contains the SMB protocol, support for the Windows naming service (WINS), and support for joining Windows workgroups. Samba-common-bin contains a tool […]

Read More

ZIP

Install ZIP sudo apt-get install zip unzip To ZIP A Directory zip zipfile_name /path/to/directory/      

Read More

Installing Eclipse on QEMU Emulated Raspberry Pi – Linux

Whilst you can technically run eclipse on the Raspberry Pi, in reality it doesn't have the power to make it usable.  This guide is based on virtualizing Raspbian using QEMU ​Sorry – but qemu is not the magic solution it seems it should be even running on Linux rather than windows.  After doing all this you will have raspbian and eclipse running on […]

Read More

Windows Remote Desktop

XRDP can be used to allow a remote desktop connection from a windows PC.Display Resolution Install XRDP from the RPi command line   sudo apt-get install xrdp Then to use it press the windows start button > All programs > Accessories > Remote desktop connection.  Enter your IP address and then the standard RPi login when prompted and […]

Read More

Shutdown

This is the best method sudo shutdown -h now This is an alternative (halt and shutdown are not the same thing so a halt command may not cause a complete power off shutdown, it depends on the system): sudo halt  

Read More

Installing Eclipse on QEMU Emulated Raspberry Pi – Windows

Whilst you can technically run eclipse on the Raspberry Pi, in reality it doesn't have the power to make it usable.  This guide is based on virtualising Raspbian using QEMU QEMU QEMU is an emulator for various CPUs. It works on Linux, Windows, FreeBSD and Mac OS X. The Windows version is in an alpha […]

Read More