Is there an environment variable like PRINTER but for a remote server?
up vote
1
down vote
favorite
I've had to uninstall cupsd
and cups-browserd
because I couldn't print to a remote printer when they were running (and gave up after 3 hours).
Printing works great now from applications, but from the CLI I have to do things like this:
enscript -p- reasons_i_love_linux.md | lpr -H server:631
I'd like to be able to just say:
enscript reasons_i_love_linux.md
like in the old days before I "upgraded" CUPS.
This turns out to be hard to find via Google...
Again, the cups daemon is not running on this machine, only on the remote printer server.
Any ideas?
printing
add a comment |
up vote
1
down vote
favorite
I've had to uninstall cupsd
and cups-browserd
because I couldn't print to a remote printer when they were running (and gave up after 3 hours).
Printing works great now from applications, but from the CLI I have to do things like this:
enscript -p- reasons_i_love_linux.md | lpr -H server:631
I'd like to be able to just say:
enscript reasons_i_love_linux.md
like in the old days before I "upgraded" CUPS.
This turns out to be hard to find via Google...
Again, the cups daemon is not running on this machine, only on the remote printer server.
Any ideas?
printing
Should CUPS not be duly setup with the remote printer settings in your local device so you can just run that command?
– George Udosen
Dec 5 at 10:14
Do you mean CUPS on the local machine? Does my first line answer that?
– Greg Bell
Dec 5 at 22:55
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I've had to uninstall cupsd
and cups-browserd
because I couldn't print to a remote printer when they were running (and gave up after 3 hours).
Printing works great now from applications, but from the CLI I have to do things like this:
enscript -p- reasons_i_love_linux.md | lpr -H server:631
I'd like to be able to just say:
enscript reasons_i_love_linux.md
like in the old days before I "upgraded" CUPS.
This turns out to be hard to find via Google...
Again, the cups daemon is not running on this machine, only on the remote printer server.
Any ideas?
printing
I've had to uninstall cupsd
and cups-browserd
because I couldn't print to a remote printer when they were running (and gave up after 3 hours).
Printing works great now from applications, but from the CLI I have to do things like this:
enscript -p- reasons_i_love_linux.md | lpr -H server:631
I'd like to be able to just say:
enscript reasons_i_love_linux.md
like in the old days before I "upgraded" CUPS.
This turns out to be hard to find via Google...
Again, the cups daemon is not running on this machine, only on the remote printer server.
Any ideas?
printing
printing
edited Dec 5 at 22:56
asked Dec 5 at 9:56
Greg Bell
37038
37038
Should CUPS not be duly setup with the remote printer settings in your local device so you can just run that command?
– George Udosen
Dec 5 at 10:14
Do you mean CUPS on the local machine? Does my first line answer that?
– Greg Bell
Dec 5 at 22:55
add a comment |
Should CUPS not be duly setup with the remote printer settings in your local device so you can just run that command?
– George Udosen
Dec 5 at 10:14
Do you mean CUPS on the local machine? Does my first line answer that?
– Greg Bell
Dec 5 at 22:55
Should CUPS not be duly setup with the remote printer settings in your local device so you can just run that command?
– George Udosen
Dec 5 at 10:14
Should CUPS not be duly setup with the remote printer settings in your local device so you can just run that command?
– George Udosen
Dec 5 at 10:14
Do you mean CUPS on the local machine? Does my first line answer that?
– Greg Bell
Dec 5 at 22:55
Do you mean CUPS on the local machine? Does my first line answer that?
– Greg Bell
Dec 5 at 22:55
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
You should have (at least) the "client" parts of CUPS installed. Then put this line into a file saved as /etc/cups/client.conf
(for system-wide usage) or into ${HOME}/.cups/client.conf
(if you want to use different remote CUPS servers for different users):
ServerName servername:631
or
ServerName server-ip-address:631
Note that /etc/cups/client.conf
must be world-readable since it's user-space applications that will be reading it (not a root-owned daemon).
Should the remote CUPS server be rather new, you have to tell your print client to ask the remote server to use IPP v1.1 (not v2.0 as the newer CUPS versions do):
ServerName servername:631/version=1.1
Now your local cupsd
will be by-passed (if it's running at all), or no attempt to contact it will be made (if it's not running). The printing client programs will directly talk to the remote CUPS first (not the one located on localhost:631
, as they otherwise would without the presence of the client.conf
entry outlined above).
To answer your question about an environment variable: Yes, there is one. It is called CUPS_SERVER
. You could use it on a case-by-case base whenever you print a job if the client.conf
entry is not there, or if you want to override the remote server named in client.conf
, or if it listens on a non-standard port
CUPS_SERVER=other_server:666 lp -p printername jobfile
You can also use it to list the names and status of (shared) printers on a remote server:
CUPS_SERVER=other_server:666 lpstat -p
CUPS_SERVER=other_server:666/version=1.1 lpstat -p
CUPS_SERVER=other_server:666 lpstat -v
CUPS_SERVER=other_server:666/version=1.1 lpstat -v
Thanks much, Kurt! CUPS has been a constant pain (setup & breakage) in my many years of Linux use. How'd you get the level of knowledge displayed above? Docs, source code, struggle?
– Greg Bell
13 hours ago
I know you mean for '666' to be an example of a non-standard port, but that's probably confusing to most. Later examples should be :631
– Greg Bell
12 hours ago
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1098592%2fis-there-an-environment-variable-like-printer-but-for-a-remote-server%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
You should have (at least) the "client" parts of CUPS installed. Then put this line into a file saved as /etc/cups/client.conf
(for system-wide usage) or into ${HOME}/.cups/client.conf
(if you want to use different remote CUPS servers for different users):
ServerName servername:631
or
ServerName server-ip-address:631
Note that /etc/cups/client.conf
must be world-readable since it's user-space applications that will be reading it (not a root-owned daemon).
Should the remote CUPS server be rather new, you have to tell your print client to ask the remote server to use IPP v1.1 (not v2.0 as the newer CUPS versions do):
ServerName servername:631/version=1.1
Now your local cupsd
will be by-passed (if it's running at all), or no attempt to contact it will be made (if it's not running). The printing client programs will directly talk to the remote CUPS first (not the one located on localhost:631
, as they otherwise would without the presence of the client.conf
entry outlined above).
To answer your question about an environment variable: Yes, there is one. It is called CUPS_SERVER
. You could use it on a case-by-case base whenever you print a job if the client.conf
entry is not there, or if you want to override the remote server named in client.conf
, or if it listens on a non-standard port
CUPS_SERVER=other_server:666 lp -p printername jobfile
You can also use it to list the names and status of (shared) printers on a remote server:
CUPS_SERVER=other_server:666 lpstat -p
CUPS_SERVER=other_server:666/version=1.1 lpstat -p
CUPS_SERVER=other_server:666 lpstat -v
CUPS_SERVER=other_server:666/version=1.1 lpstat -v
Thanks much, Kurt! CUPS has been a constant pain (setup & breakage) in my many years of Linux use. How'd you get the level of knowledge displayed above? Docs, source code, struggle?
– Greg Bell
13 hours ago
I know you mean for '666' to be an example of a non-standard port, but that's probably confusing to most. Later examples should be :631
– Greg Bell
12 hours ago
add a comment |
up vote
2
down vote
accepted
You should have (at least) the "client" parts of CUPS installed. Then put this line into a file saved as /etc/cups/client.conf
(for system-wide usage) or into ${HOME}/.cups/client.conf
(if you want to use different remote CUPS servers for different users):
ServerName servername:631
or
ServerName server-ip-address:631
Note that /etc/cups/client.conf
must be world-readable since it's user-space applications that will be reading it (not a root-owned daemon).
Should the remote CUPS server be rather new, you have to tell your print client to ask the remote server to use IPP v1.1 (not v2.0 as the newer CUPS versions do):
ServerName servername:631/version=1.1
Now your local cupsd
will be by-passed (if it's running at all), or no attempt to contact it will be made (if it's not running). The printing client programs will directly talk to the remote CUPS first (not the one located on localhost:631
, as they otherwise would without the presence of the client.conf
entry outlined above).
To answer your question about an environment variable: Yes, there is one. It is called CUPS_SERVER
. You could use it on a case-by-case base whenever you print a job if the client.conf
entry is not there, or if you want to override the remote server named in client.conf
, or if it listens on a non-standard port
CUPS_SERVER=other_server:666 lp -p printername jobfile
You can also use it to list the names and status of (shared) printers on a remote server:
CUPS_SERVER=other_server:666 lpstat -p
CUPS_SERVER=other_server:666/version=1.1 lpstat -p
CUPS_SERVER=other_server:666 lpstat -v
CUPS_SERVER=other_server:666/version=1.1 lpstat -v
Thanks much, Kurt! CUPS has been a constant pain (setup & breakage) in my many years of Linux use. How'd you get the level of knowledge displayed above? Docs, source code, struggle?
– Greg Bell
13 hours ago
I know you mean for '666' to be an example of a non-standard port, but that's probably confusing to most. Later examples should be :631
– Greg Bell
12 hours ago
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
You should have (at least) the "client" parts of CUPS installed. Then put this line into a file saved as /etc/cups/client.conf
(for system-wide usage) or into ${HOME}/.cups/client.conf
(if you want to use different remote CUPS servers for different users):
ServerName servername:631
or
ServerName server-ip-address:631
Note that /etc/cups/client.conf
must be world-readable since it's user-space applications that will be reading it (not a root-owned daemon).
Should the remote CUPS server be rather new, you have to tell your print client to ask the remote server to use IPP v1.1 (not v2.0 as the newer CUPS versions do):
ServerName servername:631/version=1.1
Now your local cupsd
will be by-passed (if it's running at all), or no attempt to contact it will be made (if it's not running). The printing client programs will directly talk to the remote CUPS first (not the one located on localhost:631
, as they otherwise would without the presence of the client.conf
entry outlined above).
To answer your question about an environment variable: Yes, there is one. It is called CUPS_SERVER
. You could use it on a case-by-case base whenever you print a job if the client.conf
entry is not there, or if you want to override the remote server named in client.conf
, or if it listens on a non-standard port
CUPS_SERVER=other_server:666 lp -p printername jobfile
You can also use it to list the names and status of (shared) printers on a remote server:
CUPS_SERVER=other_server:666 lpstat -p
CUPS_SERVER=other_server:666/version=1.1 lpstat -p
CUPS_SERVER=other_server:666 lpstat -v
CUPS_SERVER=other_server:666/version=1.1 lpstat -v
You should have (at least) the "client" parts of CUPS installed. Then put this line into a file saved as /etc/cups/client.conf
(for system-wide usage) or into ${HOME}/.cups/client.conf
(if you want to use different remote CUPS servers for different users):
ServerName servername:631
or
ServerName server-ip-address:631
Note that /etc/cups/client.conf
must be world-readable since it's user-space applications that will be reading it (not a root-owned daemon).
Should the remote CUPS server be rather new, you have to tell your print client to ask the remote server to use IPP v1.1 (not v2.0 as the newer CUPS versions do):
ServerName servername:631/version=1.1
Now your local cupsd
will be by-passed (if it's running at all), or no attempt to contact it will be made (if it's not running). The printing client programs will directly talk to the remote CUPS first (not the one located on localhost:631
, as they otherwise would without the presence of the client.conf
entry outlined above).
To answer your question about an environment variable: Yes, there is one. It is called CUPS_SERVER
. You could use it on a case-by-case base whenever you print a job if the client.conf
entry is not there, or if you want to override the remote server named in client.conf
, or if it listens on a non-standard port
CUPS_SERVER=other_server:666 lp -p printername jobfile
You can also use it to list the names and status of (shared) printers on a remote server:
CUPS_SERVER=other_server:666 lpstat -p
CUPS_SERVER=other_server:666/version=1.1 lpstat -p
CUPS_SERVER=other_server:666 lpstat -v
CUPS_SERVER=other_server:666/version=1.1 lpstat -v
edited 5 hours ago
muru
135k20289492
135k20289492
answered 2 days ago
Kurt Pfeifle
91079
91079
Thanks much, Kurt! CUPS has been a constant pain (setup & breakage) in my many years of Linux use. How'd you get the level of knowledge displayed above? Docs, source code, struggle?
– Greg Bell
13 hours ago
I know you mean for '666' to be an example of a non-standard port, but that's probably confusing to most. Later examples should be :631
– Greg Bell
12 hours ago
add a comment |
Thanks much, Kurt! CUPS has been a constant pain (setup & breakage) in my many years of Linux use. How'd you get the level of knowledge displayed above? Docs, source code, struggle?
– Greg Bell
13 hours ago
I know you mean for '666' to be an example of a non-standard port, but that's probably confusing to most. Later examples should be :631
– Greg Bell
12 hours ago
Thanks much, Kurt! CUPS has been a constant pain (setup & breakage) in my many years of Linux use. How'd you get the level of knowledge displayed above? Docs, source code, struggle?
– Greg Bell
13 hours ago
Thanks much, Kurt! CUPS has been a constant pain (setup & breakage) in my many years of Linux use. How'd you get the level of knowledge displayed above? Docs, source code, struggle?
– Greg Bell
13 hours ago
I know you mean for '666' to be an example of a non-standard port, but that's probably confusing to most. Later examples should be :631
– Greg Bell
12 hours ago
I know you mean for '666' to be an example of a non-standard port, but that's probably confusing to most. Later examples should be :631
– Greg Bell
12 hours ago
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1098592%2fis-there-an-environment-variable-like-printer-but-for-a-remote-server%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Should CUPS not be duly setup with the remote printer settings in your local device so you can just run that command?
– George Udosen
Dec 5 at 10:14
Do you mean CUPS on the local machine? Does my first line answer that?
– Greg Bell
Dec 5 at 22:55