2017-01-06 12 views
0

도움을 주시면 감사하겠습니다. Chrome 캐시를 RAM 디스크로 이동하려고하는데 지시에 따라 작업하고 있습니다. 은/etc/MDM/PostSession/기본 "중지 /etc/init.d/ramdisksaverestore"추가 -Linux - 사용자 지정 스크립트를 사용자 지정로드 상태로 SDDM에 넣으십시오.

GDM (그놈 디스플레이 관리자) 또는 MDM : 그것은 내 디스플레이 관리자의 설정에이 방법을 스크립트를 둘 필요가 말한다 추가 /etc/lightdm/lightdm.conf "세션 정리 스크립트 = 중지 /etc/init.d/ramdisksaverestore" "[SeatDefaults]"섹션의 끝에서 - 라인 "출구 0"

LightDM 전에.

그러나 SDDM과 함께 Linux Mint 18 KDE (Ubuntu 기반)를 사용하고 어디에서 스크립트를 작성해야하는지 잘 모릅니다. (파일과 라인 모두를 의미합니다). 어떤 도움이 필요합니까?

어쩌면 내가/usr/share/sddm/scripts/Xsession에 넣어야하지만 어디서 어떻게?

#! /bin/sh 
# Xsession - run as user 

# This file is extracted from kde-workspace (kdm/kfrontend/genkdmconf.c) 
# Copyright (C) 2001-2005 Oswald Buddenhagen <[email protected]> 

session=$1 

# Note that the respective logout scripts are not sourced. 
case $SHELL in 
    */bash) 
    [ -z "$BASH" ] && exec $SHELL $0 "[email protected]" 
    set +o posix 
    [ -f /etc/profile ] && . /etc/profile 
    if [ -f $HOME/.bash_profile ]; then 
     . $HOME/.bash_profile 
    elif [ -f $HOME/.bash_login ]; then 
     . $HOME/.bash_login 
    elif [ -f $HOME/.profile ]; then 
     . $HOME/.profile 
    fi 
    ;; 
*/zsh) 
    [ -z "$ZSH_NAME" ] && exec $SHELL $0 "[email protected]" 
    [ -d /etc/zsh ] && zdir=/etc/zsh || zdir=/etc 
    zhome=${ZDOTDIR:-$HOME} 
    # zshenv is always sourced automatically. 
    [ -f $zdir/zprofile ] && . $zdir/zprofile 
    [ -f $zhome/.zprofile ] && . $zhome/.zprofile 
    [ -f $zdir/zlogin ] && . $zdir/zlogin 
    [ -f $zhome/.zlogin ] && . $zhome/.zlogin 
    emulate -R sh 
    ;; 
    */csh|*/tcsh) 
    # [t]cshrc is always sourced automatically. 
    # Note that sourcing csh.login after .cshrc is non-standard. 
    xsess_tmp=`mktemp /tmp/xsess-env-XXXXXX` 
    $SHELL -c "if (-f /etc/csh.login) source /etc/csh.login; if (-f ~/.login) source ~/.login; /bin/sh -c 'export -p' >! $xsess_tmp" 
    . $xsess_tmp 
    rm -f $xsess_tmp 
    ;; 
    *) # Plain sh, ksh, and anything we do not know. 
    [ -f /etc/profile ] && . /etc/profile 
    [ -f $HOME/.profile ] && . $HOME/.profile 
    ;; 
esac 

[ -f /etc/xprofile ] && . /etc/xprofile 
[ -f $HOME/.xprofile ] && . $HOME/.xprofile 

# run all system xinitrc shell scripts. 
if [ -d /etc/X11/xinit/xinitrc.d ]; then 
    for i in /etc/X11/xinit/xinitrc.d/* ; do 
    if [ -x "$i" ]; then 
    . "$i" 
    fi 
    done 
fi 

# Load Xsession scripts 
# OPTIONFILE, USERXSESSION, USERXSESSIONRC and ALTUSERXSESSION are required 
# by the scripts to work 
xsessionddir="/etc/X11/Xsession.d" 
OPTIONFILE=/etc/X11/Xsession.options 
USERXSESSION=$HOME/.xsession 
USERXSESSIONRC=$HOME/.xsessionrc 
ALTUSERXSESSION=$HOME/.Xsession 

if [ -d "$xsessionddir" ]; then 
    for i in `ls $xsessionddir`; do 
     script="$xsessionddir/$i" 
     echo "Loading X session script $script" 
     if [ -r "$script" -a -f "$script" ] && expr "$i" : '^[[:alnum:]_-]\+$' > /dev/null; then 
      . "$script" 
     fi 
    done 
fi 

if [ -d /etc/X11/Xresources ]; then 
    for i in /etc/X11/Xresources/*; do 
    [ -f $i ] && xrdb -merge $i 
    done 
elif [ -f /etc/X11/Xresources ]; then 
    xrdb -merge /etc/X11/Xresources 
fi 
[ -f $HOME/.Xresources ] && xrdb -merge $HOME/.Xresources 

case $session in 
    "") 
    exec xmessage -center -buttons OK:0 -default OK "Sorry, $DESKTOP_SESSION is no valid session." 
    ;; 
    *) 
    eval exec "$session" 
    ;; 
esac 
exec xmessage -center -buttons OK:0 -default OK "Sorry, cannot execute $session. Check $DESKTOP_SESSION.desktop." 

답변