Re: [Tails-dev] [Tails - Bug #6389] Vidalia fails to show up…

Delete this message

Reply to this message
Author: Alan
Date:  
To: tails-dev
Subject: Re: [Tails-dev] [Tails - Bug #6389] Vidalia fails to show up on some hardware
Hi,

> The intelligent way to solve this issue would be to wait for vidalia
> to connect to X.
>
> However, `xlsclients` returns '<unknown>' for Vidalia unless one
> click on its icon. I found no way to display the client pid.
>
> The following python script does the trick:
>
> <pre>
> import os
> import Xlib
> import Xlib.display
>
> display_name = os.environ['DISPLAY']
> display = Xlib.display.Display(display_name)
> root_win = display.screen().root
>
> pids = set()
> for win in root_win.query_tree().children:
>     wm_pid_prop = win.get_property(display.intern_atom("_NET_WM_PID",
> True), Xlib.Xatom.CARDINAL, 0, 1024) if wm_pid_prop:
>         pids.add(wm_pid_prop.value[0])

>
> pids = list(pids)
> pids.sort()
> for pid in pids:
>     print("%i" % pid)
> </pre>


Do we want to do add a script like that to Tails to be able to wait for
vidalia's pid to connect to X? Or to rewrite `restart-vidalia` in
python? Or to keep the ugly `sleep`?