LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 11-03-2008, 11:49 AM   #1
Savet
Member
 
Registered: Nov 2004
Distribution: Slackware
Posts: 73

Rep: Reputation: 15
Borderless transparent background processes in Fluxbox


I posted this to the tutorials, but haven't seen it pop up there yet, but it's possible I screwed up and it never got submitted...so I figured it's probably best just to put it on the forum. It's not overly technical, but sometimes it's nice to have all the info in one place.

Here's a quick step by step guide for starting up a transparent borderless process when you start fluxbox, placing it in the same location every time, and having it follow you across desktops without getting in the way of other applications.


aterm

You could use aterm or eterm, but eterm is a bit more bloated than I prefer, and Iike the way that aterm simulates xterm in its lack of menus. So, for this set of instructions, we will detail setting this up with aterm.

You can download the aterm source from:

http://www.afterstep.org/download.php

Once aterm is installed, we will want to find where aterm was installed to. To do this, we'll run:

Quote:
whereis aterm
On my machine, it returns:

Quote:
bash-3.1$ whereis aterm
aterm: /usr/local/bin/aterm
What we want to do now, is copy the executable to another filename, so we have two separate incarnations of aterm with different names. We'll detail why later on.

as root, run:

Quote:
cp /usr/local/bin/aterm /usr/local/bin/eek_a_unicorn
where eek_a_unicorn is your preferred filename.

Make sure that the program is executable by all users by running as root:

Quote:
chmod 755 /usr/local/bin/eek_a_unicorn
Now, we're going to tell fluxbox that our new file needs special behavior. Open ~/.fluxbox/apps with your favorite text editor, and add the following lines. If you don't have a ~/.fluxbox/apps file, make one. Ensure you are doing this under your user account, as we want the user to have read and write permissions on this file.


Quote:
[app] (eek_a_unicorn)
[Deco] {NONE}
[sticky] {yes}
[Position] {715 0}
[Layer] {12}
[FocusHidden] {yes}
[Tab] {No}
[end]
When you're done, save and exit the file. Let's discuss each of the options, as you may want to modify some of them.

Deco: Tells fluxbox what decorations to give. We're telling it we want none, including borders.

sticky: We're telling it we want the application to persist across desktops. With this option, no matter which virtual desktop you are on, the application follows.

Position: This tells it where to start. "0 0" would be the top left corner, and every positive number moves it's position by Height and Width. To find your desired location, start aterm and drag it to the desired position. Before releasing the window, fluxbox will display an X Y coordinate of it's current location. Use this value. I have mine loading in the upper right corner. This option supposedly also supports absolutes such as UPPERRIGHT, LOWERRIGHT, etc, but I was unable to use these values to change the location. If you wish to play with it, you might try different values of lower case, or capitalizing the first letter.

Layer: 12 tells it that we want it to be at the desktop level. This means that new windows will load over the top of it. Possible values are as follows:

Quote:
2 - AboveDock
4 - Dock
6 - Top
8 - Normal
10 - Bottom
12 - Desktop
FocusHidden: This tells fluxbox that when using the previous/next application buttons, we're going to ignore this application.

Tab: This tells fluxbox that when we cycle through applications using the alt-tab functionality, we're ignoring this application.

Now...remember how I promised I'd explain why we copied the program? The reason is simple. Every time this application loads, it will receive these properties. And if you're like me and use aterm for most of your terminal needs, you don't want them all borderless, hidden behind browsers, and following you across your desktops.

So now, we need to add eek_a_unicorn to our ~/.fluxbox/startup file. This will load our program when fluxbox is started.

You will want to add the following line:

Quote:
/usr/local/bin/eek_a_unicorn -bl -tr +sb -fg darkgray -e top &
...somewhere above the following line:

Quote:
exec /usr/bin/fluxbox
The options for our fie are as follows:

-bl Tells it we want it to be borderless. You're probably asking why we need this if we specified it in the apps file. Or why we even bothered with the apps file if we can declare it here. The answer is that in testing, I never bothered to take this out while editing my startup file. When loading the program at the start of fluxbox, it appears that fluxbox overrides this command and assigns a border regardless of your specification when starting the program.

-tr Tells it we want our new window to be transparent.

+sb Tells it we want no scrollbar. Alternatively, -sb forces a scrollbar

-fg Specifies the foreground (font) color. In my case, I want it to be darkgray so it is barely visible against the background image.

-sh Indicates the amount of shading you wish to have against the background image. This is helpful if you have a background with a lot of colors, and wish to darken it while leaving the image visible. If this is the case, use a brighter font such as white, light grey, green, etc. This option accepts values from 0 to 100. I have found 60 to be a comfortable level of shading.

-e This tells it what command to load. In my example, I'm running top to monitor the most resource intensive programs. If you have other scripts you wish to run, you can do so here...including no script at all by omitting the -e option. It is worth noting that the -e must be declared last, or it will not load correctly as it will attempt to run all remaining options as part of the command called by -e

& The ampersand symbol tells it we want to run the process in the background. If you do not do this, fluxbox will not start correctly.

If you've done everything correctly, your program will load at the correct position, follow you around like a puppy dog, and won't get in the way of your other programs. Also, unlike a wolf kept as a housepet, it won't claim ownership of your fridge by urinating on the front of it because he knows that's where you keep his chicken.

A picture of the final result:
http://farm4.static.flickr.com/3043/...ccf54b00_o.jpg
 
  


Reply

Tags
aterm, fluxbox, linux, transparent


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Borderless aterm in fluxbox LivinLarge Linux - Newbie 2 11-28-2005 07:07 PM
Answer - Fluxbox aterm borderless J3N7iL Linux - Software 0 10-06-2005 12:13 PM
Background and Xterm transparent background EvilAngel Linux - General 1 01-31-2005 09:40 AM
In KDE, aterm uses GNOME background rather than KDE background for transparent backgr cpbl Linux - Software 4 01-01-2005 10:26 PM
Transparent background for fluxbox shimmyt Linux - Software 0 10-12-2003 10:26 AM


All times are GMT -5. The time now is 07:37 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration