Postings by Peng Yu

gufw error

I got the following error when I run gufw. Does anybody know how to
fix the problem?

$ gufw
Traceback (most recent call last):
File "/usr/share/gufw/gufw/", line 21, in <module>
from view.gufw import Gufw
File "/usr/share/gufw/gufw/view/", line 19, in <module>
from gi.repository import Gtk, Gdk, WebKit
ImportError: No module named repository
$ uname -a
Linux caph 3.13.0-143-generic #192-Ubuntu SMP Tue Feb 27 10:45:36 UTC
2018 x86_64 GNU/Linux

Any other alternative to at

Hi, I'd like to easily schedule jobs using a tool other than `at`.
Directly modifying crontab is not an option as it is too cumbersome.
Does anybody know alternatives to `at`? Thanks.

How to implement a Linux daemon in bash that can be start/stop by `sudo service`?


There are a lot of resource about creating Linux daemon. But I am not
sure which is one is the most correct and provide the essential things
for a Linux daemon in bash that can be start/stop by `sudo service`?
Would anybody point me the best resource to learn how to create such a
daemon? Thanks.

Best command line tool to convert a webpage to a pdf file?

Hi, I have tried wkhtmltopdf. But it can not always guarantee to
generate the pdf correctly. Does anybody know a tool that can generate
a pdf from a URL reliably?

How to clean up full /boot safely?


I have a full /boot. When I run the following command, I got the
following error. Does anybody know to fix this problem?

$ sudo apt-get -f autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies...

Set up an Apache HTTP server as a rotating proxy


Suppose that I have many proxies that I can use (called secondary
proxies here). I'd like to create a master proxy that rotates its
connection to these secondary proxies. In this way, an application
only needs to connect to this master proxy and does not need to know
whether the master proxy rotates among these secondary proxies.

I see that apache reverse proxy probably may be able to do this. But I
am not very sure. Could anybody confirm whether this is the case? Is
there any specific configuration need to done to ensure a strict
rotation policy?

Light-weight job dispatch on multiple machines

Hi, I'd like a command line job dispatch tool to dispatch jobs (each
job is independent from each other and may have different input
parameters) on multiple linux machines.

I am not looking for complex tools like sun grid engine or torque.
Rather, I am looking for something with very little configuration (for
example, the minumal configure is just the machine names and how many
jobs each machine can run in parallel).

Do anybody know if such a light weighted tool available? Thanks.

How to clean up /boot?

Hi, I got the following error when I try to clean up /boot. Then I try
to run `apt-get -f install`. Then, it ends up with the /boot full

gcc -m32 error with files not found

Hi, I got the following error when I try to run gcc -m32.

How the command "at" works?

Hi, I want to understand how `at` schedules jobs. Does anybody know
how it works? Thanks.

How to show the commands submitted by `at`?

Hi, atq only shows that there are job submitted. But how to show the
actual commands being submitted?

What does ubuntu do after loading ~/.bashrc?

Hi, Sometime, when I try to `ssh -v` to an ubuntu, it becomes
unreponsive after loading ~/.bashrc (I know this because I put some
print statement at the end of ~/.bashrc). Does anybody know how to
figure out how to print out any debug message from the progresses
envoked after ~/.bashrc is loaded?

Where is the manpage of M_PI?

Hi, Mac OS X has the manpage for M_PI. Is it available in Ubuntu?

How to specific the name for the receipt when using the program 'mail'?


The following command can send an email to somebody. But there is no
name associated with the recipient.

echo 'Message body' | mail -s 'Email subject' <a href="mailto: ... at example dot com"> ... at example dot com</a>

Something like the following does not work.

echo 'Message body' | mail -s 'Email subject' 'First Last< ... at example dot com>'

Does anybody know how to specific the name of the recipient? Thanks.

How to allow each user on an Ubuntu server use his/her google email and password to send the email via google smtp?


I see the following post.

How To Relay Postfix mails via on Ubuntu 14.04.1
<a href="" title=""></a>

But the problem is that all users on the same ubuntu server will be
able to use the same google account to send emails. Is there a way to
configure postfix so that each Ubuntu user will use his/her own google
account to send emails? Thanks.

How to setup the same user/passwd and group on multiple ubuntu machines?


I have a number of ubuntu machines on a network. I want to have a
simple way so that each machine has the same user/passwd and group. I
don't want to set user/passwd and group repeatedly on each machine, as
this is not manageable when the number of machines increase.

LDAP seems to be relevant. But I can't find a complete easy-to-follow
recipe for user/passwd and group setup purpose. Could anybody point me
some good resource? Thanks.

How to check whether blas/lapack/atlas is built with g77 or gfortran?


<a href="" title=""></a>

The above URL says the following " In particular, if your
blas/lapack/atlas is built with g77, you must use g77 when building
numpy and scipy; on the contrary, if your atlas is built with
gfortran, you must build numpy/scipy with gfortran. "

But I'm not sure how to figure out whether g77 or gfortran is used to
compile blas/lapack/atlas on ubuntu. Could anybody let me know?

How to run old linux code (32bit) on current ubuntu system?


I have some legacy binary code. Is there a way to run it on a current
64bit ubuntu system?

~$ file y
y: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.0.0, not
~$ ./y
-bash: ./y: No such file or directory

How to check what file are installed by libboost-all-dev?


I see the following files. But should there be more files installed
(e.g., header files). How to show all files installed by
libboost-all-dev? Thanks.

~$ dpkg -L libboost-all-dev

Where is

Hi, is available on Ubuntu 11.10, but it is not available on
Ubuntu 10.04.4 LTS. Does anybody know which package has
on 10.04?

More updated package systems that are are independent of ubuntu versions


macports on mac seem to be fairly updated, and the latest version
available does not depend on which version of the OS is. But many
packages on ubuntu are outdated. Even the lastest release of ubuntu
may not have the most updated packages, and many updated packages
available in a later version ubuntu is not available to an older
version ubuntu. I'm wondering if there is something similar to
macports on ubuntu that can give me consistent updated packages across
different version of ubuntu OS. Thanks!

Update package without updating the OS


coreutils doesn't have realpath on ubuntu 11.04. Without updating the
OS to the lastest version or compiling coreutils from the latest
release, it is there a simpler way to update coreutils? Thanks!

Prompt for incomplete command


I used to remember if I type an incomplete command, I should see an
useful output such as which package I should install or what other
commands may be relevant to the incomplete command.

~$ hg
The program 'hg' is currently not installed. You can install it by typing:
sudo apt-get install mercurial

But now I get the following error. It seems that there is some problem
with the python packages. But I don't think that I have changed
anything relevant in my system.

How to request adding a package?


I remember that I didn't this before. But I can find the link any
more. Could anybody point me how to submit a question for packaging a
new software?

multiple downloads with scp


scp seems to only allow single thread download when I want scp a
directory of files. Is there way to download multiple files
simultanously with scp? Or is there some similar tool that allow
simultaneous download?

Get the proper suffix depending on the file type.


The command 'file' print human readable file format. But I need to get
the correct suffixes for some files with incorrect suffixes. I could
parse the output of 'file' and then map to the correct suffixes. But
I'm wondering if there is any more automatic way of doing so? Thanks!

Command to tell whether it ubuntu and mac


I want to make a script work for both mac and ubuntu. Is there a
command that I can tell me whether I'm on an ubuntu or on a mac?

Drupal with HTML5 game


I see that HTML5 game is getting more popular. <a href="" title=""></a>

If I want to create a multiple player game, and each player can have
their own account and profile. Can I use drupal to do so? And could
anybody point me what I should learn in drupal to work with HTML5 game
so that I can understand how the whole process is? (I'm new to drupal.
So please excuse me if my question is very naive.) Thanks!

Drupal pdf document


I'm not able to find pdf version of drupal document on drupal document
page. Does anybody know if there is one? Thanks!

How to estimate how many people-year is need to build a website and how many people is needed to maintain a website?


I'm wondering whether is an easy way to estimate how many people-years
are needed to build a website and how many people are needed maintain
a website. Some website has a staff webpage showing all the supporting
staffs, which make it easy to estimate. But such a webpage is not
available, is there a way to estimate based on the content or some
other characteristics of website for an estimate?