cupholder

command module
v1.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2026 License: GPL-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

cupholder

Build Go Report Card License

Local or remote CD tray ejection, for Linux.

cupholder can be useful:

Usage

cupholder

Or when building a project that takes a while, as a notification utility:

<build command>; cupholder

For specifying a specific device:

cupholder /dev/cdrom

All arguments are treated as device filenames.

Use -s for silent operation and set the NO_COLOR environment variable to disable colors.

Screenshot

cupholder in action

Web server

cupholder includes a web server that can be launched with the -l or --listen flag, that lets you eject the CD remotely, just by visiting the HTTP page at port 3280 (3280 = 0x0CD0).

webpage

For ejecting the tray using curl, a command like this can then be used:

curl --silent --output /dev/null --write-out '%{http_code}\n' http://localhost:3280/

Replace localhost with the hostname or IP address of the server where cupholder -l is running.

Requirements

  • Go 1.25 or later

General info

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址