0 Star 0 Fork 0

大地小神/vim

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0jupyter-qtconsole.sh 773 Bytes
一键复制 编辑 原始数据 按行查看 历史
大地小神 提交于 2020-04-08 14:50 +08:00 . QRS: save
#!/bin/bash
pidfile=/tmp/jupyter_qtconsole.pid
use_xvfb=1
if [[ x$1 != x ]]
then
use_xvfb=$1
fi
# if [[ x$use_xvfb == 1 ]]
# then
# pid=`ps a | grep "Xvfb" | grep ":$DISPLAY_ID" | cut -d\ -f2`
#
# if [[ x$pid == x ]]
# then
# Xvfb :$DISPLAY_ID -ac -screen 0 640x480x8 &
# sleep 1
# fi
# fi
if [ ! -f $pidfile ]
then
touch $pidfile
fi
pid=`cat $pidfile`
if [[ x$pid != x ]]
then
ret=`ps -p $pid | tail -n 1 | grep qt`
if [[ x$ret != x ]]
then
kill -9 $pid
fi
fi
if [[ x$use_xvfb == x1 ]]
then
xvfb-run -a -s "-screen 0 300x300x8" jupyter qtconsole --no-confirm-exit --no-banner >/dev/null 2>&1 &
else
jupyter qtconsole --no-confirm-exit --no-banner >/dev/null 2>&1 &
fi
echo "$!" > $pidfile
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lidongai/vim.git
git@gitee.com:lidongai/vim.git
lidongai
vim
vim
master

搜索帮助