Linux help req'd - Cups server

Author
Discussion

skeggysteve

Original Poster:

5,724 posts

219 months

Friday 28th September 2007
quotequote all
I'm not very good at Linux, well I'm almost useless and my Linux guru (Son) is back at Uni and grumpy with me.

So could anyone help me with this - answers in very simple terms would be good biggrin
Running Gentoo and KDE.

I've just tried to print a letter and my printers have gone from the Open Office print box, there is only 'Generic printer' there.

So I look in Control Center/Peripherals/Printers and my printers have gone. Try to add a printer and it won't let me it just says:
...............................
An error occurred while retrieving the list of available backends:

Connection to CUPS server failed. Check that the CUPS server is correctly installed and running.
...............................

I have no idea what 'backends' are - well not in the Linux sense!

I'm guessing that the Cups server is not running so how do I start it?

BTW I have tried the reboot option.

TheLearner

6,962 posts

237 months

Friday 28th September 2007
quotequote all
su
<your root password>
/etc/init.d/cpusd start
or
/etc/init.d/cupsd restart

rc-update add cupsd default


skeggysteve

Original Poster:

5,724 posts

219 months

Friday 28th September 2007
quotequote all
TheLearner said:
su
<your root password>
/etc/init.d/cpusd start
or
/etc/init.d/cupsd restart
Luckly I know it's 'su -' wink

But I get this:
....................
pcone ~ # /etc/init.d/cpusd start
-su: /etc/init.d/cpusd: No such file or directory
pcone ~ # /etc/init.d/cpusd restart
-su: /etc/init.d/cpusd: No such file or directory
.................

TheLearner said:
rc-update add cupsd default
I get this:

........................
pcone ~ # rc-update ad cupsd default
* rc-update: gimme something to do!
usage: rc-update -a|add script runlevel1 [runlevel2 ...]
rc-update -d|del script [runlevel1 ...]
rc-update -s|show [-v|--verbose] [runlevel1 ...]

examples:
# rc-update add net.eth0 default
Adds the net.eth0 script (in /etc/init.d) to the "default" runlevel.

# rc-update del sysklogd
Deletes the sysklogd script from all runlevels. The original script
is not deleted, just any symlinks to the script in /etc/runlevels/*.

# rc-update del net.eth2 default wumpus
Delete the net.eth2 script from the default and wumpus runlevels.
All other runlevels are unaffected. Again, the net.eth2 script
residing in /etc/init.d is not deleted, just any symlinks in
/etc/runlevels/default and /etc/runlevels/wumpus.

# rc-update show
Show all enabled scripts and list at which runlevels they will
execute. Run with --verbose to see all available scripts.
pcone ~ #
...............

I like the sense of humor "gimme something to do!"

TheLearner

6,962 posts

237 months

Friday 28th September 2007
quotequote all
skeggysteve said:
TheLearner said:
su
<your root password>
/etc/init.d/cpusd start
or
/etc/init.d/cupsd restart
Luckly I know it's 'su -' wink

But I get this:
....................
pcone ~ # /etc/init.d/cpusd start
-su: /etc/init.d/cpusd: No such file or directory
pcone ~ # /etc/init.d/cpusd restart
-su: /etc/init.d/cpusd: No such file or directory
.................

TheLearner said:
rc-update add cupsd default
I get this:

........................
pcone ~ # rc-update ad cupsd default
* rc-update: gimme something to do!
usage: rc-update -a|add script runlevel1 [runlevel2 ...]
rc-update -d|del script [runlevel1 ...]
rc-update -s|show [-v|--verbose] [runlevel1 ...]

examples:
# rc-update add net.eth0 default
Adds the net.eth0 script (in /etc/init.d) to the "default" runlevel.

# rc-update del sysklogd
Deletes the sysklogd script from all runlevels. The original script
is not deleted, just any symlinks to the script in /etc/runlevels/*.

# rc-update del net.eth2 default wumpus
Delete the net.eth2 script from the default and wumpus runlevels.
All other runlevels are unaffected. Again, the net.eth2 script
residing in /etc/init.d is not deleted, just any symlinks in
/etc/runlevels/default and /etc/runlevels/wumpus.

# rc-update show
Show all enabled scripts and list at which runlevels they will
execute. Run with --verbose to see all available scripts.
pcone ~ #
...............

I like the sense of humor "gimme something to do!"
Interesting.

Actually it's su to just become superuser and 'su -' to become superuser with path. Su will also, usually, keep the to the same path your in.

Anyway, moving on.

ls /etc/init.d and see if cups is there, I could have the daemon name wrong.
If now, its not there then:

emerge -p cups

It might bring in Samba (I know Samba brings in cups but I don't know if it's also a reverse dependency) and let it rip.

Then do the above.

skeggysteve

Original Poster:

5,724 posts

219 months

Friday 28th September 2007
quotequote all
Sarah,

Thanks for the reply but I've had another Sarah around tonight to ask advice about selling a car so will get back to you tomorrow.

BTW I'm married and she's friend of the wifes and came with wine so.....


cyberface

12,214 posts

259 months

Saturday 29th September 2007
quotequote all
Sarah bunged a typo in the first service start, by putting cpusd instead of cupsd...

Equally you appear to have typo'd the rc-update command by typing 'rc-update ad cupsd default' with 'add' spelt incorrectly...

The daemon is definitely called cupsd (I'm at a bit of a disadvantage as I run OS X which is BSD-like rather than Linux-like when it comes to system services (i.e. OS X doesn't use /init.d) - but the same code should be run, since that where us Apple freaks stole it from)

You'd probably find cupsd in /usr/sbin/cupsd if you want to check it's been installed.

Otherwise, with Gentoo, rock on, you're on your own, download the source and compile it wink Cool choice of distro BTW.

KDE may have a setup for it but Sarah is right about the 'emerge' advice.

smile

zaktoo

805 posts

209 months

Saturday 29th September 2007
quotequote all
I suspect cupsd is installed, just not running currently for whatever reason. Try" service cupsd start" although I'm not sure what distros that syntax is common across.

Is gentoo a sysv init type distro? I suspect it is, so you could try

find /etc -name "*cupsd*"

(leave the " marks intact)

And then execute whichever it finds with the word start appended.

HTH

TheLearner

6,962 posts

237 months

Saturday 29th September 2007
quotequote all
zaktoo said:
I suspect cupsd is installed, just not running currently for whatever reason. Try" service cupsd start" although I'm not sure what distros that syntax is common across.

Is gentoo a sysv init type distro? I suspect it is, so you could try

find /etc -name "*cupsd*"

(leave the " marks intact)

And then execute whichever it finds with the word start appended.

HTH


It's not a full on SysV distro. Init scripts are stored in /etc/init.d but their aren't the usual rc?.d directories (a la Debian, RH and such). Process starting is either a direct fire method /etc/init.d/<name> start|stop|restart or runlevel controlled via rc-update. It's a freaky little distro but I used to use it for everything... until I got pissed off compiling everything and the annoyance of upgrading between revisions.

I suspect, if cups is installed then it's either not running, or their is something freaky going on in KDE/OpenOffice... which is where I'd have to bow out as it's been a way long time since I used KDE in anger.

skeggysteve

Original Poster:

5,724 posts

219 months

Saturday 29th September 2007
quotequote all
Many thanks for the replies.
I copied and pasted Sarah's instructions complete with typo!
Cyberface thanks for spotting it!
Just did the:
/etc/init.d/cupsd start
And I've got my printers back.
BTW I never knew about the su with out the - told you I wasn't very good at Linux!
Anyway thanks to all of you for the help.

TheLearner

6,962 posts

237 months

Saturday 29th September 2007
quotequote all
If you had to start it. "rc-update add cupsd default" That way it'll restart everytime you boot.

skeggysteve

Original Poster:

5,724 posts

219 months

Saturday 29th September 2007
quotequote all
TheLearner said:
If you had to start it. "rc-update add cupsd default" That way it'll restart everytime you boot.
Thanks Sarah, I do need to re boot quite often,

The power trips out very often, it's ok when I'm here the UPS gives me enough time to switch the power back on but if I'm not here or it's the middle of the night....