Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
2
answers
3255
views
How can I copy files from any USB stick to my user's home directory using the command line?
I have a USB stick that contains the folders "theme" and "icons". I want to copy those two folders to the `/home/andrew/.config` folder of my computer or any other computer. How can I do that using the terminal? I am on a Linux Mint Xfce system.
I have a USB stick that contains the folders "theme" and "icons". I want to copy those two folders to the
/home/andrew/.config
folder of my computer or any other computer. How can I do that using the terminal?
I am on a Linux Mint Xfce system.
Designer
(101 rep)
Dec 2, 2018, 01:20 PM
• Last activity: Aug 3, 2025, 12:57 AM
3
votes
1
answers
3064
views
Thunar's "Open Terminal here" bug
I'm using Thunar 1.8.2 on Debian Testing and the "Open Terminal here" function seems buggy. I've set up the custom action `xfce4-terminal --working-directory=%f` with the keyboard shortcut `F4`. Oddly enough, right-click in Thunar and "Open Terminal here" always seems to work. That opens the xfce4-t...
I'm using Thunar 1.8.2 on Debian Testing and the "Open Terminal here" function seems buggy.
I've set up the custom action
xfce4-terminal --working-directory=%f
with the keyboard shortcut F4
.
Oddly enough, right-click in Thunar and "Open Terminal here" always seems to work. That opens the xfce4-terminal with the current working directory.
But with F4
it always opens the terminal with the directory I last used the right-click "Open Terminal here".
So for example, in Thunar I go to /tmp/
, right-click, "Open Terminal here", I get a Terminal with /tmp/
as the current working directory. I close the terminal, move to /home/
in Thunar, then press F4
and I get a Terminal with /tmp/
as the current working directory again.
How do I fix this behavior?
*edit:* This is the current configuration: 
GarlicCheese
(33 rep)
Jan 12, 2019, 01:14 PM
• Last activity: Jun 17, 2025, 07:07 AM
1
votes
1
answers
49
views
Terminal shortcuts in xfce
I'm alternating between working on KDE Konsole and an Xfce terminal. I'd like to make keyboard shortcuts as consistent as possible for my muscle memory. In particular, I'd like to be able to switch between tabs in the same terminal window by doing Shift-Left and Shift-Right, as on Konsole. From else...
I'm alternating between working on KDE Konsole and an Xfce terminal. I'd like to make keyboard shortcuts as consistent as possible for my muscle memory. In particular, I'd like to be able to switch between tabs in the same terminal window by doing Shift-Left and Shift-Right, as on Konsole.
From elsewhere on the web, I found that I should update
~/.config/xfce4/terminal/accels.scm
to contain
(gtk_accel_path "Actions/terminal-window/prev-tab" "Left")
(gtk_accel_path "Actions/terminal-window/next-tab" "Right")
However, after making this change, nothing happens when I do Shift+Left or Shift+Right.
I've tried obvious things like opening a new terminal and so forth. Any ideas for next steps in debugging?
sasquires
(135 rep)
Apr 28, 2025, 06:37 PM
• Last activity: May 5, 2025, 02:32 PM
0
votes
0
answers
51
views
How can I define a keyboard macro in Xfce-terminal
I use `xfce4-terminal`, and it's a great terminal emulator. For an application I run inside the terminal, I wish to define a macro key, so when I push the specific key, the terminal sends a bunch of keystrokes to the application. How do I do this? For example, if I push the physical F3 key, I want t...
I use
xfce4-terminal
, and it's a great terminal emulator.
For an application I run inside the terminal, I wish to define a macro key, so when I push the specific key, the terminal sends a bunch of keystrokes to the application.
How do I do this?
For example, if I push the physical F3 key, I want the terminal to tell my application I typed a,B,c and D as if by a human.
It doesn't have to be F3, CrtlH, CrtlAltF9 or suchlike would be acceptable too.
If the version matters, it's xfce4-terminal 1.0.4 (Xfce 4.18)
I have read about editing ~/.config/xfce4/terminal/accels.scm
, but this only seems to cover rebinding terminal functions, not creating macros.
The relevant documentation doesn't really cover any of these topics - https://docs.xfce.org/apps/xfce4-terminal/advanced
Kingsley
(369 rep)
Apr 2, 2025, 03:58 AM
2
votes
2
answers
2943
views
w command doesn't show all pseudo-terminal sessions
If I open terminal and execute `w` command then it will show: user tty7 :0 12:04 39:56 36.87s 0.06s /sbin/upstart - Now if open `terminator` or `xterm` and execute `w` command then it will show it's entry in the output of `w` command like user tty7 :0 12:04 39:56 36.87s 0.06s /sbin/upstart - user pt...
If I open terminal and execute
w
command then it will show:
user tty7 :0 12:04 39:56 36.87s 0.06s /sbin/upstart -
Now if open terminator
or xterm
and execute w
command then it will show it's entry in the output of w
command like
user tty7 :0 12:04 39:56 36.87s 0.06s
/sbin/upstart -
user pts/2 :0.0 12:50 1.00s 0.02s 0.00s w
but it will not show a new entry when I open gnome-terminal
or xfce4-terminal
.
Why it is showing new session for terminator and not for xfce4-terminal?
Prvt_Yadav
(6032 rep)
May 4, 2018, 07:25 AM
• Last activity: Mar 25, 2025, 03:02 PM
0
votes
0
answers
17
views
How do you configure the cutNewline setting for xfce4-terminal?
While in xfce4-terminal, when I triple-click a line, I don't want to copy the newline. I have a hunch that the important setting is, [cutNewline][1]; but I'm not sure how to configure. I tried these lines in my ~/.Xresources file: 1. `XTerm*VT100.cutNewline: false` 1. `xterm-256color.cutNewline: fal...
While in xfce4-terminal, when I triple-click a line, I don't want to copy the newline. I have a hunch that the important setting is, cutNewline ; but I'm not sure how to configure.
I tried these lines in my ~/.Xresources file:
1.
XTerm*VT100.cutNewline: false
1. xterm-256color.cutNewline: false
(based on the guess that echo $TERM
gives xterm-256color
)
Then reboot; but both didn't work.
I also tried looking at xfconf-query like this:
$ xfconf-query -c xfce4-terminal -l -v
/misc-copy-on-select true
/misc-show-unsafe-paste-dialog false
/shortcuts-no-mnemonics true
Also, I search the https://gitlab.xfce.org/apps/xfce4-terminal/-/blob/master/terminal/terminal-preferences.c page for "newline"; but didn't find any xfce4-terminal preference.
Searching https://docs.xfce.org/apps/xfce4-terminal/usage page for "triple-click" does mention copying the line; but doesn't mention how to configure cutNewline setting.
Maybe I'm configuring at the wrong layer.
mbigras
(3472 rep)
Mar 15, 2025, 08:26 PM
3
votes
1
answers
4798
views
How to enable ligatures for mono fonts in xfce4-terminal?
How can I enable ligatures in `xfce4-terminal`? I can't find any info on this in the manual.
How can I enable ligatures in
xfce4-terminal
? I can't find any info on this in the manual.
RononDex
(191 rep)
Mar 6, 2020, 01:49 PM
• Last activity: Feb 25, 2025, 07:12 AM
0
votes
1
answers
488
views
How do I start ZSH automatically when I open my terminal?
I have zsh and oh-my-zsh installed but my terminal (`xfce4-terminal` on [EndeavourOS](https://endeavouros.com/) (Arch-based)) always starts in `bash`.
I have zsh and oh-my-zsh installed but my terminal (
xfce4-terminal
on [EndeavourOS](https://endeavouros.com/) (Arch-based)) always starts in bash
.
Logos
(3 rep)
Feb 16, 2025, 08:07 PM
• Last activity: Feb 24, 2025, 06:47 PM
0
votes
2
answers
113
views
How to make xfce4-terminal scrollback the terminal when pressing shift-pgup/pgdown while in vim
After a recent Ubuntu upgrade, behavior of using vim inside an xfce4-terminal has changed. Shortcut keys "Shift+Page Up" and "Shift+Page Down" are mapped in xfce4-terminal to "Scroll one Page Up" and "Scroll one Page Down" respectively, i.e. they emulate the behavior that UNIX terminals had for deca...
After a recent Ubuntu upgrade, behavior of using vim inside an xfce4-terminal has changed. Shortcut keys "Shift+Page Up" and "Shift+Page Down" are mapped in xfce4-terminal to "Scroll one Page Up" and "Scroll one Page Down" respectively, i.e. they emulate the behavior that UNIX terminals had for decades.
Unfortunately, once I start vim in a terminal, it looks like those keys are no longer handled, as it does not scroll back the terminal to the content that was before starting vim. Using xterm instead of xfce4-terminal, everything works as expected. Is there any setting that will allow me to restore old UNIX behavior and not have the terminal act differently, depending on what is currently running in the shell?
xfce4-terminal is 1.1.3, vim is 9.1.
treuss
(303 rep)
Jan 3, 2025, 10:17 PM
• Last activity: Jan 14, 2025, 02:10 PM
1
votes
2
answers
184
views
Copy to clipboard some previous lines of bash terminal with keyboard only
Let's say you do `ls -al` in a Bash shell in Debian or Ubuntu and get: ``` drwxrwxrwt 95 root root 12288 Sep 28 2024 tmp drwxr-xr-x 14 root root 4096 Sep 28 2024 usr CTRL+SHIFT+V ? (without using the mouse, everything with keyboard only) Is it possible with arrow keys and a combination of keys? Note...
Let's say you do
ls -al
in a Bash shell in Debian or Ubuntu and get:
```
drwxrwxrwt 95 root root 12288 Sep 28 2024 tmp
drwxr-xr-x 14 root root 4096 Sep 28 2024 usr CTRL+SHIFT+V?
(without using the mouse, everything with keyboard only)
Is it possible with arrow keys and a combination of keys?
Note:
* I don't want to use ls -al | any_tool_to_parse_output
, but rather the ability to move in previous output lines and copy/paste. One of the reasons is that, often, you don't know in advance that you want to copy the (n-2)th line when running a command: it's only when seeing the output after the command has been run, that you want to copy/paste something.
* Let's say we use "Xfce 4 terminal emulator" (/usr/bin/xfce4-terminal
), or Gnome Terminal
. A solution with one of them would be great.
Basj
(2579 rep)
Oct 3, 2024, 06:05 PM
• Last activity: Oct 7, 2024, 06:22 PM
1
votes
1
answers
458
views
Setting icon for hidden files in LF (file manager)
What I want to achieve is to have a specific emoji appear next to dotfiles inside file manager ["LF"][1] (these can be made visible in the file manager with the "zh" shortcut). In my ~/.config/lf/icons these are the first 9 lines in it: ``` ^\..* 👑 di 📁 fi 🗞️ tw 🤝 ow...
What I want to achieve is to have a specific emoji appear next to dotfiles inside file manager "LF" (these can be made visible in the file manager with the "zh" shortcut).
In my ~/.config/lf/icons these are the first 9 lines in it:
^\..* 👑
di 📁
fi 🗞️
tw 🤝
ow ❌
ln 🔗
or ❔
ex 🚀
*.txt 🗞️
These are additional things I've tried:
1. ^\..* 👑
2. ^\.* 👑
3. ^.* 👑
4. .* 👑
5. ..* 👑
I've also tried reordering this "icons" file, i.e. putting one of these 5 before or after "fi" and similar filetypes.
Is this even possible in "LF"?
Other emojis seem to work fine.
I'm not sure what kind of information I would need to provide for this kind of issue, but here is some(please correct me and/or suggest additional info I should provide)
Distro: Manjaro
WM: i3
TE: xfce4-terminal
Emojis: Noto Color Emoji
Noa
(31 rep)
Jul 7, 2024, 03:49 PM
• Last activity: Jul 11, 2024, 08:56 PM
1
votes
1
answers
284
views
How to query current tab name of tabbed GUI terminals (any)
Using tmux, I have implemented a work flow in which I set a virtual home-directory for each "window" I create in tmux. I can query the name of the current window with ```tmux display-message -p '#W'```. So I pretty easily implement my system as shown in the code below. You get the idea. **QUESTION**...
Using tmux, I have implemented a work flow in which I set a virtual home-directory for each "window" I create in tmux. I can query the name of the current window with
I would like to do the same kind of "per tab home directory" in a GUI terminal. But I need to query the name of the current tab so I can look up the home-dir in my simple DB. I can't find a way to query tab names. I prefer xfce4-terminal, but I am open to others. Thanks! --Myles
display-message -p '#W'
. So I pretty easily implement my system as shown in the code below. You get the idea.
**QUESTION**I would like to do the same kind of "per tab home directory" in a GUI terminal. But I need to query the name of the current tab so I can look up the home-dir in my simple DB. I can't find a way to query tab names. I prefer xfce4-terminal, but I am open to others. Thanks! --Myles
alias cdh 'cd ~/bin/get_tmux_window_home_dir
'
% cat ~/bin/get_tmux_window_home_dir
#!/usr/bin/ruby
$VERBOSE = nil
window = tmux display-message -p '#W'
.chomp
if ! $?.success?
STDERR.puts "Error: tmux display-message -p '#W' failed."
print 'XXXXX'
exit 1
end
db_file = "/home/#{ENV['USER']}/.config/tmux_window_home_dir/tmux_window_home_dir.csv"
db = {}
if File.exists?(db_file)
File.readlines(db_file).each do |l|
s = l.split(',')
db[s] = s
end
end
if db[window]
print db[window]
else
STDERR.puts "Error: There is no home directory set for tmux window name '#{window}'"
print 'XXXXX'
end
Myles Prather
(53 rep)
Aug 10, 2021, 08:28 PM
• Last activity: Jul 3, 2024, 02:59 PM
9
votes
2
answers
11965
views
How to start the Xfce Terminal always maximized in Xfce?
I'd like to start the Xfce Terminal in Xfce always maximized. (Usually, I do that through the launcher in the panel.) I've already done that [for Emacs by means of X resources](https://unix.stackexchange.com/a/426914/4319); however, `xfce4-terminal` doesn't read X resources. How to make it be always...
I'd like to start the Xfce Terminal in Xfce always maximized. (Usually, I do that through the launcher in the panel.)
I've already done that [for Emacs by means of X resources](https://unix.stackexchange.com/a/426914/4319) ; however,
xfce4-terminal
doesn't read X resources.
How to make it be always started maximized?
imz -- Ivan Zakharyaschev
(15862 rep)
Feb 27, 2018, 01:13 PM
• Last activity: May 20, 2024, 04:23 AM
0
votes
1
answers
52
views
How can I make drop-down xfce4-terminal appear using raw D-Bus calls?
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?
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?
user3840170
(1889 rep)
May 5, 2024, 11:41 AM
0
votes
1
answers
118
views
How to change locale of xfce4-terminal window?
I need to record a gif (using peek) of copy/paste for my project. But I want the interface to be English. [![Copy/paste warning from Xfce4 Terminal][1]][1] I was able to do this once, I've added env LC_ALL=C exo-open --launch TerminalEmulator in Launcher to change the locale of the terminal interfac...
I need to record a gif (using peek) of copy/paste for my project. But I want the interface to be English.
I was able to do this once, I've added
env LC_ALL=C exo-open --launch TerminalEmulator
in Launcher to change the locale of the terminal interface. But then I was not able to get it back to my normal locale

UTF8.pl_PL
. I was asking chatGPT and used this command:
exo-open --launch TerminalEmulator --command='unset LC_ALL && xfce4-terminal'
The command did not give any output but then I deleted the --command
I get back my locale. But now I can't make it English again.
Running this in terminal
LC_ALL=C && xfce4-terminal
Doesn't work. I also tried:
localectl set-locale LC_MESSAGES=en_US.utf8
localectl set-locale LANG=en_US.utf8
But the interface is still in my default locale.
So how I should change the terminal interface locale to English and back to original locale (without rebooting)?
I use Fedora Xfce.
jcubic
(10310 rep)
Apr 9, 2024, 04:39 PM
• Last activity: Apr 9, 2024, 04:48 PM
13
votes
5
answers
8483
views
How to disable mouse support in terminal?
I'm asking this question while using xfce4-terminal, but I'm interested in a general solution: is there a way to stop a terminal emulator announcing mouse support in consoles? I need mouse-select and copy-paste much more frequent that I need mouse support in vim or wherever.
I'm asking this question while using xfce4-terminal, but I'm interested in a general solution: is there a way to stop a terminal emulator announcing mouse support in consoles? I need mouse-select and copy-paste much more frequent that I need mouse support in vim or wherever.
Ivan Voras
(371 rep)
Mar 2, 2015, 01:03 PM
• Last activity: Jan 26, 2024, 01:33 PM
1
votes
1
answers
56
views
inotifywait not detecting line changes in xfce4 config file
I am having issues where a Debian VM of mine in VMWare Workstation changes it's resolution to 1280x1392 pixel every time I enter fullscreen mode. Now I could change the resolution manually to 2560x1440px every time I exit and enter fullscreen mode, but would prefer to automate it. I first tried modi...
I am having issues where a Debian VM of mine in VMWare Workstation changes it's resolution to 1280x1392 pixel every time I enter fullscreen mode.
Now I could change the resolution manually to 2560x1440px every time I exit and enter fullscreen mode, but would prefer to automate it.
I first tried modifying the .config/xfce4/xfconf/xfce-perchannel-xml/displays.xml file where the configuration is stored manually, but it does not apply the changes. The changes are neither applied if I use the xfconf-query command to set the resolution value.
Something that does work to set the resolution from the command line is xrandr
xrandr --output Virtual1 --mode 2560x1440
Now I thought about setting up a script using inotifywait to monitor changes in display.xml.
But my issue is that it doesn't seem to recognize the changes in the file...
I ran the following command from the command line(Just to test if it even notices the changes):
while inotifywait -m -e modify /home/myhomesir/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml; do whoami ;done
Then I run
md5sum display.xml
to get the current md5sum of the settings file, exit and enter Fullscreen and run md5sum display.xml
again to confirm that the file has changed:
md5sum displays.xml
001c0796aba8c0e8b4ea28d59f2e5edc displays.xml
md5sum displays.xml
322e7ea6ca9914caba6fa1365244b27a displays.xml
Checking the Output of my inotifywait command, I dont get any output:
while inotifywait -m -e delete /home/myhomedir/.config/xfce4/xfconf/xfce-perchannel-xml/; do whoami;done
Setting up watches.
Watches established.
Do you know why this is happening and not recognizing the changes?
Two lines are being changed from what I have observed:
diff displays.xml_wrong displays.xml_correct
9,10c9,10
---
>
>
Looking forward to any help. If you have any other suggestions, let me know. Thank you!
Constantin M
(21 rep)
Oct 15, 2023, 12:10 PM
• Last activity: Oct 15, 2023, 12:17 PM
182
votes
6
answers
98231
views
Copy-Paste in xfce4-terminal adds 0~ and 1~
I use xubuntu 14.04, 64 bit. Every now and then, when I try to paste some text in xfce4-terminal, instead of the expected text to be pasted, it is surrounded by `0~` and `1~`, such as: 0~mvn clean install1~ The text is supposed to be `mvn clean install` -- I verified this by pasting the content in v...
I use xubuntu 14.04, 64 bit. Every now and then, when I try to paste some text in xfce4-terminal, instead of the expected text to be pasted, it is surrounded by
0~
and 1~
, such as:
0~mvn clean install1~
The text is supposed to be mvn clean install
-- I verified this by pasting the content in various other applications (gnome-terminal, gedit and others). Every application pastes correctly the content, except xfce4-terminal. I couldn't find any references for this on the internet (unfortunately, it is hard to search for text with special characters on google.com...). Why does this happen?
botismarius
(1979 rep)
Apr 14, 2015, 09:09 AM
• Last activity: Sep 17, 2023, 06:47 PM
2
votes
2
answers
1619
views
Open new terminal with environment specified by source command
I want to run a command that opens a terminal and sources into it a set of variables. How can I do this? I'm using xfce4-terminal. It has a command-line arg "--command", to execute commands upon opening the terminal. But that arg doesn't appear to allow execution of the source command. # For example...
I want to run a command that opens a terminal and sources into it a set of variables.
How can I do this? I'm using xfce4-terminal. It has a command-line arg "--command", to execute commands upon opening the terminal. But that arg doesn't appear to allow execution of the source command.
# For example:
## use terminal's --command flag to open it with sourced environment vars
xfce4-terminal \
--command 'source somefile' \
--hold &
But it just gives an error: failed to execute child process 'source': no such file or directory.
*That is what you would try naturally after reading the xfce4-terminal's sparse manpage.*
# How about specifically invoking bash within the new terminal to source the file?
xfce4-terminal \
--command 'bash -c "source somefile \
--hold &
That executes the source command, but as soon as it is finished the terminal exits.
*You might try that after searching the forums and finding it written that one must call bash to run the bash command source. (What is that? Start a terminal with a bash instance to call another bash to run the command)*
# call bash within bash, within bash, within terminal, to run the command
xfce4-terminal \
--command 'bash -c "source somefile; bash"' \
--hold &
That opens a terminal and keeps it open, but without the sourced environment.
*Seems silly, but that's something else you might try after searching the forums.*
# use bash to call bash with sourced environment
xfce4-terminal \
--command 'bash -c "bash -c \"source somefile; some_command\""' \
--hold &
That sources the new env in a new terminal, but it just closes again as soon as the source cmd has finished executing. *(Just some guesswork)*
# create a script called source_somefile which invokes bash and runs 'source somefile'
xfce4-terminal \
--command 'source_somefile' \
--hold &
No. The terminal closes again as soon as the source cmd has finished executing.
Though you can't be blamed for thinking that would surely work: putting the source cmd in a script and running that using the terminal with the --command flag, so that the --hold flag might also be used to stop the terminal exiting when the source command has finished executing?
How about, running the script as: bash -c 'source somefile'?
No: terminal closes again as soon as the source cmd has finished executing.
So how *can* this be done, short of printing off the xfce4-terminal manpage and ritually burning it over a blood sacrifice under a harvest moon? And then howling... howling...
markling
(231 rep)
Oct 2, 2022, 01:59 PM
• Last activity: Sep 7, 2023, 03:10 PM
3
votes
2
answers
1614
views
Opening terminal links with the keyboard
One of the very useful things about `urxvt` is that I could use keyboard shortcuts to navigate through and open hyperlinks that appeared on the terminal screen (by adding some `urxvt*` entries on `.Xresources`, IIRC). Now I'm on `xfce4-terminal` and am missing this functionality. I took a look at `~...
One of the very useful things about
urxvt
is that I could use keyboard shortcuts to navigate through and open hyperlinks that appeared on the terminal screen (by adding some urxvt*
entries on .Xresources
, IIRC).
Now I'm on xfce4-terminal
and am missing this functionality. I took a look at ~/.config/xfce4/terminal/accels.scm
but couldn't find anything relevant. For the moment, I'm stuck to having to grab my mouse and Ctrl+click the terminal URLs I want to open in the browser, which is quite disruptive to my workflow.
Question: **is it possible to select and open URLs printed on the xfce4-terminal just using the keyboard?**
I'd be glad to hear about other terminal emulators that offer this functionality, but I don't intend on going back to urxvt for the moment.
Waldir Leoncio
(377 rep)
Jun 23, 2021, 05:49 AM
• Last activity: Aug 25, 2023, 08:26 AM
Showing page 1 of 20 total questions