我想创建一个我每次安装Xubuntu时都可以运行的文件,这样我就可以更轻松地完成设置了。所以我创建了一个python文件,其中包含以下文本来安装软件,然后我设置权限并运行该文件。 它没有要求我的密码,也没有做任何事情。我确定我没有安装谷歌浏览器。
代码:
#!/usr/bin/python
import os
os.system('cd /tmp')
os.system('wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb')
os.system('sudo dpkg -i google-chrome-stable_current_amd64.deb')
os.system('sudo apt-get -f install')
更新:
我把它重写为shell脚本:
#!/bin/bash
sudo apt-get update
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt-get -f install
sudo apt purge gnome-software gnome-sudoku gnome-mines thunderbird pidgin firefox libreoffice
sudo add-apt-repository ppa:mystic-mirage/pycharm
sudo apt-add-repository ppa:richardgv/compton
sudo apt-get update
sudo apt-get install pycharm-community gnome-boxes compton synaptic abiword gnumeric ubuntu-restricted-extras
compton -CG
我想知道是否有一行可以添加,以便在启动时启动合成器compton和XFCE终端。