Category Archives: Linux

Enable transmission-daemon logging to file

If you use transmission-daemon on your Raspberry Pi and want to have logs to a file, you can follow a few simple steps to accomplish this:

Edit the service file:

sudo vim /lib/systemd/system/transmission-daemon.service

Change the ExecStart line to look like this:

ExecStart=/usr/bin/transmission-daemon -f --log-debug --logfile /var/log/transmission.log

You can choose between these options:

Show error messages
Show error and info messages
Show error, info, and debug messages

systemctl will complain that the service file was changed. Run:

sudo systemctl daemon-reload

to reload units.

Create the log file and assign the correct ownership and permissions:

sudo touch /var/log/transmission.log
sudo chown debian-transmission /var/log/transmission.log
sudo chmod 644 /var/log/transmission.log

Restart the service:

sudo service transmission-daemon restart

Have fun!

Add syntax color to crontab editor

You might be wondering why you don’t have syntax coloring when you are editing crontab entries.
This can be solved very simply by specifying your editor before starting crontab:

export EDITOR=vim

The change can be made persistent across the whole system if you add that line on the /etc/bashrc file.
You you only need this change for certain users only, add the line to their local ~/.bashrc files.

Disable recent documents in Gtk2/Gtk3

Use the following to disable recent documents in Gtk2/Gtk3:

echo 'gtk-recent-files-max-age=0' | tee -a $HOME/.gtkrc-2.0
echo 'gtk-recent-files-max-age=0' | tee -a $HOME/.config/gtk-3.0/settings.ini

The ugly part is that there is no way one can disable ‘Recently Used’ in the GtkFileChooser dialog box.


Quick way to convert Mbox mailboxes to Maildir format

A quick way to convert Mbox mailboxes to Mbox format is to use mb2md.
Install it in Ubuntu/Debian using:

sudo aptitude install mb2md

To make the convertion use:

mb2md -m

From man:

       -m        If this is used then the source will be the single mailbox at /var/spool/mail/blah for user blah and the destination mail‐
                 box will be the "destdir" mailbox itself.

Nice and simple!

Bash script to backup my configs (dotfiles)

I needed some script to take care of my config files and put them in a single directory. So here it is.

# Display All Hidden Dot Files In a Directory
# ls -a | egrep "^\." >
DESTINATION="/storage/dotfiles"  # do not use a trailing slash (/)
# Colors
# file list (use trailing slash for directories)
for file in $FILES
   if [ -d $file ]; then
      mkdir -p $DESTINATION/$file
      cp -f $HOME/$file* $DESTINATION/$file
   elif [ -f $file ]; then
      cp -f $HOME/$file $DESTINATION
      echo -e "$red:: $file is not a file/directory! $reset"
echo -e "$green:: Done! $reset"
exit 0

Moved to ArchLinux!

Moved my ThinkPad T61 to ArchLinux! (Still using Ubuntu on many other machines.)

I will post some install script I used to configure my system.

Liferea custom stylesheet

I don’t like very much the default font used by Liferea, so I decided to use my custom font. Here is how:
1. Copy the default stylesheet to liferea folder in my $HOME:

cp /usr/share/liferea/css/liferea.css $HOME/.liferea_1.6

2. Add this:

	font-family: Aurulent Sans;

at the begining of liferea.css file.

This is how it looks now:

Of course, you can also play with all the other options in the liferea.css.
Have fun!

Just installed Archlinux on my ThinkPad T61

I’ve installed Archlinux on my ThinkPad T61 about a week ago and so far I am impressed.
I will post more info about the tweaks and customisations I’ve done to make everything work.
Check out the screenshots page.

Quick gnome tweaks

Here are some tweaks for your gnome:

Print all subdirectories and entries under a dir, recursively:

gconftool-2 -R /

Change GDM font:

sudo -u gdm gconftool-2 --set --type string \
/desktop/gnome/interface/document_font_name "Ubuntu"
sudo -u gdm gconftool-2 --set --type string \
/desktop/gnome/interface/font_name "Ubuntu"
sudo -u gdm gconftool-2 --set --type string \
/desktop/gnome/interface/monospace_font_name "Monospace"

Change GDM backgound:

sudo -u gdm gconftool-2 --set --type string \
/desktop/gnome/background/picture_filename "/path/to_image"

Set default gnome terminal size in Lucid Lynx

Use these commands to change the default gnome terminal size:

gconftool-2 --set /apps/gnome-terminal/profiles/Default/default_size_columns \
--type integer 160
gconftool-2 --set /apps/gnome-terminal/profiles/Default/default_size_rows \
--type integer 50

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.