2012-12-05 13 views
8

私はMacを使用しており、仮想ボックスにdebian linuxをインストールしました。 私のMacから仮想ボックスのlinuxにURLをコピーしたい。どうやってやるの?Macキーボードでバーチャルボックスで端末linuxに貼り付けるには?

+1

ここ

を(デフォルトのVirtualBoxのコンソールを使用していない)どのようにすることができます最初からセットアップあなたですか? (前者の場合は、クリップボードの共有をオンにして、Command + Shift + Cを押してください) – Ryan

+2

ゲストの追加をインストールしましたか?また、TTYウィンドウや端末エミュレータについて話していますか? – Blender

+0

私のdebianにはX.Orgがないのでゲストの追加をインストールできませんでした。私はTTYを直接使用しています。 – ggomesfe

答えて

16

Macで端末を開いてSSHをVirtualBoxゲストに開くほうが簡単です。

6

私はちょうど同じ問題を抱えていました。クリップボード共有がオンになっていることを確認したら、Ctrl + Shift + Vを押してdebianの端末に貼り付けます。

5

VirtualBoxでOS XとUbuntuの間でコピー&ペーストをするためのガイドが書いてありました。たぶん、この質問に出くわす誰かに助け:

http://blog.nostopbutton.com/2013/08/24/setup-copy-and-paste-between-os-x-and-linux-virtualbox/

+1

あなたのチュートリアルでは、Xの下にコピーアンドペーストについて説明していますが、OPはGUIなしでLinuxコンソールについて質問しています。 – duozmo

+0

良いガイド、kali linuxはどうですか? –

+0

が見つかりました!それは調整のアプリの下にあった –

2

まず
Guest AdditionsのCD(Devices->Insert Guest Additions CD image)をインストールします。
を共有

アクティブクリップボードは、その後、再起動後、Virtualboxの中Machine->Settings->General->Advancedに行くと

その後、Vitualbox/Preferences/Input/Virtual Machine/Host Key Combination

Shared Clipboard: Bidrectional

変更VirtualBoxのホストキー
がかなった別の選択設定しました

キーマッピング:私は英語(Macintosh版)のキーボードを追加するためのcmd/ctrlマッピング用の
は、最も快適なソリューション:)

行く私はそれがキーボードにあるかもしれない古いバージョンで推測Ubuntu Settings->Text Entry
(にあると思われますレイアウト設定)
Input sources to use:の下でヒットプラス(+)
は、私はVirtualBoxの5.0.4

でのUbuntu 14.04.3 LTS 64ビットによEnglish (Macintosh)

を追加します

0

私はまとめましたa page describing how to do this

短いバージョンは、AppleScriptとカスタムキーボードショートカットを使用してこれを行うことができます。

AppleScriptは:

on run {input, parameters} 
    set input to input as text 
    tell application "System Events" 
     repeat with currentChar in the characters of input 
      set cID to id of currentChar 
      set used to false 
      repeat with r in {{48, 29}, {49, 18}, {50, 19}, {51, 20}, {52, 21}, {53, 23}, {54, 22}, {55, 26}, {56, 28}, {57, 25}, {45, 27}, {46, 47}, {47, 44}, {61, 24}} 
       if first item of r is equal to cID then -- 0-9 -./= 
        key code (second item of r) 
        set used to true 
       end if 
      end repeat 
      repeat with r in {{42, 28}, {43, 24}} -- *+ 
       if first item of r is equal to cID then 
        key code (second item of r) using shift down 
        set used to true 
       end if 
      end repeat 
      if not used then 
       keystroke currentChar 
      end if 
     end repeat 
    end tell 
    return input 
end run 

また、このスクリプトは愚かに貼り付けを防ぐパスワードフィールドを破っするのに便利です。

0

私はPuTTY、FileZillaなどと接続された仮想マシンで私のWindowsマシンからubuntuを使用します。それは端末エミュレータ・ウィンドウ、または実際の端末であり

### Setup Virtualbox: 
    https://www.virtualbox.org/wiki/Downloads 
    install ubuntu from their website 
### Launch Ubuntu from Virtualbox Console: 
    sudo apt-get install openssh-server 
    sudo systemctl start ssh 
    sudo systemctl status ssh 
    netstat -tulpn 
     # see ubuntu port 22 open and ssh running 
    sudo poweroff 
### Virtualbox: 
    settings - network - Advanced - Adapter Type: PCNet Fast 3 - Port Forwarding 
    Name: SSH, Protocol: TCP, Host Port (Windows): 3022, Guest Port (Ubuntu): 22 
    right click - start - headless start 
### PuTTY: 
    Seesion: Localhost Ubuntu: <your_user> -p 
     Host: <your_user>@127.0.0.1 
     Port: 3022 
    Window - Colums: 130, Rows: 24 
    Scrollback lines: 10000 
    Appearance - Cursor: Vertical + Blinks 
    Font Courier New - Regular - 12px 
    Behaviour - Window Title: Localhost Ubuntu 
    Full screen on ALT + ENTER 
    Connection Data - Auto login Username: <your_user> 
    Session - SAVE! 

### FTP: 
    Host: localhost 
    Port: 3022 
    SFTP (SSH FTP) 
    Logon Type: normal 
     <your_user> 
     <pass> 
    Transfer settings: limit max. conenction: 4 

### Git BASH: 
    ssh -p 3022 <your_user>@localhost 

### Enable SSH Root Login: (Use only on localhost, security advice!) 
    # Set a password for root account first and then enable root account: 
     sudo passwd root 
     sudo passwd -u root 
     # Reverting Back: (lock the root account) 
      sudo passwd -l root 
    # Enable SSH root login: 
     sudo nano /etc/ssh/sshd_config 
      # PermitRootLogin prohibit-password 
      PermitRootLogin yes 
     sudo systemctl restart ssh 

### Virtualbox Windows Headless Start 
    # Make a .lnk shortcut with target or .bat batch file 
    "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" startvm "UbuntuMin" --type headless 
    "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" controlvm "UbuntuMin" poweroff 
    Add shortcuts to start menu -> ubuntu START & STOP - change .ico - right click - pin to start 
関連する問題