![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
Ubuntu 9.10 is out!!!
When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu. The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely. |
|
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,798
|
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.. |
|
|
|
|
|
#2 |
|
Ubuntu French Roast
![]() Join Date: Jun 2005
Location: France
Beans: 6,250
Ubuntu 9.04 Jaunty Jackalope
|
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 |
|
Extra Foam Sugar Free Ubuntu
![]() |
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) 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 |
|
Ubuntu QA Team
![]() Join Date: Mar 2005
Location: İstanbul
Beans: 5,798
|
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 | |
|
Extra Foam Sugar Free Ubuntu
![]() |
Re: HOWTO: True or Pseudo-Transparent Borderless Pop-up Terminals
Quote:
Hm yeah, probably. devilspie is rather lightweight, but still overfeatured if all you want is a transparent terminal. |
|
|
|
|
|
|
#6 |
|
Ubuntu QA Team
![]() Join Date: Mar 2005
Location: İstanbul
Beans: 5,798
|
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.
|
|
|
|
|
|
#7 |
|
Gee! These Aren't Roasted!
![]() Join Date: Sep 2005
Beans: 204
|
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 |
|
Just Give Me the Beans!
![]() |
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 | |
|
Gee! These Aren't Roasted!
![]() Join Date: Sep 2005
Beans: 204
|
Re: HOWTO: True or Pseudo-Transparent Borderless Pop-up Terminals
Quote:
|
|
|
|
|
|
|
#10 |
|
Ubuntu QA Team
![]() Join Date: Mar 2005
Location: İstanbul
Beans: 5,798
|
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 02:19 AM.. |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|