Page 1 of 17 12311 ... LastLast
Results 1 to 10 of 164

Thread: HOWTO: True or Pseudo-Transparent Borderless Pop-up Terminals

  1. #1
    Join Date
    Mar 2005
    Beans
    6,040

    HOWTO: True or Pseudo-Transparent Borderless Pop-up Terminals

    Last Updated: 08.12.2005

    Transparent terminals are not just sexy eye candy; they also make a lot of sense in terms of GUI usability. Having terminal text appear as if it were on your desktop, or as a transparent pop-up layer that shows other windows beneath it that can be stashed away and recalled with a single click is very handy in daily Gnome usage, where we need the terminal often, but we also want it to blend nicely into the graphical environment, and not take up any desktop space when not needed.

    I had already written a howto on getting pseudo-transparent terminals for Hoary, so the first part of this guide will be essentially identical to that. The second part, however, is for getting true transparency, where you will actually see other windows beneath the terminal, and not just a replication of your underlying desktop as is the case with pseudo-transparency. This requires that you correctly set up the composite extension for X. poofyhairguy has written a detailed guide on setting it up, which I will also partially quote here in the second section.

    Pseudo-Transparent Terminals with Alltray + gnome-terminal

    Pseudo-transparency only replicates the part of the desktop that's directly underneath your window; as a result, if there's another window in between, it's ignored, and a true sense of depth is not attainable. However, by reserving a space for your window on your workspace, and having no desktop icons in that space, you can put pseudo-transparency to good use. Since our terminal will be a pop-up one that won't take permanent space, this is quite possible. Here's a screenshot:



    1. Download Alltray. An Ubuntu deb package is available here. See the bottom of this post for an AMD64 build.

    2. Install the package with dpkg
    Code:
    sudo dpkg -i /path/to/file/alltray.ubuntu_0.60-1_i386.deb
    3. Set up a new profile in gnome-terminal by hitting Edit / Profiles / New. I'll name it "tterm" here, you can name it whatever you like, but keep in mind that I'll refer to it as "tterm" in all commands in this howto. Edit the profile with the following options: uncheck the "Show menubar by default in new terminals" option in the "General" tab, in the "Effects" tab choose "Transparent Background" and set transparency level as you like, and in the "Scrolling" tab disable the scrollbar.

    4. Now we'll determine the exact coordinates where your terminal will appear. To do this, launch gnome-terminal with your newly created profile, drag it to where you want it to stay, and type
    Code:
    xwininfo
    The mouse pointer will turn into a crosshair. Click the terminal window, and note first the value that appears in the "Corners:" line.

    5. Create a launcher with one of the following commands and place it on your desktop or on a menu, or if you want your terminal to be launched on Gnome startup, go to System / Preferences / Session / Startup Programs, click the add button and enter this command there and set the order to something higher than 49.

    If you want your terminal to appear in all workspaces, use the following command.
    Code:
    alltray -x -st -g [geometry]"gnome-terminal --window-with-profile=tterm"
    If you want it to appear fixed in a single workspace, exclude the -st option and use the following command. I recommend this mode, since it allows the terminal to stay anchored in one workspace, and yet you can still call it to your present workspace with a single click on the notification area icon. For short operations you can call it to your present workspace, and if you'll be working with the terminal longer, you can switch to a separate workspace that you've reserved for the terminal. Plus, the terminal will stick to as many workspaces as you want; just pop it up and leave the workspace and it stays there; do the same in another workspace and it stays there too. Once you adopt it, this can become an efficient working habit that will definitely boost usability.
    Code:
    alltray -x -g [geometry]"gnome-terminal --window-with-profile=tterm"
    Replace [geometry] with the value you found via xwininfo in the last step, excluding the brackets. If you want the terminal to be shown on startup instead of being hidden, add the -s parameter.

    6. Add a notification area to your Gnome panel if you don't have one. Now click your launcher or start your Gnome session if you added the command the startup, and you should see the gnome-terminal icon in the notification area. Click it and the terminal will pop up. Click it again, or hit the minimize button and it will be stashed.

    That's it. Now on to the more sophisticated true transparent terminal.

    True Transparent Terminals with Alltray + gnome-terminal + Composite + transset-df

    The only way to have true transparency in the X window system as of today is the Composite extension written by Keith Packard. It's in the standard x.org R6 distribution but since it's still experimental and buggy, it isn't enabled by default. As I've stated at the beginning, you can refer to this howto for detailed info on how to set it up to your liking, but for our purposes, simple client-side compositing with xcompmgr's -n option will be enough. However, if you want to run the extension with all its bells and whistles, without a noticeable performance hit, you'll need a recent NVIDIA card and a fast computer. ATI do not support compositing in their drivers at present, so expect inferior performance with most ATI cards.

    Here's a screenshot:



    1. Download Alltray. An Ubuntu deb package is available here. See the bottom of this post for an AMD64 build.

    2. Install the package with dpkg
    Code:
    sudo dpkg -i /path/to/file/alltray.ubuntu_0.60-1_i386.deb
    3. Download and install the X composite manager and the packages required for compiling transset-df, which is a modified version of the transset tool by Daniel Forchheimer for adjusting window transparency "the bash way" with parameters instead of clicking with the pointer as is the case with transset. Since you'll be compiling from source, make sure you have gcc, make etc. installed. The best way of making sure of this is installing the build-essential package, which will install all basic tools you'll need for compilation.
    Code:
    sudo apt-get install xcompmgr libxcomposite1 libxcomposite-dev libxfixes3 libxfixes-dev libxdamage1 libxdamage-dev libxrender1 libxrender-dev
    4. Download and compile transset-df.
    Code:
    wget http://forchheimer.se/transset-df/transset-df-4.tar.gz
    tar zxf transset-df-4.tar.gz
    cd transset-df-4/
    make
    sudo make install
    Tip: You can use checkinstall to add any compiled package into the apt database so that you can see it in Synaptic and perform all apt commands on it. To use it, install it with "sudo apt-get install checkinstall", and replace the last step of the compilation process with "sudo checkinstall".

    5. Modify your xorg.conf file to enable compositing. Add the following lines after the "Modules" section in /etc/X11/xorg.conf
    Code:
    Section "Extensions"
            Option  "Composite" "Enable"
    EndSection
    Add the following to the "Device" section
    Code:
            Option          "RenderAccel"           "true"
            Option          "AllowGLXWithComposite" "true"
    6. Add xcompmgr to your Gnome session startup in System / Preferences / Session / Startup Programs. "xcompmgr -n" should do the trick, but if you want more eye candy type "man xcompmgr" for more info on the other parameters. An order of 40 works best for me; if it doesn't, try 0. Again, refer to poofyhairguy's guide if you have any trouble. Now restart X with Ctrl+Alt+Backspace. If it works, go ahead. If something goes wrong and you lose the ability to start x, boot into recovery console and reverse the changes you made.

    7. Set up a new profile in gnome-terminal by hitting Edit / Profiles / New. I'll name it "tterm" here, you can name it whatever you like, but keep in mind that I'll keep referring to it as "tterm". Edit the profile with the following options: uncheck the "Show menubar by default in new terminals" option in the "General" tab, set "Dynamically-set title" to "Isn't displayed" in the "Title and Command" tab, and in the "Scrolling" tab disable the scrollbar.

    8. Now we'll determine the exact coordinates where your terminal will appear. To do this, launch gnome-terminal with your newly created profile, drag it to where you want it to stay, and type
    Code:
    xwininfo
    The mouse pointer will turn into a crosshair. Click the terminal window, and note first the value that appears in the "Corners:" line.

    9. Launch gedit and paste one of the following scripts into a blank document.
    Code:
    #!/bin/bash
    alltray -x -st -g [geometry] "gnome-terminal --window-with-profile=tterm" & sleep 1
    transset-df -n "tterm (AllTray)"  [opacity]
    This will launch your terminal regardless of whether xcompmgr is running. If it's not running at the time you fire up the terminal, you'll get a pseudo-transparent one. If you want it to be launched only if xcompmgr is running, use the code below instead.
    Code:
    #!/bin/bash
    a=`ps -aef | grep -i xcompmgr | awk ' {if ($8 == "xcompmgr"){printf "2"}} '`
    if  [[ $a = "" ]]
    then
        exit
    else
    #!/bin/bash
    alltray -x -st -g [geometry] "gnome-terminal --window-with-profile=tterm" & sleep 1
    transset-df -n "tterm (AllTray)"  [opacity]   
    
    fi
    You have the option of making your terminal appear in all workspaces, or stay anchored in one workspace and pop up to your present workspace when you click on the icon. If you want it in all workspaces, use the scripts above as they are. For the latter option, remove the -st parameter. Refer to step 5 of the first part of the guide for more info.

    Replace [geometry] with the first "Corners:" value you got with xwininfo, and [opacity] with the level of opacity you want on a decimal scale from 0 to 1, excluding the brackets (Note: if for example 0.7 doesn't work, try 0.70; this seems to be a transset-df bug). Save the script with a .sh extension, and make it executable with "chmod +x".

    If you want the terminal to be shown on startup instead of being hidden, add the -s parameter.

    10. Make sure you have a notification area on your Gnome panel. Create a launcher that points to the script or add it to your Gnome session startup in System / Preferences / Session / Startup Programs with an order value higher than 49. Click the launcher or start Gnome, and enjoy.

    Troubleshooting

    I'll update this part with solutions to problems people seem to be having with the above methods.

    - In the second method, if the terminal occasionally pops up in the wrong position or does not have true transparency, try setting a value of 2 or 3 after the "sleep" command in the scripts in step 9.

    - fabs0028 pointed to me that there's no official AMD64 build of Alltray, so here's their build of it, made with checkinstall:

    Link 1 | Link 2

    - If you're having problems with Alltray 0.60, try 0.62, for which there's an autopackage on the download page.
    Last edited by 23meg; January 24th, 2006 at 04:18 AM.
    Previously known as 23meg

  2. #2
    Join Date
    Jun 2005
    Location
    France
    Beans
    7,100
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: True or Pseudo-Transparent Borderless Pop-up Terminals

    Transset-df is awesome !

    Thanks 23meg for your howto, i love it since i saw it fot the first time in hoary section.

  3. #3
    Join Date
    Mar 2005
    Location
    Freiburg/Germany
    Beans
    653
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HOWTO: True or Pseudo-Transparent Borderless Pop-up Terminals

    I get this error if I try to use alltray:

    Code:
    ** ERROR **: file gnome_theme.c: line 194 (parse_theme): assertion failed: (theme_name)
    Any ideas?

    Also, you can use Devil's Pie to set the translucency of windows; while the setup can be a little more complicated, it doesn't need to be compiled since it's already in universe.

  4. #4
    Join Date
    Mar 2005
    Beans
    6,040

    Re: HOWTO: True or Pseudo-Transparent Borderless Pop-up Terminals

    frodon: Thanks for the feedback, appreciated.

    Wolki: Did you try using another metacity or gtk theme? I also thought about using devilspie, but since transset-df can do the same thing without running as a daemon and residing in memory, it's more logical if you don't already have some other use for devilspie.

  5. #5
    Join Date
    Mar 2005
    Location
    Freiburg/Germany
    Beans
    653
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HOWTO: True or Pseudo-Transparent Borderless Pop-up Terminals

    Quote Originally Posted by 23meg
    Wolki: Did you try using another metacity or gtk theme? I also thought about using devilspie, but since transset-df can do the same thing without running as a daemon and residing in memory, it's more logical if you don't already have some other use for devilspie.
    I just switched to clearlooks to try it out, and it didn't work either - same error. Also, I doubt I'd switch from Human to something else for Alltray (seems to be a useful app though). Thanks for the help anyway.
    Hm yeah, probably. devilspie is rather lightweight, but still overfeatured if all you want is a transparent terminal.

  6. #6
    Join Date
    Mar 2005
    Beans
    6,040

    Re: HOWTO: True or Pseudo-Transparent Borderless Pop-up Terminals

    There's an autopackage of Alltray on the website which is a slightly newer version, maybe you should try that. Do you get that error whenever you launch Alltray, or just with gnome-panel? For me it outputs some error messages on terminal as well, but works nevertheless.
    Previously known as 23meg

  7. #7

    Re: HOWTO: True or Pseudo-Transparent Borderless Pop-up Terminals

    Awesome HOWTO, will have to try the transparent stuff later. There is also a way to use Devil's Pie to get a transparent border plus you can make it not appear on the window list. However, I am still having problems with being able to dock it will AllTray and having it skip the window list.

  8. #8
    Join Date
    Oct 2005
    Location
    Perth, WA
    Beans
    49
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HOWTO: True or Pseudo-Transparent Borderless Pop-up Terminals

    Excellent HOW-TO, thanks a lot.

    I was wondering if there is a way to force the terminal window to stay on the bottom of the window stack? so that nothing can be put behind it.

    Thanks again.

  9. #9

    Re: HOWTO: True or Pseudo-Transparent Borderless Pop-up Terminals

    ...stay on the bottom of the window stack?...
    There is a way to do it using Devil's Pie. I could help you achieve this if you'd like, but I haven't discovered a way to make Devil's Pie work with All Tray. Meaning you wouldn't be able to dock the terminal. Although, I haven't really experimented that much to make the two work together.

  10. #10
    Join Date
    Mar 2005
    Beans
    6,040

    Re: HOWTO: True or Pseudo-Transparent Borderless Pop-up Terminals

    I've tried the same but the two don't seem to play well with each other; Devil's Pie just won't recognize an Alltray window with any of the matcher flurbs. If I figure out a way of doing that I'll update the howto, but frankly I don't see a great benefit there because this is meant as a pop-up terminal that will appear on your active workspace whenever you want and then disappear when you're done with it.
    Last edited by 23meg; October 26th, 2005 at 07:19 AM.
    Previously known as 23meg

Page 1 of 17 12311 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •