Section1.3 Examples

Examples

  • Examples
    • Some Dependencies problems
    • VMWare Host share folder with Guest
    • Majaro ssh
    • LaTex Software
    • Install ibus
    • cannot copy
    • database

Some Dependencies problems

#list all the packages that gtkmm depends and require:
pacman -Qi open-vm-tools
#or
pacman -Si open-vm-tools

#Cannot change display setting:
sudo pacman -S gnome-control-center

#Cannot paste from VMWare host:
sudo pacman -S gtkmm
sudo pacman -S open-vm-tools

VMWare Host share folder with Guest

#to check
vmware-hgfsclient

#mkdir
mkdir -p /home/grey/Shared

#mount
sudo vmhgfs-fuse -o allow_other -o auto_unmount -o uid=1000 -o gid=1000 .host:/VMShared /home/grey/Shared
//a automate C program for above purpose
#include 
#include 
#include 

int main()
{
    //check the hgfs service
    if (system("vmware-hgfsclient")==-1) {
       printf("Please turn on VMWare Shared Folder, then try again\n");
       return 0;
    }

    //get the current user's name
    char path[60];
    sprintf(path,"/home/%s/Shared",getenv("USER"));

    //if director /home/userName/Shared doesn't exit, make one
    if (access(path,0)!=0) {
        char mkSharedir[100];
        sprintf(mkSharedir,"mkdir -p %s",path);
        system(mkSharedir);
    }

    //do the mount(connet the maked directory with the VMware shared folder VMShared)
    char finalCmd[200];
    sprintf(finalCmd,"sudo vmhgfs-fuse -o allow_other -o auto_unmount -o uid=1000 -o gid=1000 .host:/VMShared %s",path);
    system(finalCmd);
}

Majaro ssh

Open ssh in ArchLinux

#Linux默认安装openssh-server

#start sshd
systemctl start sshd

#check locally
ssh grey@localhost

#when local login in, means success

#in Mac Terminal
ssh [email protected]

#in Linux Terminal
ssh [email protected]

#finally test ip
ifconfig
#another method

#start the service
service sshd start
service sshd status

#stop the service
service sshd start

In windows,借助putty

putty.png

LaTex Software

Latex01.png

Install ibus

sudo pacman -S ibus
sudo pacman -S ibus-libpinyin
ibus-setup
#add chinese
#in region&language, add chinese

cannot copy

#run this one
pacman -S gtkmm

gedit /etc/xdg/autostart/vmware-user.desktop
[Desktop Entry]
Type=Application
Encoding=UTF-8
Exec=/usr/bin/vmware-user-suid-wrapper
Name=VMware User Agent
# KDE bug 190522: KDE does not autostart items with NoDisplay=true...
# NoDisplay=true
X-KDE-autostart-phase=1

database

#install mariaDB
yaourt mariaDB

#install MySQL Workbench
yaourt workbench

config database

你可能感兴趣的:(Section1.3 Examples)