以普通用户登陆时,如何让Firestarter自动启动

通常状况下,当你点击Firestarter的图标或者手动从终端中启动Firestarter时,会提示你输入管理员密码。可是这样实在是有点烦人,尤 其是你想每次登陆都启动firestarter时。Firestarter能够在你以普通用户登陆的状况下自动加载在后台运行,而且最小化到系统托盘图 标,而不须要向你询问密码。

给用户运行Firetarter而不须要Root密码的许可

为了让普通用户能够运行Firetarter,普通用户必须被给予额外的特权。用你最喜欢的编辑器编辑“/etc/sudoers”,而且在最后添加下面一段:

username ALL= NOPASSWD: /usr/bin/firestarter

注意:Debian用户须要将上面一段中的“/usr/bin/firestarter”替换为“/usr/sbin/firestarter”

将"username"替换成须要登陆的普通用户登陆名。上文中指定的用户能够运行Firestarter而不会再被提示输入密码或者使用命令行:sudo firestarter。

安 全方面的一点点注意:这种方法是将本地安全同便捷作了交换,若是你的登陆账户被攻击者破解了,那么攻击者将会控制Firestarter。 However this method is preferable to having a shared root user password in a multiuser setting. It is also preferable if the alternative is not to run Firestarter at all.

登陆时运行Firesarter并最小化至系统托盘:

若是已经设置了上面的许可,那么系统能够继续设置为当你用普通账户登陆时自动运行Firetarter。那样的话,Firetarter能够自动运行至系统托盘中,而不须要用户的干涉,以后能够点击系统托盘图标打开主界面。

Gnome设置:
打开Gnome的“系统”菜单,选择“首选项”里的“会话”,切换到“启动程序”选项卡。
点击“添加”,并输入:“sudo firestarter --start-hidden”做为启动程序的命令,点击“肯定”,结束设置。

很简单的只须要将刚才输入的列从表中删除就能够在登陆时不自动启动Firestarter.

Kde设置:
打开终端并执行下面两行命令:
echo -e '#'\!'/bin/sh\nsudo firestarter --start-hidden' > ~/.kde/Autostart/firestarter
chmod a+x ~/.kde/Autostart/firestarter

如今Firestarter就能够随着KDE一块儿启动了。若是要终止随着KDE启动,只需删除下面这个文件:“~/.kde/Autostart/firestarter”。

译者注:水平有限,万望海涵。E-mail:kongweiguo@gmail.com
附原文以下:
How can I get Firestarter to load automatically when I log in as a regular user?

Normally when you start Firestarter by clicking an icon or manually from a terminal, the system will prompt you for your root user's password. However, this is a bit of a hassle, especially if you want to run Firestarter all the time when logged in. In that case Firestarter can be loaded in the background when you log in with your regular user, without asking a password and minimized to the system tray (pictured right).
Giving the user permission to launch Firestarter without the root password

In order for a regular user to be able to launch Firestarter, the user must be given additional privileges. Edit your /etc/sudoers file in your favorite text editor and add the following line at the end:
username ALL= NOPASSWD: /usr/bin/firestarter

Note: Debian users should replace /usr/bin/firestarter with /usr/sbin/firestarter in the above line.

Simply replace username with whatever your login is. The specified user is now able to launch Firestarter without being prompted for a password using the command sudo firestarter.

A note on the security aspects: This method makes a trade off in local security for convenience. If your user account becomes compromised the attacker will be able to control the firewall. However this method is preferable to having a shared root user password in a multiuser setting. It is also preferable if the alternative is not to run Firestarter at all.
Launching Firestarter minimized to the tray on login

Having performed the above configuration of permissions, the system can further be set up to load Firestarter when you log in with your regular user account. Firestarter will in that case load directly into the system tray without user intervention, after which the main interface can be accessed by clicking the tray icon.

Using GNOME:
Open up your GNOME menu, select Preferences followed by Sessions. Switch to the Startup programs tab, pictured right.

Click Add and enter
sudo firestarter --start-hidden
as the startup command. Click OK and you're done.

To stop Firestarter from loading on login, simply remove its entry from the startup programs listing.

Using KDE:

Open a terminal and execute the following two commands:

echo -e '#'\!'/bin/sh\nsudo firestarter --start-hidden' > ~/.kde/Autostart/firestarter
chmod a+x ~/.kde/Autostart/firestarter

Firstarter will now load automatically when KDE starts. To stop Firestarter from loading when you log in, remove the ~/.kde/Autostart/firestarter file. iamif 2008-3-1 16:20

在kde环境下,能够保存上次会话的session,在下次登录中会自动运行的. 只须要用visudo命令改变用户的执行权限就能够了.promise

相关文章
相关标签/搜索