Help answer threads with 0 replies.
Go Back > Blogs > catkin
User Name


Uncategorized Entries with no category

rsync server boot/control script

Posted 12-25-2010 at 01:14 AM by catkin


I couldn't find one to suit anywhere so wrote this.

It is not really needed during shutdown because all it does is send SIGTERM to all the rsync server processes and the Linux shutdown process does that anyway. rsync server processes are well behaved and do terminate quickly in response to SIGTERM so there's no need to check that the processes have terminated and escalate to SIGKILL (which the Linux shutdown process does anyway).

It is hardly...
LQ 5k Club
Posted in Uncategorized
Views 1203 Comments 0 catkin is offline

Terminal icon for root with hash in screen

Posted 12-22-2010 at 02:55 AM by catkin
Tags hash, icon, root, screen

In case anybody is looking for one (I was and could not find one anywhere), the attachments are terminal icons with a hash (#) character.

This is not my area of expertise so improvement suggestions are welcome. Is PNG the best format for icons? Is 48x48 a good size choice?

In case anyone is curious how it was made, Terminal.svg was copied and loaded in Gimp. Most of the shading was removed (plain black background is more distinct at small display sizes such as in...
Attached Images
File Type: png Terminal_hash 160x160.png (1.7 KB, 5 views)
File Type: png Terminal_hash_48x48.png (892 Bytes, 60 views)
LQ 5k Club
Posted in Uncategorized
Views 1223 Comments 0 catkin is offline

Getting a timestamp string in a Windows cmd.exe variable

Posted 12-12-2010 at 01:31 PM by catkin

This technique was developed to generate a timestamp string for rsync's --backup-dir option but it could be generally useful.

The first issue is that the value of %DATE% depends on Windows' regional settings so is not portable. The same goes for the output format of cmd.exe's builtin command date. (one example of many discussions: this StackOverflow thread). There is no way to program around this in a .BAT or .CMD script. The chosen solution was to UnxUtils' date.exe which is a...
LQ 5k Club
Posted in Uncategorized
Views 4446 Comments 0 catkin is offline

Thunar custom actions including "root terminal here" without gksudo

Posted 11-18-2010 at 11:54 AM by catkin
Updated 11-20-2010 at 02:36 AM by catkin (Changed title to mention gksudo)

Here's a way to implement Thunar custom actions using rxvt unicode (urxvt) but could be adapted to other terminal emulators. It has been used to provide:
  • Terminal here
  • root terminal here
  • vi
  • vi as root
Optionally it allows the custom action to set background colour and a fullscreen window.

Caveats: the mechanism is "proof of concept" and not widely tested at the time of posting. It is designed for use on a workstation with a single user.

The key to...
LQ 5k Club
Posted in Uncategorized
Views 1373 Comments 0 catkin is offline

Sendmail: send-only when local system has no domain name

Posted 10-13-2009 at 02:04 PM by catkin
Updated 10-18-2009 at 01:31 PM by catkin


EDIT: this works but causes sendmail to pause for ~1 minute when it can't find its own FQDN; this slows boot (if sendmail is started at boot and not backgrounded) and would be un-workable on a busy mail server.

Here's how to configure sendmail to send mails when the computer is configured with a hostname but no domain name. It may be of use, for example, if you want to mail system exception reports and do not want to configure the computer as being part of a...
LQ 5k Club
Posted in Uncategorized
Views 7794 Comments 0 catkin is offline


All times are GMT -5. The time now is 10:38 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration