(As an aside) Previously, when I increased the version of Brave, the frame when right-clicked turned thick and black, but I just did a system update and the problem has been resolved.I am very happy.
When I start QubesOS, I start untrusterd, Vault and DisposableVM manually and start the applications manually as well, but I want to start the specified applications automatically when each AppVM is started.
I found the Gnome? in the topic, but I don’t know how to write the automatic launch in xfce and would like to know if you can do it.
I had to type it in manually, so I typed it using the code created by a community member, will this still work?
qube = get_window_property(“_Qubes_VMNAME”);
ws = 0;
if qube == “untrusted” then
ws = 1
elseif qube == “vault” then
ws = 2
end
if ws > 0 then
set_window_workspace(ws);
change_workspace(ws);
end
Also, in order to automatically start devilspie2 with dom0, i need to register the application at session and startup, where is devilspie2?
Thank you, I registered devilspie2 as a session and startup, and the untrusted one started automatically, and the vault one started manually because I couldn’t find a link to the VisualStudioCode app, but the untrusted one ws1,It is shown on the leftmost of the four Workspaces.
I tried to change the settings to see if it was ws3 instead of ws2, but it is the same and starts on the ws1 screen.For VisualStudioCode, I looked at the list displayed in
ls /usr/share/applications/
but could not find it.Where can I find the .desktop file?Have i also made any mistakes that the devilspie2 configurator is prone to making?
_Qubes_VMNAME value is empty in devilspie2 for some reason, but if checking the window properties using xprop then the _Qubes_VMNAME value is set correctly.
No idea what’s wrong with it, maybe there is some change in Qubes OS 4.2 that broke it. Maybe it’s new devilspie2/Xorg version that is broken or some change in Qubes OS tools.
You can use WM_CLASS property value as a workaround:
if get_window_property('_QUBES_VMWINDOWID') ~= '' then
qube = get_window_property('WM_CLASS'):match("[^:]+")
ws = 0;
if qube == "untrusted" then
ws = 1
elseif qube == "vault" then
ws = 2
end
if ws > 0 then
set_window_workspace(ws);
change_workspace(ws);
focus();
end
end
I could only type it in manually.I then rebooted and tried to start the vault application VisualStudioCode, but hmmm, it still starts in WS1 and not in the WorkSpace next to it.
If there are any typos, please let me know.
if get_window_property(‘_QUBES_VMWINDOWID’) ~= ‘’ then
qube = get_window_property(‘WM_CLASS’):match(“[^:]+”)
ws = 0;
if qube == “untrusted” then
ws = 1
elseif qube == “vault” then
ws = 2
end
if ws > 0 then
set_window_workspace(ws);
change_workspace(ws);
focus();
end
end
No, it’s not running, the output just shows that grep devilspie2 command is executed.
Try running the devilspie2 command manually in dom0 terminal and see if it’ll give you any errors.
Thanks.I also checked the directory with the ws.lua file (~/.config/devilspie), where the code you gave me is located, but it seems that devilspie2 does not start automatically after reboot.
The same results are output.I reviewed the code and found that I had used two single quotes when I should have used double quotes, so I corrected this, but there may be other typos.
but after reboot, the vault is trying to screen to WS2 VisualStudioCode is to be started in WS1 at startup.If that is the case, the rest of the code is likely to be typed incorrectly.
Excuse me.First of all, when I reboot, devilepie2 starts automatically.On top of that, untrusted, disposableVM and vault’s AppVM start automatically, and untrusted’s thunderbird/discord/Brave start automatically. vault’s VisualStudioCode remains unset because it could not find the applicationI couldn’t find “.desktop” and disposableVM was not configured, so it is left unconfigured.
The code presented by apparatus this time, I think I have the settings to distinguish which WS to use when running the untrusted and vault applications. untrusted automatically starts in the WS1 workspace, which is ok.But the vaulted application, VisualStudioCode, starts manually, but not in WS2, which I have set up.This is the situation.So, the two problems I have are
I want to be able to start VisualStudioCode automatically, and to be able to place it in WS2
I want to be able to start Brave automatically for DisposableVM as well.
I would like to check the code as it is most likely my typo.
It works fine for me so it’s most probably a typo.
If you won’t be able to find the typo then you can copy the script from dom0 like this: How to copy from dom0 | Qubes OS
And paste it here so I could take a look.
First find the name of the .desktop file: go to vault qube’s Settings → Applications and point the mouse cursor over the VisualStudioCode entry, it’ll show the tooltip with the .desktop filename e.g. VisualStudioCode.desktop.
In the vault terminal run this command:
Thanks, this is the content of ws.lua in devilepie in the Config directory of dom0.
if get_window_property(‘_QUBES_VMWINDOWID’) ~= " then
qube = get_window_property(‘WM_CLASS’):match(“[^:]+”)
ws = 0;
if qube == “untrusted” then
ws = 1
elseif qube == “vault” then
ws = 2
end
if ws > 0 then
set_window_workspace(ws);
change_workspace(ws);
focus();
end
end
Also in Vault,
sudo find / -name “VisualStudioCode.desktop”
If I run this command, I will get a No permission.
sudo find
and ,
sudo find /
I think it probably happens when -name is given, because it works if -name is given.
Use the “Preformatted text” instead of “Blockquote” to write the config files, commands etc, use:
```
text
```
Instead of:
> text
When you use “Blockquote” it’s replacing the quote characters to another character e.g.: " to “ ' to ‘
These characters are wrong if used in the config file.
Here:
It should be two single quote characters ' instead of a double quote character ".
It works for me.
Copy the executed command and its output from the terminal e.g.: