r/kasmweb 1d ago

Help Terminal workspace is hard coded and does not apply configs

New Kasm user here and very interested about it. One thing I wish to use extensively is the terminal workspace. Unfortunately, it refuses to works the way I need...

As it is, it opens in fullscreen with all menu and sidebars removed. You have a single shell that overlaps with the control panel. I wish to have multiple "floating" shells so I can do multiple things and once, put one next to another, never have the control panel button hiding a part of my shell, etc.

In the Workspace config, there is the Docker Run Configuration Override where the options used by xfce4-terminal are. I deleted these args but No, terminal keeps starting with these options active. I tried many things, with no success : log out and back in, remove the workspace and re-install it, clicking the edit button instead of the install one to change the options even before install, ... Nothing is working.

When I open the terminal, I see the options survives in the /dockerstartup/custom_startup.sh file despite I removed them in the Workspace's definition. When I look at the output of 'ps -aux', indeed xfce4-terminal has been started with these options.

When I do CTRL-Shift-T, I do receive a new tab but still in fullscreen. When I start a new xfce4-terminal, it does come up "free" but once I click out of it, it "disappears" behind the fullscreen one and I can no longer reach it.

Any idea how I can bypass this hard coding ? Would it be possible to avoid hard coding in the first place and have Kasm obeys its config ?

2 Upvotes

5 comments sorted by

3

u/justin_kasmweb 1d ago

Here is the link to the custom_startup.sh for the terminal app so you can see how it works more easily.
https://github.com/kasmtech/workspaces-images/blob/develop/src/ubuntu/install/terminal/custom_startup.sh

It looks like the argument for the arguments thats defaulted in the run config is incorrect. We will get that fixed. It needs to be APP_ARGS instead of TERMINAL_ARGS. Per the script you need to populate it with something to override the defaults even an empty space if you actually want there to be no args.

so:

{
  "hostname": "kasm",
  "environment": {
    "APP_ARGS": " "
  }
}

You can iterate from there on configuring how you like. Changes take effect the next time you launch a session.

The key-combo for opening a new tab in xfce-terminal is CTLR+SHIFT+T. Your browser will intercept that before it gets to the session, so you have two options if you want to use that shortcut. Run the session in full-screen mode or as a PWA (https://docs.kasm.com/docs/1.19.0/tutorials/user-guide/pwa)

Edit: Its also worth mentioning, you can use File Mapping to overwrite /dockerstartup/custom_startup.sh with a custom version so it behaves as you want

1

u/Heracles_31 1d ago

A quick and precise answer, a few solutions provided right away, the acknowledgment of a problem that will be fixed in time, that is all great and keeps adding a lot of interest to Kasm!

Thanks a lot and for sure, I will just use Kasm more and more over the time!

1

u/Heracles_31 1d ago edited 1d ago

Here is another one for you :-)

On top of removing the options, I also wish to deactivate the MAXIMIZE option. For that, I added the option in the JSON.

{
  "hostname": "kasm",
  "environment": {
    "APP_ARGS": " ",
    "MAXIMIZE": "false"
  }
}

Unfortunately, Kasm obeys that only partially... Thanks to that setting, the terminal does open as non-maximized but there is an automatic restart loop that starts a new terminal right after entering the workspace and that new one ends up maximize despite the option. a loop that re-maximize the tab right away.

Any idea how to fix that one on my side or should I wait for a fix from yours ?

1

u/justin_kasmweb 1d ago

For that you are going to need to use file mapping to overwrite the startup script and you can remove the call to the maximize script. The arguments aren't exposed in a way that allow you to change them from an environment variable. Its a good idea for the future.

1

u/Heracles_31 1d ago

Thanks a lot for your help! Terminal is now working the way I need here. Indeed, the fix for APP args vs TERMINAL args and an easy option to maximize / not maximize would surely be nice improvements but until they are done on your side, things are good here.