You are not logged in.


Hi!
Lost all my work after had to kill a xfce4-terminal (about
60 terms open ....).
I usually modify the desktopfile, which helps most of the time,
but this is NOT ensuring "xfce4-terminal --disable-server".
How to make this happen?
Thanks,
Manfred
Offline


Hi Mabra,
If you are saying it does not always work, then it should work sometimes.
When does it work/when not?
It is a bit of a run arround to troubleshoot:
- they all have the same icon.
- xfce4-terminal-emulator.desktop calls the xfce4-terminal.desktop through xfce4-terminal.desktop's "category: TerminalEmulator" , but through the command line "exo-open --launch TerminalEmulator". The exo-open will not keep the "--disable-server" option. (no idea why)
Copying the files into your local settings (.local/share..) and changing the icon of one or putting an incorrect command to generate an error message would be how I would troubleshoot if I were in your shoes. Perhaps there is also another use-case when you use this? (like opening terminals from inside thunar?)
Keeping your taskmanager (System->taskmanager) open will quickly show you if an indipendant terminal opening has succeded.
Also:
There are 3 different xterminal desktop files I know of 2 in /usr/share/applications: xfce4-terminal (called in the top application menu) ; xfce4-terminal-emulator (called in the application->system menu) and one in your default settings: Settings->default applications menu called Debian X Terminal Emulator in /usr/share/xfce4/helpers/
I don't think the last one is involved, but perhaps you are opening files somehow and this one is called?
Edit: another option of course is to give a look at alternative terminals, which do not have the "call dbus/one process feature" and set them as defaults.
xfce is a pretty lightweight desktop, so only creating one real process for all terminals is a killer feature. This also makes it a bit less robust, as if that the one terminal process crashes all the terminals are gone. If you are not looking for this feature, instead of changing desktop files, you may want to look at other terminals, for example:
- alacritty = fast and extensive configuration file, flexible, but with (very) high memory usage.
Use case: if you are using the terminal for writing a lot you can configure a lot of stuff in that file (will take some time reading up on).
But 100+ MB of memory used, for your case, with 60 terminals open, that may be a big chunk of memory.
- terminator = the gnome default terminal, one can split the terminal into multiple windows. Still high memory usage (around 70(first) to 65 MB)
Use case: if you quickly want to try a command or have output in the same window, windows can be split vertically and horizontally and run without opening a new terminal. One can also create group-windows in the terminal . This would have the same issue that, if the one terminal process crashes, all sub-windows in that terminal are lost.
- xfce-terminal = relative light memory 55 MB, but if you are using the standard, then additional terminals will share this one process and resources. This allows a lightweight memory approach. As you did, you can disable this sharing with --disable-server, but you have to catch the references to the terminal in your GUI (above).
- uxterm (already installed) = very lightweight 12 MB, it is very bare bone. You have to increase the fontsize to be usable and this can be done in a few places (no dedicated configuration file, as much as I understand), so configuration a bit of a pain and few options to configure.
Use case: If you want 60 independant terminals it may be worth looking into, as you will use substantially less memory and it is installed by default.
Making any of these your default terminal should also solve it.
Last edited by bggf (2026-05-11 13:43:05)
Offline


Hi,
and thanks for your reply and help.
What I've done in the meantime, moved the xfce4-terminals binary to '/usr/bin' and put a shell-wrapper
into '/usr/sbin' (where the PATH containes this order: '/usr/sbin:/usr/bin'). So the wrapper will be called first.
Looks like working.
By your good hints, I tried the "default terminal" and the "xfce-settings/xfce4-terminal) and both (like all
the others) carry the "--disable-server" argument.
But can you explain, how you measured the memory consumption? size, rss, vsz ??
At this moment, I have 28 terms running, giving this result:
1.1M, 855K, 11M (based on: 'ps --no-headers -o cputimes,size,rss,vsz,tt,exe,args -C xfce4-terminal').
Inserting '%mem' in ps's output shows zero percent.
Linux terminals are a nightmare, even not really worth the name, a minimalist (and so an
anti-human idea) approch. I am using mate-terminal (has profiles!!!!!) too, but found no time
to track the same problem ('--disable-factory') and it has an additional '--sm-client-disable'.
I am going probably back to Konsole (which's profiles hasnt worked for a long time), will see.
Thanks for your help,
Manfred
Hi Mabra,
If you are saying it does not always work, then it should work sometimes.
When does it work/when not?It is a bit of a run arround to troubleshoot:
- they all have the same icon.
- xfce4-terminal-emulator.desktop calls the xfce4-terminal.desktop through xfce4-terminal.desktop's "category: TerminalEmulator" , but through the command line "exo-open --launch TerminalEmulator". The exo-open will not keep the "--disable-server" option. (no idea why)Copying the files into your local settings (.local/share..) and changing the icon of one or putting an incorrect command to generate an error message would be how I would troubleshoot if I were in your shoes. Perhaps there is also another use-case when you use this? (like opening terminals from inside thunar?)
Keeping your taskmanager (System->taskmanager) open will quickly show you if an indipendant terminal opening has succeded.Also:
There are 3 different xterminal desktop files I know of 2 in /usr/share/applications: xfce4-terminal (called in the top application menu) ; xfce4-terminal-emulator (called in the application->system menu) and one in your default settings: Settings->default applications menu called Debian X Terminal Emulator in /usr/share/xfce4/helpers/
I don't think the last one is involved, but perhaps you are opening files somehow and this one is called?Edit: another option of course is to give a look at alternative terminals, which do not have the "call dbus/one process feature" and set them as defaults.
xfce is a pretty lightweight desktop, so only creating one real process for all terminals is a killer feature. This also makes it a bit less robust, as if that the one terminal process crashes all the terminals are gone. If you are not looking for this feature, instead of changing desktop files, you may want to look at other terminals, for example:- alacritty = fast and extensive configuration file, flexible, but with (very) high memory usage.
Use case: if you are using the terminal for writing a lot you can configure a lot of stuff in that file (will take some time reading up on).
But 100+ MB of memory used, for your case, with 60 terminals open, that may be a big chunk of memory.- terminator = the gnome default terminal, one can split the terminal into multiple windows. Still high memory usage (around 70(first) to 65 MB)
Use case: if you quickly want to try a command or have output in the same window, windows can be split vertically and horizontally and run without opening a new terminal. One can also create group-windows in the terminal . This would have the same issue that, if the one terminal process crashes, all sub-windows in that terminal are lost.- xfce-terminal = relative light memory 55 MB, but if you are using the standard, then additional terminals will share this one process and resources. This allows a lightweight memory approach. As you did, you can disable this sharing with --disable-server, but you have to catch the references to the terminal in your GUI (above).
- uxterm (already installed) = very lightweight 12 MB, it is very bare bone. You have to increase the fontsize to be usable and this can be done in a few places (no dedicated configuration file, as much as I understand), so configuration a bit of a pain and few options to configure.
Use case: If you want 60 independant terminals it may be worth looking into, as you will use substantially less memory and it is installed by default.Making any of these your default terminal should also solve it.
Added later 06 min 19 s:
Hi!
If someone asks for the wrapper, what worked currently for me is this:
exec /usr/bin/xfce4-terminal --disable-server $@Regards,
Manfred
Offline


Hi mabra,
As for the memory consumption: I did use the "Task Manager" RSS column in my answer.
Now I also checked with "top" and with my ps (example below)
(my ps: "ps --version" = ps from procps-ng 4.0.2), I also used your ps command and all the results were pretty consistent on my virtual machine.
Here I spun up a few terminals and this below is my output.
command:
echo;ps -aux|awk 'NR==1{print};/ter[m]/ { print; sum_mem += $4; sum_rss += $6} END {print "\t total percentage memory " sum_mem"% total memory in MB " sum_rss/1024 }'
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
bggf 46927 0.6 2.5 496692 63396 ? Sl 01:51 1:08 xfce4-terminal
bggf 48905 0.0 1.6 535592 41808 pts/6 Sl 03:10 0:00 xfce4-terminal --disable-server
.....
bggf 50858 0.2 0.5 20912 12820 ? S 04:39 0:00 xterm -class UXTerm -title uxterm -u8
total percentage memory 9.2% total memory in MB 233.367
As for the command, I wanted to add up the total of the terminals as well, so:
"echo" ; to add a new line before the output
ps -aux to list all the processes
awk:
with NR==1{print}; ~ NR is a predefined variable , the current line in awk, so if it is "1" it will "print" the current line, the first line being the headers)
for the rest:
1) {print}; the line, IF, regex-filter for all processes with "term" in it .
(the [] in the "regular expression search" to avoid matching the current search command)
2) for every line, add up the column 4 and 6, which are the % and KB of the process in my output.
3) print the result with some text/sentence.
I have read that the ps and top/Task Manager commands may have different results because top will also count the "shared" memory the processes are using by counting the dynamic library files, which are (appearently) not included in ps (except they seem to be for the ps I've got installed). The commands "free" and "vmstat" (and the file /proc/meminfo they read) .. also seem pretty consisten (even if they don't not totally coincide).
Good solution with the wrapper.
Offline
[ Generated in 0.012 seconds, 7 queries executed - Memory usage: 561.02 KiB (Peak: 577.63 KiB) ]