gimp_logoI just made a code wallpaper in GIMP ! Although i am not an expert in GIMP i am trying to write up how i made it. This is a guide on how to make a geeky code wallpaper showing a screenful of code with your name highlighted. The screenfull of text in this guide is the ASCII characters of a statically linked ELF binary file, who’s bottom section has a screenfull of text. You could modify with your favorite code or even other texts, like your name peeking out of a randomly generated screenfull of string. Continue reading, and check out the guide.

The Guide

  1. Write a c program and save it with pic.c
    #include <stdio.h>
    int main(void)
      return 0;

    compile it with:

    gcc pic.c -o pic -static

    compiling with static tag will pack all the symbols into the executable.

  2. Now execute the below, which will dump the executable by replacing the non printable characters into another file ‘picedit’ .
    cat -v pic > picedit

    Open the picedit file with vim (execute vim picedit) or with kwrite (or any text editor). Make sure the text editor should have word wrap on and also the window size of the text editor should be full screen.

    Scroll to the bottom of the screen by pressing Shift + G in vim and by pressing Ctrl + END in kwrite. At this point there should be a screen fully packed with text, if not then scroll a couple of lines to make the window full of characters.

    Now switch to insert mode in the text editor by pressing INSERT. Now write your name or any particular text any where in the screen full of text. Save the file and close the window.

    Tip: Type your name such that they are surrounded by non-alphabet punctuations and special character, it will be easier to read

    Insert Text
    Insert Text

    Now again go to the open terminal make it full screen by pressing Ctrl + Shift + F11 (or other), and dump the saved ‘picedit’ file with cat.

    cat picedit
  3. Now you can see the last portion of the edited file where you made the changes. Make the konsole to fullscreen by pressing Ctrl + Shift + F11 , and also remove the menu bars (by unchecking the show menu bar checkbox in konsole), scroll a couple of lines up if needed. and press PRTSCR button that is the print screen button on the keyboard, and save the screenshot with the name ‘mywall’. Keep note that you get the maximum screen area full of text.
  4. Open ‘mywall’ with gimp, and do the following:Crop the image so that only the console text are visible and the window menubars, scroll bars are eliminated.

    Crop picture and keep only needed area
    Crop picture and keep only needed area
  5. Convert the background color of the console in the picture to alpha:
    Colors -> Colorify To Alpha

    Select ‘From’ and then background colour of the console with the colour picker tool, and click OK. (Background color of my console was #3f3f3f)

    Colorify To Alpha and separate background and text
    Colorify To Alpha and separate background and text

    The text layer after applying colorify to alpha
    The text layer after applying colorify to alpha
  6. Now create a new layer and flood fill it with the same background colour of the terminal, and send the layer to bottom. You can see the same picture but now the background and foreground text are separated.

    Separated text and background layers
    Separated text and background layers
  7. Select the text layer. Find out the texts you edited and want to highlight and select them using the Rectangle Select Tool. Make sure the selection be precise and no other text is inside the selection. After selecting the text you want to highlight do:
    Colors -> Colorify

    and simply select your favourite highlight colour.

    Select the text to highlight and colorify selection
    Select the text to highlight and colorify selection

    After colorifying the selection
    After colorifying the selection
  8. Now merge down the two layers. To do this, go to layer window, right click on the separated text layer and click on “Merge Down” .
    Layers -> Merge Down
  9. Because we cropped the image, so the image will not have the proper resolution, and you would need to stretch to fit it in the screen. To solve this resize the picture with gimp to 1280×1024 (which is my monitor resolution).
    Image -> Scale Image
  10. Optionally Sharpen the image a bit so the text looks crisp and clear. (with value 10 or some )
    Filter -> Enhance -> Sharpen {Sharpness=10}
  11. This is an optional step, if you like the softglow effect then you can apply it. You can apply some softglow to the merged layer with the values which would get a good look.
    Filters -> Artistic -> Softglow {Glow Radius=13.00, Brightness=1.0, Sharpness=1.0}

    After Applying Softglow
    After Applying Softglow
  12. Save the image in gif or png format. (Saving in jpg format would need a 100% quallity to show the picture properly, and the size would also be bigger than gif)

Final Look

Code Wallpaper with Softglow
Code Wallpaper With Softglow
Code Wallpaper Without Softglow
Code Wallpaper Without Softglow

6 thoughts on “Geeky Code Wallpaper with GIMP

  1. i need install other program?
    gcc pic.c -o pic -static

    pic.c:1:10: error: #include expects “FILENAME” or
    pic.c: In function ‘main’:
    pic.c:4:3: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
    pic.c:4:11: error: ‘quot’ undeclared (first use in this function)
    pic.c:4:11: note: each undeclared identifier is reported only once for each function it appears in
    pic.c:4:15: error: expected ‘)’ before ‘;’ token
    pic.c:4:15: error: stray ‘\’ in program

    not create pic

    sorry my bad english

    1. Actually you need to compile the code above. If you have never compiled a code then it is a problem. You can actually open any binary program, ie executable program and follow the steps. The code i posted has somehow changed and the #include line has become incorrect as the stdio.h is not included. The first line should be #include <stdio.h> . I have fixed post. Now try to compile as told in the code. Save the file with some name, and pass the name to the given command (ie. compile the code), and follow the steps.

      I suggest instead of copying directly from the webpage, you see and type, as some html codes have appeared in the webpage (like the quot for the double quotes). Although i have fixed the problem in the page, it can change (as this problem occurrs in other pages too).

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s