0

I am running xfce4-terminal in the background in drop-down mode; the terminal window is currently hidden. I am unable to launch xfce4-terminal --drop-down to bring the window up.

How can I use a raw D-Bus call to make it appear?

1 Answer 1

0

Below is a solution using Python (dbus binding 1.3.2), tested to work with xfce4-terminal 1.1.1. The relevant D-Bus call has a signature with an array-of-arrays parameter, which means it cannot be invoked with just dbus-send.

#!/usr/bin/env python3
import dbus
import os

# user id
USER_ID = os.getuid()
# X11 display
DISPLAY = os.getenvb(b'DISPLAY').partition(b'.')[0] + b'\0'

bus = dbus.Bus()   # session bus
bus.call_blocking(
  'org.xfce.Terminal5', '/org/xfce/Terminal', 'org.xfce.Terminal5', 'Launch', 'uayaay',
  (USER_ID, DISPLAY, [b'--tab\0', b'--drop-down\0']))

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .