Howto: Run Gimp in one window

September 5, 2006 at 7:30 pm | Posted in tips and tricks, xubuntu | 35 Comments

1) Go to the terminal (Xfce menu > System > Terminal), and install the needed programs:

sudo apt-get install xnest xfwm4 gimp

2) Run this command to try it out:

Xnest :1 -ac -name GIMP -geometry 1024x690 & xfwm4 --display :1 & gimp --display :1

Cool, huh? Here’s how to make it a shortcut:

1) Make a file called /usr/bin/gimp1window:

sudo touch /usr/bin/gimp1window
sudo mousepad /usr/bin/gimp1window

2) Paste the following into it:

#!/bin/sh
Xnest :1 -ac -name GIMP -geometry 1024x690 & xfwm4 --display :1 & gimp --display :1

3) Run sudo chmod +x /usr/bin/gimp1window, and change your shortcuts from gimp to gimp1window.

Have fun!

35 Comments »

RSS feed for comments on this post. TrackBack URI

  1. I really like this blog 🙂

  2. nice trick. Thanks!

  3. oh wow this is really cool, i love the way it integrates what i’d considered GIMPs messy UI
    however, two things, as my display is set to 1280×1024, i changed the line below to reflect this:
    Xnest :1 -ac -name GIMP -geometry 1268&1024 xfwm4 –display :1 & gimp –display :1

    also, the background of the X window which handles ‘gimp1window’ is very blurry, as if it had static on it. any idea why this might happen and a fix? it also happened at the stated 1280×1024

  4. Are you referring to the black & white background? I’m not sure; maybe messing with xsetbg would help.

  5. […] It was of today that I was the finder of this GIMP tip most useful! It tells how one can be a runner of the most famous GIMP image editor in only one window instead of the multiple windows it is normally a user of. This is a trick most ingenious, making ample use of that which is called the Xnest X server. My readers, I am of the know that many of you are most proud users of GIMP, and so I am of the thinking that this tip will be of the utmost utility to you! […]

  6. Great tip! I did this successfully but how do you change the shortcuts from applications-graphics-gimp to gimp1window. I can only seem to get the gimp1window shortcut under applications and it doesn’t seem to let me change the shortcuts under graphics……

  7. What you could do is:

    sudo dpkg-divert –divert /usr/bin/gimp1window –rename /usr/bin/gimp

  8. That didn’t work for me but I managed to get it on my graphics menu by installing Alarcarte. Then going to Applications – Accessories – Alacarte Menu Editor. Thanks for the help anyway and the tips on this site are excellent.

  9. […] Przeglądając forum Ubuntu-pl, trafiłem na ciekawego linka – Howto: Run Gimp in one window. Pomyślałem, że to fajna sprawa, spróbuję u siebie. Zakładając, że w systemie mamy Metacity oraz GIMPa, możemy przystąpić do zabawy (: […]

  10. I dont get it

    How do you do that?

  11. Where is Xfce menu > System > Terminal?

  12. sudo dpkg-divert –divert /usr/bin/gimp1window –rename /usr/bin/gimp

    this method does’t word…

    when I enter the above code it says below…………..

    dpkg-divert: –add needs a single argument

    Usage: dpkg-divert [ …]

    Commands:
    [–add] add a diversion.
    –remove remove the diversion.
    –list [] show file diversions.
    –truename return the diverted file.

    Options:
    –package name of the package whose copy of will not
    be diverted.
    –local all packages’ versions are diverted.
    –divert the name used by other packages’ versions.
    –rename actually move the file aside (or back).
    –admindir set the directory with the diversions file.
    –test don’t do anything, just demonstrate.
    –quiet quiet operation, minimal output.
    –help show this help message.
    –version show the version.

    When adding, default is –local and –divert .distrib.
    When removing, –package or –local and –divert must match if specified.
    Package preinst/postrm scripts should always specify –package and –divert.

  13. A Screenshot please!! :p

  14. Excellent tip! I’ve tried doing it and it worked fine until the test part. But when I tried changing the shortcuts to gimp1window it didn’t work and I get this error message:

    Opening ‘/home/user/-display’ failed: Unknown file type
    Opening ‘/home/user/:1’ failed: Unknown file type

    I hope someone can help me with this. Thanks! 🙂

  15. Solution for the background issue, using icewm-lite.

    First, create file in $HOME/.icewm/prefoverride, and put this:

    DesktopBackgroundColor=”#dddddd”

    where dddddd is your color. To set an image… read the documentation 😉

    Next, create an script where you want (mine’s in ~/.icewm/bgset.sh) with this:

    #!/bin/bash

    icewmbg-lite &
    sleep 5;
    exit;

    And chmod +x the file

    Next, modify the gimp1window script to open a gnome-terminal that executes bgset.sh:

    Xnest :1 -ac -name GIMP -geometry 1274×710 & gnome-terminal –geometry 0x0 –hide-menubar –display :1 -e “$HOME/.icewm/bgset.sh” & icewm-lite –display :1 & gimp –display :1

    It’s not a very “fancy” way, but I tried to autorun icewmbg with no results 😦

    Hope this helps 😉

    Regards.

    David

  16. That is SO COOL! Thank you, I can finally Love the gimp unreservedly!

  17. To get rid of the ugly background, you can start xfdesktop and (which comes extremly handy when having several windows open) the starter.

    sudo apt-get install xfdesktop4 xfce4-panel

    the command then goes like:

    Xnest :1 -ac -geometry 1270×745 & xfwm4 –display :1 & gimp –display :1 & xfdesktop –display :1 & xfce4-panel –display :1

    1270×745 is btw optimal for a 1280×800 screen!

  18. […] Howto: Run Gimp in one window […]

  19. ive got a few other options, to make the background of the window white, and to cause it to adopt your gnome theme, heres my command
    Xnest :1 -ac -wr -name GIMP -geometry 1440×852 & metacity –display :1 & gimp –display :1 & gnome-settings-daemon –display :1
    i have widescreen monitor so you may want to change 1440×852

  20. […] Howto: Run Gimp in one window « Xubuntu Blog (tags: gimp howto ubuntu) […]

  21. This doesn’t work well for me – the tool icons and menu are invisible. The tool icons become visible if I wave my mouse over them.
    Also when I minimize the panels they disappear completely.

  22. regarding the “blurry background”, you can start Xnest with the -br option to use a black background instead of the default stippled black and white background.

  23. I’m running FC6 and don’t have apt-get. But I do have yum. I managed to get xfwm4 and gimp installed by doing

    # yum install xnest xfwm4 gimp

    For some reason that didn’t install xnest, though. I used the ‘add/remove software’ tool and did a search for xnest. Among the results it returned was ‘xorg-x11-server-xnest-1.1.1-47.10.fc6.i386’. Once I installed that I was, largely, able to follow the rest of these instructions.

    I was briefly tripped up by conflicting diplays (if you haven’t figured it out by now, I am a linux noob). When I tried to run the command in step 2 I got the error:

    Fatal server error:
    Cannot establish any listening sockets - Make sure an X server isn't already running

    When I changed all the ‘:1’ references to ‘:2’ it worked fine. Thanks for the great tip.

  24. Ejecutar Gimp en una sola ventana

    Aunque este tema no es muy nuevo, me ha venido al pelo para no tener que andar con 4 ventanitas sueltas en escritorio cada vez que uso Gimp. El resultado es algo

  25. Ejecutar Gimp en una sola ventana

    Aunque este tema no es muy nuevo, me ha venido al pelo para no tener que andar con 4 ventanitas sueltas en escritorio cada vez que uso Gimp. El resultado es algo como esto:

    No es muy atractivo, pero sí muy útil. Bueno, los pasos a seguir:
    Antes que…

  26. […] udalo sie ustawic kolor tla malym […]

  27. […] tutaj znalazłem rozwiązanie dla Gnome / XFCE (Metacity WM); trackback, RSS komentarzy wykop, digg. del.icio.us, technorati […]

  28. […] Enlaces | Forums debian | Xubuntu blog […]

  29. in the program when I put the main window, layers, colors, etc on the tray with the small button in the layers top-right corner, I couldn’t get them back at all, and after the next start it didn’t show up either. so now, when I open it with the command, just the black&white background is there, nothing else.
    what can I do? pls mail me. thanks

  30. […] the Xubuntu Blog I found the solution. It involves running the X server Xnest in a window and then run Gimp on that […]

  31. Hmmm I’m debating whether to try this out. I’m interested in what the modified layout looks like. Any screenshots?

  32. this is very interesting article. many knowledge to new user.

  33. Thx for information.

  34. It is the best time to make a few plans for thhe long run and it’s time to be happy.
    I have read this put up and if I may just I want to suggest you few interesting things or suggestions.

    Perhaps you can write subsequent articles relating to this
    article. I wish to learn even more things approximately
    it!


Leave a comment

Blog at WordPress.com.
Entries and comments feeds.