Adobe Reader is not suitable for printing PDF files using a batch file because it remains open after the print is done and there is no simple, safe & reliable mechanism to close it. Instead use Ghostscript commandline as shown below:
gswin32c -dPrinted -dBATCH -dNOPAUSE -dNOSAFER -q -dNumCopies=1 "C:\test.pdf"
*Must be a recent version of Ghostscript, e.g. 9.x
Wednesday, August 13, 2014
Sunday, August 3, 2014
GParted does not start in LXQt
Symptom: Clicking on GParted launcher has no effect. Log /var/log/messages shows:
The value for environment variable TERM contains suscipious content ...The cause was having set the TERM variable using LXQt Session Settings, Default Applications, Terminal Emulation to /usr/bin/lxterm. Changing back to xterm and logging out-in fixed the issue.
Sunday, June 15, 2014
Compiling a specific commit from Git
cd /usr/local/src
git clone [ProjectX]
cd [ProjectX]
git checkout [commit checksum from Github]
mkdir build
cd build
cmake ..
make
sudo make install
To return to the master version:
...
git checkout master
...
git clone [ProjectX]
cd [ProjectX]
git checkout [commit checksum from Github]
mkdir build
cd build
cmake ..
make
sudo make install
To return to the master version:
...
git checkout master
...
Sunday, May 25, 2014
Install LXQt on Sabayon 14
This is a quick guide to installing LXQt desktop (current version LXQt 0.7.0) on Gentoo based Sabayon Linux (current release 14.06).
Firstly, remove razor-qt to avoid file collisions.
Use Layman to add the Qt overlay:
Firstly, remove razor-qt to avoid file collisions.
Use Layman to add the Qt overlay:
layman -a qtUse Emerge to attempt to install lxqt-meta:
emerge -av lxqt-base/lxqt-metaIf it fails copy the text below regarding keywords, and paste into
/etc/portage/package.accept_keywordsAttempt to install again:
emerge -av lxqt-base/lxqt-metaIf it fails copy the text below warning the about unmask, paste into
/etc/portage/portage.unmask/99-lxqt.package.unmaskAttempt to install again:
emerge -av lxqt-base/lxqt-meta
If it fails on lxqt-panel download from source and manually compile and install:
mkdir /usr/src/lxqt-panel
cd /usr/src/lxqt-panel
wget http://lxqt.org/downloads/lxqt/0.7.0/lxqt-panel-0.7.0.tar.gz
tar xvf lxqt-panel-0.7.0.tar.gz
cd lxqt-panel
mkdir build
cd build
cmake ..
make
sudo make install
If other packages from lxqt-meta have not installed, you may install them individually using Emerge, e.g.:
emerge -av lxqt-base/lxqt-sessionYou should now be able to select LXQt from the login screen.
Wednesday, April 30, 2014
Private Debian secure apt repository
Secure apt was introduced in Debian 3 (Sarge) in 2005. Secure apt requires crypto signing (PGP) of the Release file, not the deb packages. Without secure apt installation of packages will prompt for verification before installation.
Trivial apt repositories use a simple flat file structure, but do not support "secure apt". Hence, in order to set up an apt repository that does not prompt for verification of package updates such as a Personal Package Archive (PPA) it is necessary to configure a non-trivial apt repository.
The non-trivial repository file structure must contain:
debian
+ dists
+ { archive, e.g. stable } /Release, Release.gpg(package release info)
+ { component, e.g. main }
+ { architecture, e.g binary-amd64 } /Packages, Packages.gz, Release(architecture release info)
+ source / (if empty, source packages will not be available)
+ pool /*.deb (Packages)
To set up crypto ability on the server install and run gpg. RSA key required, 4096 bytes recommended, if a blank password is used you will not be prompted for a password to sign the Release file.
To create a package list Release file use an application like apt-ftparchive. Note that the files listed in the Release file must be relative to the debian/dists/{archive} directory. E.g.:
cd /var/www/debian/dists/stable
echo "Suite: stable" > Release
apt-ftparchive release . >> Release
One example method of how to sign the Release file:
cd /var/www/debian/stable
gpg --default-key "My key name" -abs -o Release.gpg Release
To use the repository on a client add a line to /etc/apt/sources.list.d/custom.list:
deb http://{server}/debian/ {archive} {component}
To remove the verification prompt on the client export the key from the server, transfer to the client and install to apt:
Server: gpg --armor --export "My key name" > myserver.gpg.key
Client: apt-key add myserver.gpg.key
Trivial apt repositories use a simple flat file structure, but do not support "secure apt". Hence, in order to set up an apt repository that does not prompt for verification of package updates such as a Personal Package Archive (PPA) it is necessary to configure a non-trivial apt repository.
The non-trivial repository file structure must contain:
debian
+ dists
+ { archive, e.g. stable } /Release, Release.gpg(package release info)
+ { component, e.g. main }
+ { architecture, e.g binary-amd64 } /Packages, Packages.gz, Release(architecture release info)
+ source / (if empty, source packages will not be available)
+ pool /*.deb (Packages)
To set up crypto ability on the server install and run gpg. RSA key required, 4096 bytes recommended, if a blank password is used you will not be prompted for a password to sign the Release file.
Notes:
*The package Release file *must* contain a line for "Suite: "
**Create the Packages files *before* creating the package Release file.
To create a package list Release file use an application like apt-ftparchive. Note that the files listed in the Release file must be relative to the debian/dists/{archive} directory. E.g.:
cd /var/www/debian/dists/stable
echo "Suite: stable" > Release
apt-ftparchive release . >> Release
One example method of how to sign the Release file:
cd /var/www/debian/stable
gpg --default-key "My key name" -abs -o Release.gpg Release
To use the repository on a client add a line to /etc/apt/sources.list.d/custom.list:
deb http://{server}/debian/ {archive} {component}
To remove the verification prompt on the client export the key from the server, transfer to the client and install to apt:
Server: gpg --armor --export "My key name" > myserver.gpg.key
Client: apt-key add myserver.gpg.key
Friday, April 25, 2014
Flash Player with QtWeb
QtWeb 3.8.5 on Linux uses the following location to load the Flash Player plugin:
Note, according to Qt Project documentation QtWebKit will also search other paths - for details see:
http://qt-project.org/doc/qt-4.8/qtwebkit.html#netscape-plugin-support
Because QtWeb is 32-bit this can conflict with other web browsers installed on 64-bit Linux. To avoid this issue put the libflashplayer.so file in another location such as:
To see other files and locations that QtWeb is trying to access you can use strace:
/usr/lib64/nsbrowser/plugins/libflashplayer.soThe file should be marked as executable.
Note, according to Qt Project documentation QtWebKit will also search other paths - for details see:
http://qt-project.org/doc/qt-4.8/qtwebkit.html#netscape-plugin-support
Because QtWeb is 32-bit this can conflict with other web browsers installed on 64-bit Linux. To avoid this issue put the libflashplayer.so file in another location such as:
/usr/local/lib32/qtweb/plugins/libflashplayer.soThen edit the desktop file to use an Exec line such as:
Exec=env MOZ_PLUGIN_PATH=":/usr/local/lib32/qtweb/plugins" /usr/local/bin/QtWeb- this will apply the environment variable only to the process where QtWeb is launched.
To see other files and locations that QtWeb is trying to access you can use strace:
strace -e open QtWebor to grep a specific keyword (e.g. plugin):
strace -e open QtWeb 2>&1 grep -i plugin
Saturday, January 11, 2014
Enable NTP in Sabayon
To enable NTP time synchronization in Sabayon linux:
1. Install ntp package.
2. Customize configuration if required: /etc/ntp.conf
2. As root enable the service in systemd:
It takes several minutes for the service to adjust the time. If the clock is skewed by more than 17 minutes then use the following command to perform a manual time sync:
1. Install ntp package.
2. Customize configuration if required: /etc/ntp.conf
2. As root enable the service in systemd:
systemctl enable ntpd.service3. Start the service:
systemctl start ntpd.service
It takes several minutes for the service to adjust the time. If the clock is skewed by more than 17 minutes then use the following command to perform a manual time sync:
ntpdate 0.gentoo.pool.ntp.orgTo verify the NTP daemon is running:
ps -lA|grep ntp
Subscribe to:
Posts (Atom)