CANNASERVER(1)

πŸ’– CANNASERVER(1) πŸ’–

okay bestie, so this is cannaserver from the General Commands Manual, and she is literally the Kana-Kanji conversion server. sit down, hydrate, let's get into it πŸ“


✨ NAME ✨

cannaserver β€” the Kana-Kanji conversion server, periodt πŸ‘‘


🌸 SYNOPSIS 🌸

cannaserver [-d] [-u userid] [-inet] [-inet6] [-l n] [-syslog] [-p num]
[ddpath]

πŸ¦‹ DESCRIPTION πŸ¦‹

so cannaserver(1) is the whole reason you can do Kana-Kanji conversion, she provides the service. no cap. and most of the time? you're not even the one starting her β€” this daemon usually gets launched by whatever daemon bootup framework your system uses, like /etc/rc depending on your setup. so like, you do not usually start it up manually. it's giving "she's already awake, don't touch her" 😭

by default, cannaserver(1) only accepts connections from clients on the same host where the server is running (via UNIX domain socket). she's lowkey exclusive like that. but if you want her accessible from other hosts via TCP, you use option -inet (or -inet6). and whether you use that option or not, you can still get access control based on user and host using /etc/hosts.canna β€” she checks IDs at the door πŸ’…

cannaserver(1) immediately forks and gets into the background after it starts. so no, you do not need to use & explicitly to make it run in the background. she does it herself, main character energy fr fr ✨

when she starts, cannaserver(1) creates the UNIX domain socket /tmp/.iroha_unix/IROHA[:num] to communicate with clients. that socket gets deleted automatically if cannaserver(1) terminates normally. but β€” and this is the messy part πŸ™ˆ β€” the socket may still exist while cannaserver(1) is not running (because, for example, cannaserver(1) terminated abnormally). in that case you have to delete the file manually, or you literally cannot start her. like she's blocked by her own ghost πŸ’€

/var/lib/canna/dic/*/dics.dir includes the list of dictionaries which are available to clients. users (i.e. clients) can choose which to use and specify them in ~/.canna. pick your faves, bestie πŸŽ€


πŸŽ€ OPTIONS πŸŽ€

  • ddpath β€” specifies the directory that contains dictionaries.
  • -inet β€” this option lets cannaserver(1) accept connections from remote hosts using inet domain socket (IPv4). by default, cannaserver(1) uses only UNIX domain socket, i.e. only clients in your local machine can connect to the server. so like, she's homebody-coded unless you flip this 🌸
  • -inet6 β€” enable IPv6. if this option is used solely, IPv4 access is disabled. if you want to use IPv4 at the same time, use both -inet and -inet6. it's giving "both, or neither, no in-between" πŸ’…
  • -l n β€” outputs the cannaserver(1) log to /tmp/canna.log. n (1 to 5) specifies the log level. so you're picking how chatty she is, from 1 to 5 πŸ—£οΈ
  • -d β€” starts cannaserver(1) in debug mode. it is executed as the foreground process. log data at log level 5 is output to the standard output. she's not hiding in the background anymore, she's performing live on your terminal ⭐
  • -u userid β€” specifies which user cannaserver(1) runs as. by default, cannaserver(1) runs as the user who started cannaserver(1). so like, whoever launched her is her identity unless you say otherwise 🫢
  • -syslog β€” outputs the cannaserver(1) log to syslogd(8). if you specify this option, logs are not output to /var/log/canna/CANNA?msgs. pick a lane bestie 😭
  • -p num β€” by this option cannaserver(1) uses the port number 5680 + num. the default port number is 5680. this option also has an effect on the filename of the socket and the log file. see below πŸ‘‡

🌈 FILES 🌈

  • /tmp/.iroha_unix/IROHA[:num] β€” socket. the [:num] part is added only when you specify -p. no -p, no suffix, simple as πŸ¦‹
  • /var/lib/canna/dic/*/dics.dir β€” dictionary directory.
  • /etc/hosts.canna β€” access control file. the bouncer at the door πŸ’…
  • /var/log/canna/CANNA?msgs β€” log file. "?" is replaced with num specified with -p, and defaults to 0 without -p num. log messages are not output to this file when -syslog is specified. so it's either this file or syslog, never both, no cap πŸ’€
heads up bestie: that stale socket in /tmp/.iroha_unix/IROHA[:num] is the #1 reason a start will just refuse to work. if cannaserver(1) died abnormally, delete the file manually or she will not boot. fr fr.

πŸ‘‘ SEE ALSO πŸ‘‘

cannakill(1), cannastat(1), cannacheck(1), cshost(1)

go read them, they're the friend group πŸ’–


okay that's the whole page!! this was CANNASERVER(1) from the General Commands Manual, and yes the footer is also just CANNASERVER(1) because she's iconic enough to sign her own name and nothing else. slay, mwah, go start your daemon πŸ’‹πŸŒˆβœ¨

πŸ“¦ where this page comes from