Screen 操作快捷键

Posted 9 months, 2 weeks ago at 11:32 am. 0 comments

Screen 操作快捷键

* ctrl-a c:创建一个新的 Shell
* ctrl-a ctrl-a:在 Shell 间切换
* ctrl-a n:切换到下一个 Shell
* ctrl-a p:切换到上一个 Shell
* ctrl-a 0…9:同样是切换各个 Shell
* ctrl-a d:退出 Screen 会话

via Screen:Shell 孵化器

Popularity: 8% [?]

Tags:

ssh,vnc 反向连接

Posted 9 months, 2 weeks ago at 11:32 am. 0 comments

反向连接不需要网关映射,因此不需要惊动网管大人,这样我就可以从家里(ADSL)连接控制单位局域网中的我的机器…
嘿嘿…坏处就是,两头都要有人…
感谢 pal(小时)蹲在我家里帮忙测试。

ssh 反向连接

如果没有安装 ssh的话,安装之

sudo apt-get install ssh

被控端,执行

ssh -f -N -R 10000:localhost:22 guoshuang@xxx.xxx.xxx.xxx

控制端执行
ssh guoshuang@localhost -p 10000

参考此文

vnc 反向连接

其实只要网关(防火墙)没有关掉 5500 就可以。注意:是5500能出去即可,不是进来,所以一般都是开放的。

sudo apt-get install x11vnc

控制端执行下面命令,等待邀请

vncviewer -listen

被控端,主动发起邀请

x11vnc -connect xxx.xxx.xxx.xxx:5500

参考此文

windows 和 mac 下的软件可参考下文

Free and easy remote access (through firewalls and NAT routers) with VNC reverse connections
内网远程控制全攻略

注意:vncviewer -fullscreen 模式全屏连接 vnc,用 f8 或者 ctrl+esc esc 退出。即便如此,也会经常出现不能退出或者控制失灵的情况,这篇 patch: fix WM bindings for vncviewer -fullscreen 应该有些帮助

或者使用 xvnc4viewer(sudo apt-get install xvnc4viewer)而不是tightvnc viewer。

f8 和窗口控制都没问题。

Popularity: 37% [?]

Tags: , , , , , , , ,

linux shell 快捷方式

Posted 9 months, 2 weeks ago at 11:32 am. 0 comments

原文来自 Bash Shell Keyboard Shortcuts For Linux Users,大部分快捷方式我以前一无所知…

# Ctrl + A - Go to the beginning of the line you are currently typing on
# Ctrl + E - Go to the end of the line you are currently typing on
切到命令行开始|结尾

# Ctrl + L - Clears the Screen, similar to the clear command
清屏,类似于 clear 命令

# Ctrl + U - Clears the line before the cursor position. If you are at the end of the line, clears the entire line.
清除光标以前

# Ctrl + H - Same as backspace
退格键 backspace

# Ctrl + R - Let’s you search through previously used commands
从命令历史中找

# Ctrl + C - Kill whatever you are running
终止命令

# Ctrl + D - Exit the current shell
退出 shell

# Ctrl + Z - Puts whatever you are running into a suspended background process. fg restores it.
??

# Ctrl + W - Delete the word before the cursor
清除光标之前

# Ctrl + K - Clear the line after the cursor
清除光标之后

# Ctrl + T - Swap the last two characters before the cursor
# Esc + T - Swap the last two words before the cursor
切换光标前最后两个字母(单词)

# Alt + F - Move cursor forward one word on the current line
# Alt + B - Move cursor backward one word on the current line
??在 ubuntu x windows终端中会切换到菜单!tty 可能可以

# Tab - Auto-complete files and folder names
自动补全

# Ctrl + Y - to paste it (as in delete and copy) all text in front of the cursor
粘贴(刚才 ctrl+w 或者 ctrl+k 的内容)

# Esc + . (or Esc + Underscore) - Insert Last Argument
??

# Ctrl + b - Move back a character
# Ctrl + f - Move forward a character
向前|后移动一个字母

# Ctrl + r - Search the history backwards
??
# Ctrl + xx - Move between EOL and current cursor position
光标在当前位置和 EOL 之间切换(EOL end of line?但我实验,是在开头和当前位置之间切换,怎么理解?谁知道?)

# Ctrl + x @ - Show possible hostname completions

# Alt +
# Alt + > - Move to the last line in the history

# Alt + ? - Show current completion list

# Alt + * - Insert all possible completions

# Alt + / - Attempt to complete filename

# Alt + . - Yank last argument to previous command

# Alt + c - Capitalize the word

# Alt + d - Delete word

# Alt + l - Make word lowercase

# Alt + n - Search the history forwards non-incremental

# Alt + p - Search the history backwards non-incremental

# Alt + r - Recall command

# Alt + t - Move words around

# Alt + u - Make word uppercase

# Alt + back-space - Delete backward from cursor

# Here “2T” means Press TAB twice

# $ 2T - All available commands(common)

# $ (string) 2T - All available commands starting with (string)

# $ /2T - Entire directory structure including Hidden one

# $ 2T - Only Sub Dirs inside including Hidden one

# $ *2T - Only Sub Dirs inside without Hidden one

# $ ~2T - All Present Users on system from “/etc/passwd”

# $ $2T - All Sys variables

# $ @2T - Entries from “/etc/hosts”

# $ =2T - Output like ls or dir

Popularity: 28% [?]

Tags: , , , , , , ,

ubuntu 下的 gmail notifier

Posted 9 months, 2 weeks ago at 11:32 am. 0 comments

sudo apt-get install checkgmail

即可。这个比下面的 gmail-notify 功能更多一些,可以直接查看最近的一些邮件,发信等等。

二、gmail-notify

sudo apt-get install gmail-notify

更适合等信。

三、直接用 livebookmark 订阅自己的邮箱,只要有firefox就可以了,win 下也可如此。我以前主要用这种方式。

https://mail.google.com/mail/feed/atom

BTW:建立 checkmail 菜单操作如下

sudo gedit /usr/share/applications/checkgmail.desktop

内容如下:

[Desktop Entry]
Encoding=UTF-8
Name=CheckGmail
Exec=checkgmail
Terminal=false
Type=Application
StartupNotify=true
Icon=
Categories=Application;Network;

然后刷新 gnome 菜单

sudo killall gnome-panel

checkgmail 的图标图片在 gmail 图标 可以找到。

相关日志:

gmail IMAP 协议设置

checkgmail 资料

How do I play a sound when new mail arrives?

Enter a command in the “Command to execute on new mail” section in the preferences. For example, to play a WAV sound, you could use

aplay /path/to/mysound.wav
What else can the “Command to execute on new mail” do?

Well, it can do whatever you want. I use it to turn on my laptop’s dedicated mail LED light:

echo 1 > /proc/acpi/asus/mled

but anyone with the Blinkd software package installed could get their numlock or scroll-lock lights to blink with

blink –numlock –rate %m

What’s that ‘%m’ thing doing there? Well, that’s a new feature of version 1.10.1, and represents the number of new messages. Which means that in the example above your numlock LED will blink with the number of new messages. It’s gimmicky, I know (and there’s no way I could live with it personally) … but you’ve gotta admit, it’s kinda cool! :)

If you’re going to turn an LED on, though, you’ll also want to turn it off - and that’s why there’s also a “Command to execute for no mail” option. In the example above, you’ll want something like

blink –numlock –rate 0

And of course, you can combine options together by using semicolons, for example:

aplay /path/to/mysound.wav; blink –numlock –rate %m

The whole idea is to be as extensible here as possible, and recognise that not everyone wants a sound to play when new mail arrives, but they might want something else to happen instead …

Popularity: 33% [?]

Tags: , , , , , , , ,

phpftpwho 查看 proftpd 登录用户信息

Posted 9 months, 2 weeks ago at 11:32 am. 0 comments

前提是有 apache,proftpd(Professional FTP daemon)和php(ubuntu LAMP 默认就有),若没有先安装。

sudo apt-get install apache2
sudo apt-get install proftpd
sudo apt-get install php5

这里下载 phpftpwho,解压后拷贝到 /var/www 目录中。用http://xxx.xxx.xxx.xxx/phpftpwho/ 访问即可。

Popularity: 19% [?]

Tags: , , , ,

feisty 安装 NTFS 分区写入支持

Posted 9 months, 2 weeks ago at 11:32 am. 0 comments

读 ntfs 分区本来就没问题。要加入NTFS分区写入支持,在 feisty 中很容易。直接安装 ntfs-config 即可

sudo apt-get install ntfs-config

打开 系统工具 - NTFS 写入支持配置程序,勾选 启用内(外)部设备写支持即可。以后就可以写 NTFS 分区了。

Widows NTFS Partitions Read/write support made easy in Ubuntu Feisty

相关日志:

windows 查看 linux 分区工具
windows 访问ubuntu 目录 SMB

Popularity: 34% [?]

Tags: , , , , , , , ,

gnome-open 用法介绍

Posted 9 months, 2 weeks ago at 11:32 am. 0 comments


原文来自 http://ubuntu.wordpress.com/2006/12/16/gnome-open-open-anything-from-the-command-line/

倒霉的中国孩子…wordpress.com 似乎不能访问了…

还好找到个中文翻译版 gnome-open 的一些妙用

gnome-open (alt+f2)很类似于 windows 下的 开始 -运行(win+r)。

在终端运行 gnome-open 是一回事。

gnome-open http://…
gnome-open mailto://a@a.com
gnome-open file:///home/guoshuang
gnome-open /home/guoshuang

分别是打开浏览器、发邮件、nautilus文件管理器

gnome-open file:///home/guoshuang/1.avi

播放1.avi

alt+f2 与终端 #gnome-open 区别在于,当前目录不同。alt+f2 在根目录。

BTW:我一直都把 ubuntu 的 win+r 映射成了 打开终端,似乎不太合理啊,应该改成这个才对,:)

Popularity: 16% [?]

Tags: , , , ,

设置 ubuntu 连接移动存储设备的运行方式

Posted 9 months, 2 weeks ago at 11:32 am. 0 comments

系统-首选项-可移动驱动器和介质,可以设置连接移动设备时,处理方式。

BTW:

gnomenettool

devices → 顯示目前網路設備
● ping → 可讓你去 ping 任何一個 ip
● Netstate → 顯示目前的網路情況,
● Traceroute → 顯示連結到某一 ip 的路由路徑
● Port Scan → 這個大家應該都了解,可查出某個 ip 所開放的 port 服務
● Lookup → 和 nslookup 指令類示,不過顯示更多的資訊
● Finger → 查看使用者資訊,這在目前前應該沒什麼用了,因為基於安全問題一般都會關掉
● Whois → 查看某個 ip 或網域名稱的資料

Popularity: 13% [?]

Tags: , , ,

Debian windows installer

Posted 9 months, 2 weeks ago at 11:32 am. 0 comments

Windows 下的 Debian 安装器。goodbye-microsoft.com,与此同时,ubuntu的windows installer 也在开发中,这下安装 linux 就更加容易了…

BTW:The Windows-based uninstaller is now working(ubuntu)





Popularity: 16% [?]

Tags: , , , ,

ubuntu 字体选项

Posted 9 months, 2 weeks ago at 11:32 am. 0 comments

单色

# Monochrome: Renders fonts in black and
white only. The edges of characters might appear jagged in some cases because
the characters are not antialiased. Antialiasing is
an effect that is applied to the edges of characters to make the characters
look smoother.

最佳形状(普通CRT显示器)

#Best shapes: Antialiases fonts where
possible. Use this option for standard Cathode Ray Tube (CRT) monitors.

最佳对比

#Best contrast: Adjusts fonts to give
the sharpest possible contrast, and also antialiases fonts, so that characters
have smooth edges. This option might enhance the accessibility of the GNOME
Desktop to users with visual impairments.

次像素平滑(液晶显示器)

#Subpixel smoothing (LCDs): Uses techniques
that exploit the shape of individual Liquid Crystal Display (LCD) pixels to
render fonts smoothly. Use this option for LCD or flat-screen displays.

Popularity: 20% [?]

Tags: , , , , , ,

ad 468x60