Xfce Forum

Sub domains
 

You are not logged in.

#1 2012-01-29 00:13:12

aktiv
Member
Registered: 2012-01-28
Posts: 3

[Solved] Terminal as Desktop Background / Xfce property list

Hi there people!

System:  Xfce4.8 @ Gentoo Linux k3.2.1

I've just installed Xfce and it's looking great so far. I have a little trouble setting it up exactly as I want, so I thought I'd ask you good folks for some help.

I want to run the terminal as a desktop background. I elaborate:
I am running Xfce on two monitors with separate X screens. On both I have a desktop background picture. On top of that, below all other windows, I want to have a Terminal, in fullscreen, no menus, no titlebars, no borders, no nothing. I want the transparency of the terminals to stay consistent, while I want the other windows to become transparent when they are not active. When the terminal windows gain focus, I want them to stay at the current level, not going on top of the other windows, whereas I want the other windows to go on top of eachother when they gain focus.

So, much of this could be achieved with tweaking the settings, but not on a window/application-specific level.

After reading on the forum here I found that I could set the Terminal to desktop level with wmctrl:

wmctrl -i -r $(cmctrl -l | grep Terminal | awk '{ print $1 }') -b add, below

There are two problems with this: (1) wmctrl does not, as far as I can figure, take which Xserver to pass commands to, I'm guessing it's using $DISPLAY, and (2) that setting is lost as soon as I give the window focus (click in it)

Then I found xprop, which can take xserver arguments, and I can use this to set the opacity locked for my terminal windows:

xprop -display :0.0 -name Terminal -f _NET_WM_WINDOW_OPACITY_LOCKED 32c -set _NET_WM_WINDOW_OPACITY_LOCKED 1

Now it's starting to look like something. But I need a list of properties to set. I found X11's properties, but I need Xfce's superset of those. Where can I find those, with good documentation?

The reason for asking for the property list in such an elaborate way is this: Am I going the wrong route here? Is there some other, simpler, way of achieving what I want? For example, embedding the terminal in a panel, I have not looked into that at all. Matter of fact, first thing I did when I got Xfce was to remove all panels smile

Thanks

Offline

#2 2012-01-31 01:46:55

Lightning_John
Member
Registered: 2012-01-27
Posts: 13

Re: [Solved] Terminal as Desktop Background / Xfce property list

I am definitely not an expert in this matter or even a small-time guru, but you could simply change the background of your terminal to match the desktop background. It also has those translucency settings. You could probably have a simple start command with a command suffix which would maximize your terminal windows on start-up.

The dual screens issue is something that is beyond me.

Your probably looking for something different, but that's the best I can do.

Good luck.

Offline

#3 2012-01-31 03:33:39

Ion Silverbolt
Member
Registered: 2010-01-14
Posts: 31

Re: [Solved] Terminal as Desktop Background / Xfce property list

Couldn't you use Tilda? That's what I use in Gentoo. You can have it come down with a keystroke, or cover an entire desktop. It's very flexible. You can also use transparency, change fonts, etc. It's also very light.

emerge tilda

Last edited by Ion Silverbolt (2012-01-31 03:37:02)

Offline

#4 2012-01-31 09:00:45

aktiv
Member
Registered: 2012-01-28
Posts: 3

Re: [Solved] Terminal as Desktop Background / Xfce property list

I used to use Tilda, and I know I can set a terminal background. I also know what I want, and it's neither.

I'm almost there now:

for DISPLAY in ":0.0" ":0.1"; do
  Terminal --hide-menubar --hide-borders \
    --hide-toolbars --maximize \
    --command="bash -c 'TERM=screen-256color; tmux'" & #actually needed ?!
  while [ -z "$(wmctrl -l | grep Terminal)" ]; do
    sleep 0.05s
  done
  ID=$(wmctrl -l | awk '{if (match($4, /^Terminal/)) print $1 }')
  # set "true" opacity to active window
  xprop -id $ID -f _NET_WM_WINDOW_OPACITY 32c \
    -set _NET_WM_WINDOW_OPACITY 3435973836 # ((2^32) - 1) * .8
  # dont change opacity while inactive
  xprop -id $ID -f _NET_WM_WINDOW_OPACITY_LOCKED 32c \
    -set _NET_WM_WINDOW_OPACITY_LOCKED 1  
# Now to set them permanently to the back, and not come to the front when they gain focus
# Neither of the two options below work
  xprop -id $ID -f _NET_WM_ALLOWED_ACTIONS 32a \
    -set _NET_WM_ALLOWED_ACTIONS _NET_WM_ACTION_BELOW 
  wmctrl -r -i $ID -b add,below       
done

Now I just have to figure out the last bit. I've got it sticking to the back before, but I'm note sure about what combination of options needs to be set to the window. I would love some help.

Offline

#5 2012-02-01 02:55:00

aktiv
Member
Registered: 2012-01-28
Posts: 3

Re: [Solved] Terminal as Desktop Background / Xfce property list

Got it:

#!/bin/bash
for DISPLAY in ":0.0" ":0.1"; do
  Terminal --hide-menubar --hide-borders \
    --hide-toolbars --maximize \
    --command="bash -c 'TERM=screen-256color; tmux'" &
  while [ -z "$(wmctrl -l | grep Terminal)" ]; do
    sleep 0.05s
  done
  ID=$(wmctrl -l | awk '{if (match($4, /^Terminal/)) print $1 }')
  xprop -id $ID -f _NET_WM_WINDOW_OPACITY 32c \
    -set _NET_WM_WINDOW_OPACITY 3865470565 # ((2^32) - 1) * .9
  xprop -id $ID -f _NET_WM_WINDOW_OPACITY_LOCKED 32c \
    -set _NET_WM_WINDOW_OPACITY_LOCKED 1 # dont change opacity while inactive 
  wmctrl -i -r $ID -b add,below       # always on bottom
  # notice the subtle difference from the command below, which does not work
  # wmctrl -r -i $ID -b add,below
done

Offline

Board footer

Powered by FluxBB