For a cheap Chinese 3G modem, which has a builtin USB mass storage device with Windows drivers, I have a generic linux install manual that tells me to
"Plug in your modem in USB port , on inserting you will notice icon on your desktop screen , right click on it and eject it.
However, my Ubuntu is a server without GUI. Which commands does the GUI call when I click "eject" on an USB mass storage device?
usb_modeswitch
does that automatically.