学海人生的博客

书山有路勤为径,学海无涯苦作舟。


  • 首页

  • 分类

  • 标签

  • 归档

  • 关于

  • 搜索

解决打开浏览器老是输入密码和卡死问题

发表于 2018-05-18 | 更新于: 2018-05-20 | 分类于 Linux , ArchLinux , gnome-keyring , Google-Chrome |
字数统计: 206 | 阅读时长 ≈ 1

最近打开google-chrome浏览器老是输入密码和卡死问题,经过排查,确定与gnome-keyring有关。

怎么解决呢?

1
2
3
4
5
6
7
8
sudo pacman -S seahorse libsecret gnome-keyring
seahorse #gnome-keyring管理工具的GUI
libsecret #用于存储和检索密码和其他秘密的库,与gnome-keyring有关,某些程序可能需要libgnome-keyring
你必须将它(gnome-keyring-daemon)添加到守护进程,具体操作请将参考下面连接。一句话,开机运行这个命令gnome-keyring-daemon就可以了
https://wiki.archlinux.org/index.php/GNOME/Keyring
https://wiki.gnome.org/Projects/GnomeKeyring
把lonin设置为锁定(这个工具好像有bug,pam模式下改密码会闪退)
至于把lonin密码设置为空,与上面没有任何关系。如果这样做的话,只要能够访问该文件夹的都能看到密码

使用Fstab管理多个硬盘开机自动挂载

发表于 2018-05-06 | 更新于: 2018-05-06 | 分类于 Linux , ArchLinux , Fstab |
字数统计: 1k | 阅读时长 ≈ 4

参考资料

操作方式

1
2
3
4
5
6
先使用mkdir 创建/media/HD 
sudo mkdir /media/HD #这种方式创建分区随便什么用户都能用,但是只能读,下面会解决只能读的问题(这里的用户是指系统帐号)
cd /media/HD
sudo chmod 666 HD #把所创建的文件转可读写,而且是所有者可以读写(之前我被坑了,查资料无果,最后自己解决)
sudo nano /etc/fstab
<file system> <dir> <type> <options> <dump> <pass> #写入相关设置

文件示例

一个简单的 /etc/fstab,使用内核名称标识磁盘:

1
2
3
4
5
6
7
/etc/fstab
--
# <file system> <dir> <type> <options> <dump> <pass>
tmpfs /tmp tmpfs nodev,nosuid 0 0
/dev/sda1 / ext4 defaults,noatime 0 1
/dev/sda2 none swap defaults 0 0
/dev/sda3 /home ext4 defaults,noatime 0 2

字段定义

/etc/fstab 文件包含了如下字段,通过空格或 Tab 分隔:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<file system>	<dir>	<type>	<options>	<dump>	<pass>
<file systems> - 要挂载的分区或存储设备.
<dir> - <file systems>的挂载位置。
<type> - 要挂载设备或是分区的文件系统类型,支持许多种不同的文件系统:ext2, ext3, ext4, reiserfs, xfs, jfs, smbfs, iso9660, vfat, ntfs, swap 及 auto。 设置成auto类型,mount 命令会猜测使用的文件系统类型,对 CDROM 和 DVD 等移动设备是非常有用的。
<options> - 挂载时使用的参数,注意有些 参数是特定文件系统才有的。一些比较常用的参数有 (mount(8)):
auto - 在启动时或键入了 mount -a 命令时自动挂载。
noauto - 只在你的命令下被挂载。
exec - 允许执行此分区的二进制文件。
noexec - 不允许执行此文件系统上的二进制文件。
ro - 以只读模式挂载文件系统。
rw - 以读写模式挂载文件系统。
user - 允许任意用户挂载此文件系统,若无显示定义,隐含启用 noexec, nosuid, nodev 参数。
users - 允许所有 users 组中的用户挂载文件系统.
nouser - 只能被 root 挂载。
owner - 允许设备所有者挂载.
sync - I/O 同步进行。
async - I/O 异步进行。
dev - 解析文件系统上的块特殊设备。
nodev - 不解析文件系统上的块特殊设备。
suid - 允许 suid 操作和设定 sgid 位。这一参数通常用于一些特殊任务,使一般用户运行程序时临时提升权限。
nosuid - 禁止 suid 操作和设定 sgid 位。
noatime - 不更新文件系统上 inode 访问记录,可以提升性能(参见 atime 参数)。
nodiratime - 不更新文件系统上的目录 inode 访问记录,可以提升性能(参见 atime 参数)。
relatime - 实时更新 inode access 记录。只有在记录中的访问时间早于当前访问才会被更新。(与 noatime 相似,但不会打断如 mutt 或其它程序探测文件在上次访问后是否被修改的进程。),可以提升性能(参见 atime 参数)。
flush - vfat 的选项,更频繁的刷新数据,复制对话框或进度条在全部数据都写入后才消失。
defaults - 使用文件系统的默认挂载参数,例如 ext4 的默认参数为:rw, suid, dev, exec, auto, nouser, async.
<dump> dump 工具通过它决定何时作备份. dump 会检查其内容,并用数字来决定是否对这个文件系统进行备份。 允许的数字是 0 和 1 。0 表示忽略, 1 则进行备份。大部分的用户是没有安装 dump 的 ,对他们而言 <dump> 应设为 0。
<pass> fsck 读取 <pass> 的数值来决定需要检查的文件系统的检查顺序。允许的数字是0, 1, 和2。 根目录应当获得最高的优先权 1, 其它所有需要被检查的设备设置为 2. 0 表示设备不会被 fsck 所检查。

What is Markdown?

发表于 2018-05-03 | 更新于: 2018-05-03 | 分类于 Blog , MarkDown |
字数统计: 504 | 阅读时长 ≈ 3

推荐GitHub的makrdown教程

GitHub相关总教程
如果你能手动把这个教程拷到blog,那就是入门了

  • Headers

    1
    2
    3
    # This is an <h1> tag
    ## This is an <h2> tag
    ###### This is an <h6> tag
  • Emphasis

    1
    2
    3
    4
    5
    6
    7
    *This text will be italic*
    _This will also be italic_

    **This text will be bold**
    __This will also be bold__

    _You **can** combine them_
  • Lists

    • Unordered
      1
      2
      3
      4
      * Item 1
      * Item 2
      * Item 2a
      * Item 2b
  • Ordered

    1
    2
    3
    4
    5
    1. Item 1
    1. Item 2
    1. Item 3
    1. Item 3a
    1. Item 3b
  • Images

    1
    2
    ![GitHub Logo](/images/logo.png)
    Format: ![Alt Text](url)
  • Links

    1
    2
    http://github.com - automatic!
    [GitHub](http://github.com)
  • Blockquotes

    1
    2
    3
    4
    As Kanye West said:

    > We're living the future so
    > the present is our past.
  • Inline code

    1
    I think you should use an`<addr>` element here instead.
  • Syntax highlighting

Here’s an example of how you can use syntax highlighting with GitHub FlavoreMarkdown:

1
2
3
4
5
function fancyAlert(arg) {
if(arg) {
$.facebox({div:'#foo'})
}
}

You can also simply indent your code by four spaces:

    function fancyAlert(arg) {
      if(arg) {
        $.facebox({div:'#foo'})
      }
    }

Here’s an example of Python code without syntax highlighting:

1
2
3
def foo():
if not bar:
return True
  • Task Lists

    1
    2
    3
    4
    - [x] @mentions, #refs, [links](), **formatting**, and <del>tags</del> supported
    - [x] list syntax required (any unordered or ordered list supported)
    - [x] this is a complete item
    - [ ] this is an incomplete item

    If you include a task list in the first comment of an Issue, you will get a handy progress indicator in your issue list. It also works in Pull Requests!

  • Tables
    You can create tables by assembling a list of words and dividing them with hyphens - (for the first row), and then separating each column with a pipe |:

    1
    2
    3
    4
    First Header | Second Header
    ------------ | -------------
    Content from cell 1 | Content from cell 2
    Content in the first column | Content in the second column

    Would become: (这表格太丑了)

First Header Second Header
Content from cell 1 Content from cell 2
Content in the first column Content in the second column
  • SHA references
    Any reference to a commit’s SHA-1 hash will be automatically converted into a link to that commit on GitHub.

    1
    2
    3
    16c999e8c71134401a78d4d46435517b2271d6ac
    mojombo@16c999e8c71134401a78d4d46435517b2271d6ac
    mojombo/github-flavored-markdown@16c999e8c71134401a78d4d46435517b2271d6ac
  • Issue references within a repository
    Any number that refers to an Issue or Pull Request will be automatically converted into a link.

    1
    2
    3
    #1
    mojombo#1
    mojombo/github-flavored-markdown#1
  • Username @mentions

    1
    Typing an @ symbol, followed by a username, will notify that person to come and view the comment. This is called an “@mention”, because you’re mentioning the individual. You can also @mention teams within an organization.
  • Automatic linking for URLs

    1
    Any URL (like http://www.github.com/) will be automatically converted into a clickable link.
  • Strikethrough

    1
    Any word wrapped with two tildes (like ~~this~~) will appear crossed out.

ArchLinux下的Yaourt神器

发表于 2018-05-02 | 更新于: 2018-05-03 | 分类于 Linux , ArchLinux , Yaourt |
字数统计: 315 | 阅读时长 ≈ 1

Yaourt是一个pacman前端,如果配合中国特色软件仓库,我相信你一定会慢慢喜欢上它
参考官方介绍
参考使用说明文档

安装yaourt(中国)

网易ArchLinuxcn安装说明

使用说明

编辑/etc/pacman.conf, 在文件末尾添加以下内容(操作前请做好相应备份)

1
2
3
[archlinuxcn]
SigLevel = Optional TrustedOnly
Server = http://mirrors.163.com/archlinux-cn/$arch

之后安装 archlinuxcn-keyring 包导入 GPG key

1
pacman -Syu yaourt archlinuxcn-keyring fakeroot

archlinuxcn-keyring是软件包签名,没了它,部分中国特有的东西会安装失败
fakeroot是临时检测工具,它会调用临时sudo,使用虚拟sudo安装环境来检测该包是否有恶意代码,同时避免因为使用管理员权限sudo导致系统不可恢复的各种滚挂问题


老司机专用源(一但yaourt搜不到的,请使用国外的东西)

1
2
3
4
5
6
7
8
9
10
11
[archlinuxcn]
SigLevel = Optional TrustedOnly
##仓库主地址
#Server = http://repo.archlinuxcn.org/$arch
##或使用CDN(测试版)
#Server = https://cdn.repo.archlinuxcn.org/$arch
##或者安装archlinuxcn-mirrorlist-git并使用镜像列表
#Include = /etc/pacman.d/archlinuxcn-mirrorlist
##163源
Server = http://mirrors.163.com/archlinux-cn/$arch

相关链接

中国官方主页: https://github.com/archlinuxcn/repo
中国官方仓库地址: http://repo.archlinuxcn.org

grub2美化

发表于 2018-05-01 | 更新于: 2018-05-02 | 分类于 Linux , Grub |
字数统计: 196 | 阅读时长 ≈ 1

Introduction-of-documents English document

说明

这是一个grub2的主题

如何安装grub2主题

要求环境:efi+gpt、archlinux
我的分区:

复制文件Griffin-Grub-v2.0到/boot/grub/themes/分区下,里面有个脚本,会自动处理theme主题文件

1
2
3
4
命令:
cd /boot/grub/themes/Griffin-Grub-v2.0/
chmod +x Install-Arch.sh #一般可以忽略,能用就行
sudo ./Install-Arch.sh

没有然后了,直接reboot,就可以看到了。
备注:如果你是Ubuntu,一般情况,请把上面Install-Arch.sh换成Install-Ubuntu.sh

更新内容

本Grub-Themes基于githun里的Shenron007/Grub-Themes源文件修改的
链接:https://github.com/Shenron007/Grub-Themes/tree/griffin-grub
只是将grub-update命令改为grub-mkconfig -o /boot/grub/grub.cfg
并未做其它任何修改

更新时间:20180502

ArchBang安装指南

发表于 2018-05-01 | 更新于: 2018-05-01 | 分类于 Linux , ArchBang |
字数统计: 736 | 阅读时长 ≈ 3

安装步骤

1.电脑是efi启动,gpt硬盘(无论有多少硬盘)
2.把archbang烧录在U盘里
3.调整好相关的bios(efi启动方式,不要使用混合启动)
4.选择使用带CD的第一选项
5.进入桌面,连接WIFI,可以打开火狐浏览器(如果遇到无法连接无线,可以使用本地连接,甚至你可以把手机当成本地网卡)
6.右击桌面,里面有个安装程序
7.这里一共十个选项,在安装前请考虑好分区方案(最少俩个分区,这俩个分区分别是/boot和/)
8.如果要安装启动分区位置,建议选择/boot/efi分区。(这个坑坑了我很多次,虽然前面安装archlinux很熟练,wiki里不是所有内容都是正确的。如果是同样的安装Archlinux环境,选择到boot分区很正常!wiki也没说明必须要安装到/boot/efi分区上。
9.pacstrap -i /mnt base base-devel gvfs gvfs-mtp wqy-zenhei
这里添加了中国特殊国情的基础包,有对连接硬盘和安卓的支持,还有中文字体
10.对于中文化,我个人建议,如果对archlinux安装流程不熟练的话,建议你先使用英文环境,不然会乱码。看不清出问题的原因。老鸟请无视,估计知道原因也会盲打。安装完毕后,重启,进入archbang系统
11.sudo l3afpad /etc/pacman.d/mirrorlist 或者sudo pcmanfm
l3afpad、pcmanfm分别是archbang自带的文本读取器和文件管理器,原命令是sudo nano /etc/pacman.d/mirrorlist把中国的所有源前面的#去除
12.sudo pacman -Syyu
更新源
13.pacman -Qq | grep xf86-video
已经安装的查看显卡
14.lspci | grep VGA
查看支持的显卡
15.pacman -Ss xf86-video | less
显示网络服务器里的所有最新显卡版本
16.pacman -S 显卡名称
安装最新显卡 参考pacman -S xf86-video-intel
17.sudo pacman -Syu
进行系统全面更新,-Syu表示进行系统更新,不然玩Ubuntu去
18.sudo pacman -S fcitx fcitx-im fcitx-configtool fcitx-googlepinyin
安装中文输入法
19.sudo l3afpad ~/.xinitrc

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

export DE=openbox

# Dbus fix
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
eval "$(dbus-launch --sh-syntax --exit-with-session)"
fi

/usr/bin/xdg-user-dirs-update

# 这里是输入法
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx

exec openbox-session

20.将/etc/xdg/autostart/里的输入法图标复制到~/.config/autostart/
21.sudo l3afpad ~/.config/openbox/autostart

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# panel
tint2 &

# Set wallpaper
(sleep 2 && feh --bg-scale ~/Backgrounds/snowtree.jpg) &

# Enable as required
#xbacklight -set 100 &
#/usr/bin/synclient TouchpadOff=1 &
#setxkbmap us &

# Onscreen system stats
(sleep 2 && conky) &

# Network Manager Applet
(sleep 2 && nm-applet) &

# File manager dameon mode
(sleep 2 && pcmanfm -d) &

# Effects
#(sleep 2 && compton -b) &

# Volume
(sleep 2 && volumeicon) &

# 这里是输入法
fcitx &

22.如果因为Zsh原因无法自动登录
sudo l3afpad ~/.bash_profile

1
2
3
if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
exec startx
fi

`

您好!我来了!

发表于 2018-05-01 | 更新于: 2022-03-25 | 分类于 Blog |
字数统计: 32 | 阅读时长 ≈ 1

这是一个很平常的2018年,但是今天是个好日子,我的个人静态博客正式开启了。

ArchBang官方送的残本指南

发表于 2018-05-01 | 更新于: 2018-05-01 | 分类于 Linux , ArchBang |
字数统计: 568 | 阅读时长 ≈ 3

ArchBang_Guide

==这是安装arcbbang完毕送的指南==

Welcome to ArchBang linux

Information here is as up to date as possible.

===Pacman===

Pacman will not work live correctly until you set up your local mirror. Open a terminal [Super+t] and run:

sudo mousepad /etc/pacman.d/mirrorlist

Uncomment your nearest server to your country/region and then run:

sudo pacman -Syyu

This will refresh package database and allow you to install any package available.

sudo pacman -Ss <package_name> # search for a named package

    sudo pacman -S <package_name> # install a named package

====Installation====

ArchBang comes with a menu driven installer abinstall to install simply open a terminal [Super+t] and run

sudo abinstall

Note storage drives must have partitions and filesystems created first.

====Video drivers====

This is optional remove xorg video drivers that were shipped with ArchBang by typing:

Note the following drivers listed may not be up to date

You can check what drivers you have installed by running

pacman -Qq | grep xf86-video

sudo pacman -R xf86-video-apm xf86-video-ark xf86-video-ast
xf86-video-ati xf86-video-chips xf86-video-cirrus
xf86-video-dummy xf86-video-fbdev xf86-video-glint
xf86-video-i128 xf86-video-i740 xf86-video-intel-uxa
xf86-video-mach64 xf86-video-mga xf86-video-neomagic
xf86-video-nv xf86-video-r128 xf86-video-rendition
xf86-video-s3 xf86-video-s3virge xf86-video-savage
xf86-video-siliconmotion xf86-video-sis xf86-video-sisusb
xf86-video-tdfx xf86-video-trident xf86-video-tseng
xf86-video-v4l xf86-video-vesa xf86-video-vmware
xf86-video-voodoo xf86-video-xgi xf86-video-xgixp
ati-dri intel-dri mach64-dri mga-dri r128-dri
savage-dri sis-dri tdfx-dri

To know your video chipset type in terminal

lspci | grep VGA

Track it down in the list by typing in terminal as root:

pacman -Ss xf86-video | less

Install your video driver:

pacman -S your_video_driver

====Maximum Brightness====

If you want maximum brightness at boot, uncomment the following in
~/.config/openbox/autostart
xbacklight -set 100 &

====Sound====

If you don’t get any sound you can right click on volume icon on panel then
‘Open Mixer’ or in a terminal run
alsamixer
To unmute a channel press M to raise levels use up and down keys. To exit and
save hit Escape key

====Disable Blank Screen After 10 Minutes====

To disable blank screen after 10 minutes of inactivity, create a file in
/etc/X11/xorg.conf.d called custom.conf with this code:

Section “ServerFlags”

disable low-level screensaver and screen DPMS poweroff

Option "BlankTime" "0"
Option "StandbyTime" "0"
Option "SuspendTime" "0"
Option "OffTime" "0"

EndSection

====Update the system====

Open a terminal [Super+t] and type:
sudo pacman -Syyu

====Have Fun!====

Everything about Arch isn’t covered in this guide of course so check the Arch Wiki [https://wiki.archlinux.org/]

Hello World

发表于 2018-04-30 | 更新于: 2022-03-25 |
字数统计: 75 | 阅读时长 ≈ 1

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment

<i class="fa fa-angle-left"></i>123

29 日志
25 分类
56 标签
RSS
0%
© 2022 虔诚的信徒 | Site words total count: 11k