
zshrc file or manually – to use the existing session’s X clipboard.Įxport DISPLAY = `w -hs | awk '' | sort -u | grep : | head -n 1 `Īfter exporting DISPLAY, you can use xsel -clipboard to copy and paste from command-line applications like Vim and tmux into the X clipboard. If you’re connecting to a Linux machine that has a running X Windows session, perhaps your primary desktop machine, you can log in via SSH and set the DISPLAY environment variable – either via your. How far can we get using just command-line tools and an SSH app on iOS like Blink Shell? With a Running X Windows Session However, we’d still like to access the remote clipboard. An X Server app exists, but it didn’t even support pasting from the iOS system clipboard when I tested it, let alone synchronizing the X clipboard and the iOS system clipboard. However, no iOS app that I’m aware of supports X forwarding over SSH. You can then either run a graphical terminal like gnome-terminal over X, or use xsel from the command-line (e.g., cat file.txt | xsel -clipboard) to copy to the clipboard, letting the X server synchronize the clipboard. If the remote computer’s operating system is Linux, the typical approach on a client computer running macOS, Windows, or Linux is to run an X server locally and SSH to the remote machine with X forwarding turned on. Tip: If you want to follow along with this post and do not already have a Linux VM running somewhere, I recommend Digital Ocean if you want something quick to get started. In all of these cases – not only when using your finger – you should be able to copy text on the remote server and then paste it into any iOS app. But how do you copy large amounts of text from inside a text editor like Vim, copy command output via pipes, or copy from the scrollback buffer within a tmux session?

You can already select text with your finger in an SSH app and copy to the iOS system clipboard, as long as the text you want to copy is visible on the screen.
#1CLIPBOARD IOS PRO#
If you’re reading this, you might also like my summary of the state of coding on the iPad Pro in 2019. This post details options available for remote machines running Linux with an active X Windows session, Linux machines without X Windows, and macOS machines.
#1CLIPBOARD IOS HOW TO#
When developing on a remote computer over SSH from iOS, one problem has vexed me: how to get content from the remote machine’s clipboard into the iOS clipboard.įor fun, I decided to see how far I could get toward solving this problem using only command-line tools – that is, without writing any code.
