cd /var/spoolhttp://en.wikipedia.org/wiki/Chmod
sudo mkdir mqueue
sudo chown smmta:smmsp mqueue
sudo chmod u+rwx,g+rs,o-rwx mqueue
IT, computer and programming tutorials and tips that i couldnt find anywhere else using google, from my daily work as a Senior Developer of solutions using Java and Linux.
The best place to *find* answers to programming/development questions, imo, however it's the *worst* place to *ask* questions (if your first question/comment doesn't get any up-rating/response, then u can't ask anymore questions--ridiculously unrealistic), but again, a great reference for *finding* answers.
My Music (Nickleus)
Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts
20120503
how to set linux folder permissions to drwxr-s---
i deleted /var/spool/mqueue because it was sending out massive amounts of emails, but i wanted to recreate it with it's original file permissions so i did this:
20120502
how to disable loading of firewire on boot using a kernel/grub/boot option
i read somewhere that "nofw" works, but it doesn't. you have to add the following to the boot options:
blacklist=firewire_ohci
https://bugs.launchpad.net/ubuntu/+bug/991889/
blacklist=firewire_ohci
https://bugs.launchpad.net/ubuntu/+bug/991889/
20120118
how to install the gedit regex/regexp plugin for unity in ubuntu linux 11.10 oneiric ocelot
download this file http://live.gnome.org/Gedit/Plugins?action=AttachFile&do=get&target=regex_replace-gedit3.tar.gz
close all instances of gedit
open a terminal/console and move to where you downloaded the file, e.g. /home/myuser/Downloads
start gedit > edit > preferences > plugins > put a checkmark on "regular expressions"
now when you want to use regular expressions in search and replace you go here: search > regular expressions
source: http://halfhourhacks.blogspot.com/2008/03/gedit-regular-expression-plugin.html
close all instances of gedit
open a terminal/console and move to where you downloaded the file, e.g. /home/myuser/Downloads
cd /home/myuser/Downloads
tar xzvf regex_replace-gedit3.tar.gz
mkdir -p ~/.local/share/gedit/plugins
mv regex_replace ~/.local/share/gedit/plugins
start gedit > edit > preferences > plugins > put a checkmark on "regular expressions"
now when you want to use regular expressions in search and replace you go here: search > regular expressions
source: http://halfhourhacks.blogspot.com/2008/03/gedit-regular-expression-plugin.html
20120112
how to import local source code to a new, remote, subversion svn repository from the command line
i have newly configured jboss 7 web profile for a potential migration we will do from jboss 4. i was asked to commit my entire jboss 7 to subversion so another developer could look at it. here's how i did it, the errors i got during the process and how i overcame them.
on my local machine (where i have the jboss source), log into the remote svn server:
ssh mySshUser@myRemoteSvnServer
(i'm now) on myRemoteSvnServer (ip address: 192.168.1.254), create the new svn repo:
sudo svnadmin create /srv/svn/repos/jboss-as-web-7.0.2.Final
now copy the password file from another svn project (the same people will be allowed to access this jboss project):
sudo cp -f /srv/svn/repos/anotherSvnProject/conf/passwd /srv/svn/repos/jboss-as-web-7.0.2.Final/conf/
otherwise just edit the new repo password file, defining who has access to it, etc.
now make sure the ownership of the new repo is correct:
sudo chown -R www-data:www-data /srv/svn/repos/jboss-as-web-7.0.2.Final
on my local machine, import the jboss source to the new, remote repo you just created:
svn import /path/to/jboss/source/jboss-as-web-7.0.2.Final https://192.168.1.254/svn/jboss-as-web-7.0.2.Final
on myRemoteSvnServer, just to be sure, make sure ownership is correct again:
sudo chown -R www-data:www-data /srv/svn/repos/jboss-as-web-7.0.2.Final
on my local machine (where i have the jboss source), log into the remote svn server:
ssh mySshUser@myRemoteSvnServer
(i'm now) on myRemoteSvnServer (ip address: 192.168.1.254), create the new svn repo:
sudo svnadmin create /srv/svn/repos/jboss-as-web-7.0.2.Final
now copy the password file from another svn project (the same people will be allowed to access this jboss project):
sudo cp -f /srv/svn/repos/anotherSvnProject/conf/passwd /srv/svn/repos/jboss-as-web-7.0.2.Final/conf/
otherwise just edit the new repo password file, defining who has access to it, etc.
now make sure the ownership of the new repo is correct:
sudo chown -R www-data:www-data /srv/svn/repos/jboss-as-web-7.0.2.Final
on my local machine, import the jboss source to the new, remote repo you just created:
svn import /path/to/jboss/source/jboss-as-web-7.0.2.Final https://192.168.1.254/svn/jboss-as-web-7.0.2.Final
on myRemoteSvnServer, just to be sure, make sure ownership is correct again:
sudo chown -R www-data:www-data /srv/svn/repos/jboss-as-web-7.0.2.Final
---
along the way i got various errors:
svn: OPTIONS of 'http://192.168.1.254/svn/jboss-as-web-7.0.2.Final': could not connect to server (http://192.168.1.254)
svn: Your commit message was left in a temporary file:
svn: 'svn-commit.tmp'
this was most likely due to the fact that the remote svn server actually runs on https, not http.
svn: Can't open file '/srv/svn/repos/jboss-as-web-7.0.2.Final/db/txn-current-lock': Permission denied
svn: Your commit message was left in a temporary file:
svn: 'svn-commit.2.tmp'
this was most likely due to a permissions/ownership issue, so i ran this on the remote svn server:
sudo chown -R www-data:www-data /srv/svn/repos/jboss-as-web-7.0.2.Final
20110611
ubuntu 11.04 sound problems and solutions (hdmi + normal audio)
when i hooked my laptop up to my tv using an hdmi cable the sound was totally crappy. i read (i cant remember where, sorry) that to fix it you need to disable the normal audio interface:
System > Preferences > Sound > Hardware
choose Internal Audio
profile: Off
it worked perfectly. when i was does and renabled Internal Audio, i couldnt hear any sound with normal audio, like youtube in chrome or playing local files with vlc. to fix this i read No sound at all.
all i had to do was this:
rm -r ~/.pulse ~/.pulse-cookie
System > Preferences > Sound > Hardware
choose Internal Audio
profile: Off
it worked perfectly. when i was does and renabled Internal Audio, i couldnt hear any sound with normal audio, like youtube in chrome or playing local files with vlc. to fix this i read No sound at all.
all i had to do was this:
rm -r ~/.pulse ~/.pulse-cookie
20110523
how to install printer and scanner drivers on ubuntu 64-bit for brother DCP-9270CDN
(updated for ubuntu linux 12.04)
INSTALL PRINTER DRIVERS
download drivers from Brother website (drivers are i386 even for amd64/64-bit):
LPR driver deb 1.1.1-5 756 KB 2011.Jan.28
cupswrapper driver deb 1.1.1-5 12 KB 2011.Jan.28
navigate to the location where you downloaded the deb files, e.g. ~/Downloads:
cd
cd Downloads
sudo dpkg -i --force-all dcp9270cdnlpr-1.1.1-5.i386.deb
returns:
Selecting previously unselected package dcp9270cdnlpr:i386.
(Reading database ... 178504 files and directories currently installed.)
Unpacking dcp9270cdnlpr:i386 (from dcp9270cdnlpr-1.1.1-5.i386.deb) ...
Setting up dcp9270cdnlpr:i386 (1.1.1-5) ...
mkdir: cannot create directory `/var/spool/lpd/dcp9270cdn': No such file or directory
chown: cannot access `/var/spool/lpd/dcp9270cdn': No such file or directory
chgrp: cannot access `/var/spool/lpd/dcp9270cdn': No such file or directory
chmod: cannot access `/var/spool/lpd/dcp9270cdn': No such file or directory
(you can disregard the warnings)
sudo dpkg -i --force-all dcp9270cdncupswrapper-1.1.1-5.i386.deb
returns:
Selecting previously unselected package dcp9270cdncupswrapper:i386.
(Reading database ... 178536 files and directories currently installed.)
Unpacking dcp9270cdncupswrapper:i386 (from dcp9270cdncupswrapper-1.1.1-5.i386.deb) ...
Setting up dcp9270cdncupswrapper:i386 (1.1.1-5) ...
cups stop/waiting
cups start/running, process 28182
dpkg -l|grep Brother
returns:
ii dcp9270cdncupswrapper:i386 1.1.1-5 Brother CUPS Laser Printer Definitions
ii dcp9270cdnlpr:i386 1.1.1-5 Brother lpr Laser Printer Definitions
ii printer-driver-ptouch 1.3-3ubuntu0.1 printer driver Brother P-touch label printers
CONFIGURE THE PRINTER
go here: http://localhost:631/printers
click the link: DCP9270CDN
dropdown box: Administration > Printers > Manage Printers
click DCP9270CDN > in the second dropdown list to the right at the top ("Administration" is selected by default), choose Modify Printer
a popup box will ask you for your username and password--this is your normal ubuntu username and password
##OLD##
choose radio button: LPD/LPR Host or Printerclick continue
set lpd to: lpd://XXX.XXX.XXX.XXX/binary_p1
(replace the XXX's with the ip address for your network printer)
####
to find the printer's IP address and active services and enabled protocols, go to the printer and select the following:
menu > print report > network configuration
now, back in your browser ( http://localhost:631/printers ) choose the radio button for Other Network Printers > AppSocket/HP JetDirect.
(
why AppSocket?
"The AppSocket protocol ... is the simplest, fastest, and generally the most reliable network protocol used for printers."
http://localhost:631/help/network.html#SOCKET
)
click continue
connection:
socket://192.168.1.242
click continue
click continue
upload the PPD file. to find where it is, run this in a terminal:
locate ppd|grep Brother
i got the following output:
/usr/local/Brother/Printer/dcp9270cdn/cupswrapper/dcp9270cdn.ppd
click Browse to select the PPD file
click Modify Printer
INSTALL SCANNER DRIVERS (OPTIONAL)
Scanner Driver download page
find the section for DCP-9270CDN (search for it on the page) and download the following:
brscan4 64bit deb 0.4.1-1 72 KB 2012.Jun.05
scan-key-tool 64bit deb 0.2.3-0 51 KB 2012.Mar.22
(install drivers for scanning from Brother website)
navigate to the location where you downloaded the deb files, e.g. ~/Downloads:
cd
cd Downloads
sudo apt-get install sane-utils
sudo dpkg -i --force-all brscan4-0.4.1-1.amd64.deb
returns:
Selecting previously unselected package brscan4.
(Reading database ... 178540 files and directories currently installed.)
Unpacking brscan4 (from brscan4-0.4.1-1.amd64.deb) ...
Setting up brscan4 (0.4.1-1) ...
This software is based in part on the work of the Independent JPEG Group.
dpkg -l|grep Brother
returns:
ii brscan4 0.4.1-1 Brother Scanner Driver
ii dcp9270cdncupswrapper:i386 1.1.1-5 Brother CUPS Laser Printer Definitions
ii dcp9270cdnlpr:i386 1.1.1-5 Brother lpr Laser Printer Definitions
ii printer-driver-ptouch 1.3-3ubuntu0.1 printer driver Brother P-touch label printers
brsaneconfig4 -a name=SCANNER model=DCP-9270CDN ip=XXX.XXX.XXX.XXX
(the ip flag is apart of the brsaneconfig4 line. replace XXX... with your printer's IP address)
brsaneconfig4 -q|grep SCANNER
returns:
0 SCANNER "DCP-9270CDN" I:XXX.XXX.XXX.XXX
sudo dpkg -i --force-all brscan-skey-0.2.3-0.amd64.deb
returns:
Selecting previously unselected package brscan-skey.
(Reading database ... 178568 files and directories currently installed.)
Unpacking brscan-skey (from brscan-skey-0.2.3-0.amd64.deb) ...
Setting up brscan-skey (0.2.3-0) ...
dpkg -l|grep Brother
returns:
ii brscan-skey 0.2.3-0 Brother Linux scanner S-KEY tool
ii brscan4 0.4.1-1 Brother Scanner Driver
ii dcp9270cdncupswrapper:i386 1.1.1-5 Brother CUPS Laser Printer Definitions
ii dcp9270cdnlpr:i386 1.1.1-5 Brother lpr Laser Printer Definitions
ii printer-driver-ptouch 1.3-3ubuntu0.1 printer driver Brother P-touch label printers
start the scanner tool:
brscan-skey
check to see if the scanner is "Active":
brscan-skey -l
returns:
SCANNER : brother4:net1;dev0 : XXX.XXX.XXX.XXX Active
to scan, put the document on the scanner, press Scan button on the scanner > Scan to PC > Image > choose your user (e.g. "nick"), press "Start".
gimp will open automatically on your computer with the scanned image open as an image. i found that i had to close gimp completely after each successive scan otherwise i would get an error.
INSTALL PRINTER DRIVERS
download drivers from Brother website (drivers are i386 even for amd64/64-bit):
LPR driver deb 1.1.1-5 756 KB 2011.Jan.28
cupswrapper driver deb 1.1.1-5 12 KB 2011.Jan.28
navigate to the location where you downloaded the deb files, e.g. ~/Downloads:
cd
cd Downloads
sudo dpkg -i --force-all dcp9270cdnlpr-1.1.1-5.i386.deb
returns:
Selecting previously unselected package dcp9270cdnlpr:i386.
(Reading database ... 178504 files and directories currently installed.)
Unpacking dcp9270cdnlpr:i386 (from dcp9270cdnlpr-1.1.1-5.i386.deb) ...
Setting up dcp9270cdnlpr:i386 (1.1.1-5) ...
mkdir: cannot create directory `/var/spool/lpd/dcp9270cdn': No such file or directory
chown: cannot access `/var/spool/lpd/dcp9270cdn': No such file or directory
chgrp: cannot access `/var/spool/lpd/dcp9270cdn': No such file or directory
chmod: cannot access `/var/spool/lpd/dcp9270cdn': No such file or directory
(you can disregard the warnings)
sudo dpkg -i --force-all dcp9270cdncupswrapper-1.1.1-5.i386.deb
returns:
Selecting previously unselected package dcp9270cdncupswrapper:i386.
(Reading database ... 178536 files and directories currently installed.)
Unpacking dcp9270cdncupswrapper:i386 (from dcp9270cdncupswrapper-1.1.1-5.i386.deb) ...
Setting up dcp9270cdncupswrapper:i386 (1.1.1-5) ...
cups stop/waiting
cups start/running, process 28182
dpkg -l|grep Brother
returns:
ii dcp9270cdncupswrapper:i386 1.1.1-5 Brother CUPS Laser Printer Definitions
ii dcp9270cdnlpr:i386 1.1.1-5 Brother lpr Laser Printer Definitions
ii printer-driver-ptouch 1.3-3ubuntu0.1 printer driver Brother P-touch label printers
CONFIGURE THE PRINTER
go here: http://localhost:631/printers
click the link: DCP9270CDN
dropdown box: Administration > Printers > Manage Printers
click DCP9270CDN > in the second dropdown list to the right at the top ("Administration" is selected by default), choose Modify Printer
a popup box will ask you for your username and password--this is your normal ubuntu username and password
##OLD##
####
to find the printer's IP address and active services and enabled protocols, go to the printer and select the following:
menu > print report > network configuration
now, back in your browser ( http://localhost:631/printers ) choose the radio button for Other Network Printers > AppSocket/HP JetDirect.
(
why AppSocket?
"The AppSocket protocol ... is the simplest, fastest, and generally the most reliable network protocol used for printers."
http://localhost:631/help/network.html#SOCKET
)
click continue
connection:
socket://192.168.1.242
click continue
click continue
upload the PPD file. to find where it is, run this in a terminal:
locate ppd|grep Brother
i got the following output:
/usr/local/Brother/Printer/dcp9270cdn/cupswrapper/dcp9270cdn.ppd
click Browse to select the PPD file
click Modify Printer
INSTALL SCANNER DRIVERS (OPTIONAL)
Scanner Driver download page
find the section for DCP-9270CDN (search for it on the page) and download the following:
brscan4 64bit deb 0.4.1-1 72 KB 2012.Jun.05
scan-key-tool 64bit deb 0.2.3-0 51 KB 2012.Mar.22
(install drivers for scanning from Brother website)
navigate to the location where you downloaded the deb files, e.g. ~/Downloads:
cd
cd Downloads
sudo apt-get install sane-utils
sudo dpkg -i --force-all brscan4-0.4.1-1.amd64.deb
returns:
Selecting previously unselected package brscan4.
(Reading database ... 178540 files and directories currently installed.)
Unpacking brscan4 (from brscan4-0.4.1-1.amd64.deb) ...
Setting up brscan4 (0.4.1-1) ...
This software is based in part on the work of the Independent JPEG Group.
dpkg -l|grep Brother
returns:
ii brscan4 0.4.1-1 Brother Scanner Driver
ii dcp9270cdncupswrapper:i386 1.1.1-5 Brother CUPS Laser Printer Definitions
ii dcp9270cdnlpr:i386 1.1.1-5 Brother lpr Laser Printer Definitions
ii printer-driver-ptouch 1.3-3ubuntu0.1 printer driver Brother P-touch label printers
brsaneconfig4 -a name=SCANNER model=DCP-9270CDN ip=XXX.XXX.XXX.XXX
(the ip flag is apart of the brsaneconfig4 line. replace XXX... with your printer's IP address)
brsaneconfig4 -q|grep SCANNER
returns:
0 SCANNER "DCP-9270CDN" I:XXX.XXX.XXX.XXX
sudo dpkg -i --force-all brscan-skey-0.2.3-0.amd64.deb
returns:
Selecting previously unselected package brscan-skey.
(Reading database ... 178568 files and directories currently installed.)
Unpacking brscan-skey (from brscan-skey-0.2.3-0.amd64.deb) ...
Setting up brscan-skey (0.2.3-0) ...
dpkg -l|grep Brother
returns:
ii brscan-skey 0.2.3-0 Brother Linux scanner S-KEY tool
ii brscan4 0.4.1-1 Brother Scanner Driver
ii dcp9270cdncupswrapper:i386 1.1.1-5 Brother CUPS Laser Printer Definitions
ii dcp9270cdnlpr:i386 1.1.1-5 Brother lpr Laser Printer Definitions
ii printer-driver-ptouch 1.3-3ubuntu0.1 printer driver Brother P-touch label printers
start the scanner tool:
brscan-skey
check to see if the scanner is "Active":
brscan-skey -l
returns:
SCANNER : brother4:net1;dev0 : XXX.XXX.XXX.XXX Active
to scan, put the document on the scanner, press Scan button on the scanner > Scan to PC > Image > choose your user (e.g. "nick"), press "Start".
gimp will open automatically on your computer with the scanned image open as an image. i found that i had to close gimp completely after each successive scan otherwise i would get an error.
Subscribe to:
Posts (Atom)