Linux Programmer | RHCE | RHCSA

Search This Blog

Saturday, 11 August 2018

Change the PDF printer Output directory

Since Ubuntu 7.10, a PDF printer has been installed by default. The behavior of this feature has changed from Ubuntu 7.10, instead of asking for a name and location for the PDF, Ubuntu 8.04 will guess a name for the document and place the file in a folder called PDF in your home directory.

  1. Open the file /etc/cups/cups-pdf.conf as the root user:
    gksu gedit /etc/cups/cups-pdf.conf
    
  2. The lines starting with the “#” character are comments. The first un-commented line, which specifies the output directory, should look something like this:
    Out ${HOME}/PDF
    
  3. Change this line to the path you want your PDFs saved to. This will save them to the current users’s desktop:
    Out ${HOME}/Desktop
    
  4. Save and close the text editor. Now you just need to restart CUPS for the change to take effect.
    sudo /etc/init.d/cups restart
    Changing the output directory dosn’t work in some cases because of apparmor
    
    The default (and therefore allowed by apparmor) place for created pdf's is $(HOME)/PDF. If this directory is not used (or is a symlink, just to add this), that means you've changed the default path in cups-pdf.conf, you'll need to apply this changes in the /etc/apparmor.d/usr.sbin.cupsd file too.
    you'll need to change the lines:
     @{HOME}/PDF/ rw,
     @{HOME}/PDF/* rw,
    @{HOME}/PDF/ rw@{HOME}/PDF/*rw,

    into:
    @{HOME}/Desktop/ rw@{HOME}/Desktop/*rw,
    in the mentioned usr.sbin.cupsd file and restart the apparmor-service.

    sudo /etc/init.d/apparmor restartthen restart the cups service,sudo /etc.init.d/cups restart 
     

SSH not working with password after upgrade ubuntu 22.04 or above

In recent upgrade of ubuntu 22.04 and above we are not able to login server with SSH password. but when we try to login with key then it all...