![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Ubuntu QA Team
![]() Join Date: Mar 2005
Location: İstanbul
Beans: 5,810
|
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 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 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" Code:
alltray -x -g [geometry]"gnome-terminal --window-with-profile=tterm" 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 Code:
sudo apt-get install xcompmgr libxcomposite1 libxcomposite-dev libxfixes3 libxfixes-dev libxdamage1 libxdamage-dev libxrender1 libxrender-dev 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 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
Code:
Option "RenderAccel" "true"
Option "AllowGLXWithComposite" "true"
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 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] 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
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 23rd, 2006 at 11:18 PM.. |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|