Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Friday, August 27, 2010

Very short about using transmission-daemon

The transmission-daemon program is a daemon-based Transmission session that can be controlled via IPC commands by transmission-remote(1) [1]. This program is used by default in FreeNAS, and maybe you want to use it on Linux box. It's very likely you distribution come with transmission by default. In that case, you need to install transmission-daemon only:

# apt-get install transmission-daemon


Configuration file is /var/lib/transmission-daemon/info/settings.json (it's quiet safe to add *.*.*.* to rpc-whitelist option). After editing (user, password, paths, etc), we need to reload the daemon itself:

# /etc/init.d/transmission-daemon reload

Using remote client was discussed before [2].
Note: transmission-daemon configuration is very well documented on this web site. You are recommended to read (at least to feel the power of FreeNAS's web interface).

1. man transmission-daemon
2. Cross-platform transmission-remote-gui

Friday, August 20, 2010

Disable unused console (tty) when using Upstart init daemon

There are not /etc/inittab anymore, but /etc/init/ttyN.conf (N from 1 to 6). Just comment out the last line in each file you desire. For example (in /etc/init):

$ cat tty1.conf
# tty1 - getty
#
# This service maintains a getty on tty1 from the point the system is
# started until it is shut down again.

start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]

respawn
exec /sbin/getty -8 38400 tty1

$ cat tty1.conf | wc -l
10

$ sed -i '10 s/^/#/' tty{2,3,4,5,6}.conf

Please tell me other command lines to do the last job.
P.S. in an Ubuntu box Ctrl+Alt+Backspace now is Right Alt (Alt Gr) + Print Screen + k.

Saturday, March 28, 2009

How a non-root user can use apt-get download-only feature?

Some time all you need is just getting required *.deb files to install some programs, for example, to another system that don't have Internet connection. Of course, under root you can use --download-only parameter as:

# apt-get --download-only install wesnoth

(or on Ubuntu $ sudo apt-get --download-only install wesnoth)

Then copy downloaded files from /var/cache/apt/archives. But even if you don't have root permissions the following pipe gives you desired result:

$ apt-get --yes --print-uris install wesnoth | grep --regex 'tp://.*deb' | cut -d ' ' -f1 | sed "s/^'//g;s/'$//g" | wget -i -

As you can see, wget accept URL from input (stdin) with -i option.