레이블이 Windows인 게시물을 표시합니다. 모든 게시물 표시
레이블이 Windows인 게시물을 표시합니다. 모든 게시물 표시

2021년 8월 15일 일요일

OneDrive version 삭제

꽁자 5TB OenDrive 파일 버전 관리로 인해 용량이 줄어들때 일일히 버전 파일을 삭제 하기란 매우 힘든일이다.

PowerShell  에서 아래와 같이 한다.

SharePoint Online Client Components SDK 를 먼저 설치한다.

https://www.microsoft.com/en-us/download/details.aspx?id=42038


아래와 같이 PowerShell 스크립트를 실행하면 모든 버전 파일이 for loop 을 돌면서 삭제된다.

Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"

Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"

   

#Config Parameters

$SiteURL= "https://yoursharepont-my.sharepoint.com/personal/yourid_domain_com/"

$LibraryName="Documents"


#Setup Credentials to connect

$Cred = Get-Credential

$Cred = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.UserName,$Cred.Password)

  

    #Setup the context

    $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL)

    $Ctx.Credentials = $Cred

  

    #Get the web and Library

    $Web=$Ctx.Web

    $List=$web.Lists.GetByTitle($LibraryName)

   

    $Query = New-Object Microsoft.SharePoint.Client.CamlQuery

    $Query.ViewXml="<View Scope='RecursiveAll'><Query><Where><Eq><FieldRef Name='FSObjType'/><Value Type='Integer'>0</Value></Eq></Where></Query></View>"

    $ListItems = $List.GetItems($Query)

    $Ctx.Load($ListItems)

    $Ctx.ExecuteQuery() 

    

    #Loop through each file in the library

    Foreach($Item in $ListItems)

    {      

    Start-Sleep -s 1

        #Get all versions of the file

        $Ctx.Load($Item.File)       

        $Ctx.Load($Item.File.Versions)

        $Ctx.ExecuteQuery()

        Write-host "Processing Item:" $Item.file.Name

  

        #Delete all versions of the file

#        If($Item.File.Versions.count -gt 0)

#        {

            $Item.File.Versions.DeleteAll()

            $Ctx.ExecuteQuery()

            Write-host -f Green "All Versions deleted on "$Item.file.Name

Start-Sleep -s 3

#        }

    }   


Windows11 Update 후 windowsdefender 를 열려면 새 앱이 필요합니다.

PowerShell 관리자 모드로 창을 연후

Get-AppxPackage Microsoft.SecHealthUI -AllUsers | Reset-AppxPackage

이러면 다시 windowsdefender 데시보드 가 열림

2020년 3월 15일 일요일

ubuntu 데스크탑을 Windows 원격 데스크톱 으로 접속하기

sudo apt install xrdp

그렇지만 Windows 원격 데스크톱으로 로그온 하면
"색상 프로파일을 만들려면 인증이 필요합니다"
메시지가 무한 반복된다.


아래와 같이 권한을 넣어준후 xrdp 데몬 재시작 하면 해결됨

vi /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla
[Allow Colord all Users]
Identity=unix-user:*
Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile
ResultAny=no
ResultInactive=no
ResultActive=yes


2019년 7월 12일 금요일

OEM PC에서 Windows Pro 버전

OEM PC나 노트북에 Windows10 Home 이 내장된 경우엔 아무리 Pro 로 설치를 하려고 해도 Pro 버전 선택이 되질 않습니다.

설치 USB 스틱에 /sources 디렉토리에 ei.cfg 파일을 만들어 넣으면 됩니다.

ei.cfg 파일 내용은 아래와 같습니다.



텍스트에디터로 위에 내용을 ei.cfg 로 저장해서 /sources 디렉토리에 넣으시면 됩니다. 

2017년 12월 10일 일요일

Windows 10 Linux Bash 에서 XWindow manager 쓰기 (xfce4 manager 활용)

앞서 한글입력 부분에 대한것은 저의 블로그를 참조하시면 됩니다.
https://comhack.blogspot.kr/2017/12/windows-10-linux-bash-x-window.html

1. 한글 환경 만들기 
한글 환경을 한글 관련 언어팩 및 로케일 설정합니다.

sudo apt install language-pack-ko
sudo dpkg-reconfigure locales

ko_KR.UTF-8 UTF-8 선택후 로케일 생성후 기본 랭귀지로 선택


Generating locales (this might take a while)...
  ko_KR.UTF-8... done
Generation complete.

2. 윈도우매니저 선택 
gnome-session 등을 시도해봤지만 잘되지 않아 제대로 되는건 xfce4 였습니다.
xfce4 를 설치합니다.

sudo apt install xfce4

Xming 및 Xcxsrv 를 이용하여 미리 xorg 서버를 실행한후
(한글이 필요하면 입력기 미리 실행) xfce4-session 을 실행합니다.
앞서 아래와 같은 환경변수가 필요합니다.

export DISPLAY=:0
xfce4-session

저는 xcsrv xorg 서버를 "Multi windows mode" 를 이용했는데요 아래와 같습니다.


fcitx를 이용한 한글입력기 필요시엔 아래와 같인 설정후 실행합니다.
https://comhack.blogspot.kr/2017/12/windows-10-linux-bash-x-window.html 참조

export DISPLAY=:0
export XMODIFIERS=@im=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx

fcitx 실행
xfce4-session 실행

실행하고 firefox등에 자율롭게 한글을 입력할수 있습니다.


Windows 10 Linux Bash 에서 X-Window 한글입력하기

Windows 10 에서 Linux Bash 가 지원된다는것은 잘알고 계시죠?
1703 빌드부터는 Microsoft Store 에서 앱 형태로 다운받을 수 있습니다.

다만 X-Window 를 사용하는 방법에 대한 블로그나 글은 많은데 X-Window 에서 한글입력기를 완벽히 사용하는 방법에 대해서 블로그를 찾지 못해서 직접 작성하게 되었습니다.

아래 블로그를 찾았지만 잘 안되더군요.

https://medium.com/@rkttu/windows-10%EC%97%90%EC%84%9C-%EB%A6%AC%EB%88%85%EC%8A%A4%EC%9A%A9-%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%A8-%EC%84%A4%EC%B9%98%ED%95%98%EA%B3%A0-%EC%8B%A4%ED%96%89%ED%95%98%EA%B8%B0-2cb0d7892d12

직접 테스트한 결과는 아래와 같습니다.

1. xorg 서버 설치하기
우선 X-Window 를 위해서 xorg 서버 어플리케이션이 필요한데 아래 두가지를 선택할수 있습니다.

Xming https://sourceforge.net/projects/xming/
Vcxsrv https://sourceforge.net/projects/vcxsrv/


저는 Vcxsrv 를 선호합니다. 특별한 이유는 없습니다.

2. 한글 폰트 설치하기 
우선 한글을 잘나오게 위해서 한글 폰트를 설치합니다.
sudo apt install fonts-baekmuk fonts-nanum

3. 한글 입력기 설치하기

한글입력기는 여러가지 입력기를 시도해보았지만 fcitx 만 제대로 동작되었습니다.
sudo apt install fcitx-hangul

dbus-x11 에 의존적 이므로 아래를 설치해야합니다.
sudo apt install dbus-x11

4. 환경설정 
Windows에서 Xming 또는 VcXsrv를 먼저 시작하고 아래 환경변수를 줍니다.

export DISPLAY=:0
export XMODIFIERS=@im=fcitx

위에 XMODIFIERS 환경변수 세팅도 필요합니다.

.bashrc 에 미리 넣어두어도 좋을것 같네요

5. 테스트 

5.1 dbus 의존성 해결
fcitx 를 실행전 fcitx 는 dbus 메시지버스 시스템에 의존하므로 dbus 실행을 위한 machine-id 를 설정합니다.

sudo systemd-machine-id-setup
sudo dbus-uuidgen --ensure

fcitx 를 실행해봅니다. 아래와 같은 메시지후 뜨지 않습니다.
(WARN-5164 /build/fcitx-PSoVA1/fcitx-4.2.9.1/src/module/dbus/dbusstuff.c:195) Connection Error (/usr/bin/dbus-launch terminated abnormally without any error message)

그래서 아래의 링크를 참조하여 해결했습니다.
https://superuser.com/questions/1208984/sed-cant-read-etc-dbus-1-session-conf-input-output-error/1208999

아래 파일을 /etc/dbus-1/session.conf 에 복사한후 수정합니다.
https://www.apt-browse.org/browse/ubuntu/trusty/main/i386/dbus/1.6.18-0ubuntu4/file/etc/dbus-1/session.conf


아래와 명령으로 바로 수정하기
sudo sed -i 's/.*<\/listen>/tcp:host=localhost,port=0<\/listen>/' /etc/dbus-1/session.conf

fcitx 로 띄울시 아래에러에 시달린다면 저는 아래와 같이 해결했습니다.

[WARN] /tmp/SBo/fcitx-4.1.2/src/module/dbus/dbusstuff.c:83-Connection Error (/usr/bin/dbus-launch terminated abnormally without any error message)

sudo apt install dbus-x11


5.2 fcitx 실행 및 설정

아래 명령어로 fcitx를 실행합니다.
fcitx

fcitx-configtool 에서 "+" 로서 Hangul 선택합니다 한글입력방식은 여러가지가 있는데 꼭 "Hangul" 이어야 합니다.

아래 명령어로 실행
fcitx-configtool


영문입력도 하나 선택해줍니다. 아래와 같이 2개 입력이 되면 됩니다.



테스트로 한글 입력이 잘되는지 확인을 위해서 firefox 를 설치해봅니다.

5.3 firefox 로 한글입력 테스트 

firefox 를 설치합니다.

sudo apt-get install firefox

이제 한글 입력이 가능하며 언어 전환키는 기본값으로 CTRL+SPACE 입니다.
fcitx-configtool 에서 언제든기 변환 가능합니다.


2017년 12월 7일 목요일

Windows 10 에서 최근 사용된 파일 표시 없애기

Windows 10 에서 최신 사용된 파일이나 폴더가 계속 있으면 편리하나 가끔 보안상 좋지 않는 경우가 발생한다. 아래와 같은 항목을 체크 해제 해주면 된다.


파일탐색기에서 마우스 우클릭 하여 옵션 클릭 그림1 참조
[그림1]


아래 그림2 에 항목제거
빠른 실행에 최근에 사용된 파일 표시 체크해제
빠른 실행에 최근에 사용된 폴더 표시 체크해제

[그림2]



또한 최근 사용된 어플리케이션에 나오는 최근 열어본 항목들은 (최근 문서)
설정 => 개인설정 => 시작 으로 들어가서
그림 3과 같이 그면 된다.

[그림3]








2008년 1월 11일 금요일

이 기종간 키보드 마우스 공유하기

Synergy - http://synergy2.sourceforge.net/

Synergy lets you easily share a single mouse and keyboard between multiple computers with different operating systems, each with its own display, without special hardware. It's intended for users with multiple computers on their desk since each system uses its own monitor(s).

Redirecting the mouse and keyboard is as simple as moving the mouse off the edge of your screen. Synergy also merges the clipboards of all the systems into one, allowing cut-and-paste between systems. Furthermore, it synchronizes screen savers so they all start and stop together and, if screen locking is enabled, only one screen requires a password to unlock them all. Learn more about how it works.

Synergy is open source and released under the GNU Public License (GPL).

System Requirements
  • Microsoft Windows 95, Windows 98, Windows Me (the Windows 95 family)
  • Microsoft Windows NT, Windows 2000, Windows XP (the Windows NT family)
  • Mac OS X 10.2 or higher
  • Unix
    X Windows version 11 revision 4 or up
    XTEST extension(use "xdpyinfo grep XTEST" to check for XTEST)
All systems must support TCP/IP networking.

"Unix" includes Linux, Solaris, Irix and other variants. Synergy has only been extensively tested on Linux and may not work completely or at all on other versions of Unix. Patches are welcome (including patches that package binaries) at the patches page.

The Mac OS X port is incomplete. It does not synchronize the screen saver, only text clipboard data works (i.e. HTML and bitmap data do not work), the cursor won't hide when not on the screen, and there may be problems with mouse wheel acceleration. Other problems should be filed as bugs.

자세한 사용 방법은 아래의 블로그 참조
http://jwmx.tistory.com/833

Stream Your PC Games to a Samsung TV — Sunshine + Moonlight Setup Guide (Free GeForce Now Alternative)

Stream Your PC Games to a Samsung TV — Sunshine + Moonlight Cloud gaming like GeForce Now costs a monthly subscription. But what if you u...