ArchThis Forum is for the discussion of Arch Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
You should install fonts with pacman -- write (or copy) a simple PKGBUILD to install ones you can't find in the AUR.
I see. man pkgbuild. That looks pretty easy, and keeps everything organized. I'll give it a go, instead of just rudely copying files around.
I also had to install 2 fonts into /usr/share/ghostscript. That requires meticulous hand editing of Fontmap. Don't bugger your Fontmap or yer hooped. Actually, gs seems to have improved dramatically since 8.01. Now it actually tells me errors and issues as they happen, instead of barfing some cryptic message with a stack trace down the road somewhere, leaving me in the dark as to what exactly the problem is. I was laughing last night, because it seems people who program postscript are from some other planet. Did you know postscript is a legitimate programming language?
Code:
%!
% PostScript program to draw calendar
% Copyright (C) 1987 by Pipeline Associates, Inc.
% Permission is granted to modify and distribute this free of charge.
% /month should be set to a number from 1 to 12
% /year should be set to the year you want
% you can change the title and date fonts, if you want
% we figure out the rest
% won't produce valid calendars before 1800 (weird stuff happened
% in September of 1752)
/month 7 def
/year 2015 def
/titlefont /Times-Bold def
/dayfont /Helvetica-Bold def
%/numfont /Helvetica-Bold-Italic def
/numfont /Helvetica-Bold def
/month_names [ (January) (February) (March) (April) (May) (June) (July)
(August) (September) (October) (November) (December) ] def
/prtnum { 3 string cvs show} def
/prtoutnum {
gsave
.5 setlinewidth
0 setgray
3 string cvs
true charpath stroke
grestore
} def
/drawgrid { % draw calendar boxes
dayfont findfont 10 scalefont setfont
0 1 6 {
dup dup 100 mul 40 moveto
[ (Sunday) (Monday) (Tuesday) (Wednesday) (Thursday) (Friday) (Saturday) ] exch get
100 center
100 mul 35 moveto
1.0 setlinewidth
0 1 5 {
gsave
100 0 rlineto
0 -80 rlineto
-100 0 rlineto
closepath stroke
grestore
0 -80 rmoveto
} for
} for
} def
/drawnums { % place day numbers on calendar
numfont findfont 18 scalefont setfont
/start startday def
/days ndays def
start 100 mul 88 add 20 rmoveto
1 1 days {
/day exch def
gsave
/special 0 def % flag to tell us to print saturday/sunday with gray interior
day start add 7 mod 0 eq
{
submonth 0 eq
{
% .8 setgray
/special 1 def
} if
} if
day start add 7 mod 1 eq
{
submonth 0 eq
{
% .8 setgray
/special 1 def
} if
} if
special 1 eq {
.8 setgray
} if
gsave day prtnum grestore
special 1 eq {
day prtoutnum
} if
grestore
day start add 7 mod 0 eq % it's a sunday
{
day 9 gt {
currentpoint exch pop 80 sub 78 exch moveto
}
{
currentpoint exch pop 80 sub 88 exch moveto
} ifelse
}
{
day 9 eq {
90 0 rmoveto
}
{
100 0 rmoveto
} ifelse
} ifelse
} for
} def
/drawfill { % place fill squares on calendar
/start startday def
/days ndays def
0 35 rmoveto
1.0 setlinewidth
0 1 start 1 sub {
gsave
.9 setgray
100 0 rlineto
0 -80 rlineto
-100 0 rlineto
closepath fill
grestore
100 0 rmoveto
} for
submonth 1 eq
{
/lastday 42 def
600 -365 moveto
}
{
/lastday 40 def
400 -365 moveto
} ifelse
lastday -1 ndays start 1 add add
{
/day exch def
gsave
.9 setgray
100 0 rlineto
0 -80 rlineto
-100 0 rlineto
closepath fill
grestore
day 7 mod 1 eq
{
600 -365 80 add moveto
}
{
-100 0 rmoveto
} ifelse
} for
} def
/isleap { % is this a leap year?
year 4 mod 0 eq % multiple of 4
year 100 mod 0 ne % not century
year 400 mod 0 eq or and % unless it's divisible by 400
} def
/days_month [ 31 28 31 30 31 30 31 31 30 31 30 31 ] def
/ndays { % number of days in this month
days_month month 1 sub get
month 2 eq % Feb
isleap and
{
1 add
} if
} def
/startday { % starting day-of-week for this month
/off year 9600 sub def % offset from start of "epoch"
off
off 4 idiv add % number of leap years
off 100 idiv sub % number of centuries
off 400 idiv add % number of goofy weird days
% off 1000 idiv add % number of millenia
% 7 add 7 mod 6 add % offset from Jan 1 2000
6 add 7 mod 7 add % offset from Jan 1 9600
/off exch def
1 1 month 1 sub {
/idx exch def
days_month idx 1 sub get
idx 2 eq
isleap and
{
1 add
} if
/off exch off add def
} for
off 7 mod % 0--Sunday, 1--monday, etc.
} def
/center { % center string in given width
/width exch def
/str exch def width str
stringwidth pop sub 2 div 0 rmoveto str show
} def
/right { % right justify string in given width
/width exch def
/str exch def width str
stringwidth pop sub 0 rmoveto str show
} def
/calendar
{
titlefont findfont 36 scalefont setfont
0 50 moveto
/month_name month_names month 1 sub get def
month_name show
/yearstring year 10 string cvs def
700 yearstring stringwidth pop sub 50 moveto
yearstring show
0 0 moveto
drawnums
0 0 moveto
drawfill
0 0 moveto
drawgrid
} def
90 rotate
50 -120 translate
/submonth 0 def
calendar
month 1 sub 0 eq
{
/lmonth 12 def
/lyear year 1 sub def
}
{
/lmonth month 1 sub def
/lyear year def
} ifelse
month 1 add 13 eq
{
/nmonth 1 def
/nyear year 1 add def
}
{
/nmonth month 1 add def
/nyear year def
} ifelse
/submonth 1 def
/year lyear def
/month lmonth def
500 -365 translate
gsave
.138 .138 scale
10 -120 translate
calendar
grestore
/submonth 1 def
/year nyear def
/month nmonth def
100 0 translate
gsave
.138 .138 scale
10 -120 translate
calendar
grestore
showpage
when I got this years ago, it had a bug: if the 10th fell on Sunday, it wouldn't compensate and the numbers 10-31 would be out of whack. Bug's gone, I've been using it, since, well, before Arch was around.
You can copy it to a file, call it 'calendar.ps', and print it. Just right click and send it to you printer, it knows what to do. You'll get a lovely one page landscape calendar like you buy from the store, without the pretty girl. Supply them yourself
Does somebody have a link to a GOOD tutorial on udev? Or is there some tidbit I've overlooked?
hi,
you can find here : obarun.org . a try to keep Arch without systemd or libsystemd. it run with runit. a complete graphical environment is installed under openbox but with the minimal required.
some package was rebuild to unsupport systemd like xorg-server lvm2 etc....
Thanks for the link. I'm downloading as I type. Fast server, that's awesome. Done already.
Fortunately, once I got the system working to my liking, I haven't touched systemd since. I still miss /var/log and simple editable boot scripts. All those binaries in /usr/lib get my spidey-senses tingling. I don't like them, and I don't like them a lot.
Who decided SysVinit had to go to the dump? It's worked fine for decades.
sysvinit need a successor not a replacement.
runit is a good alternative for me. work like a charm, simple et robust. but it's only my opinion .
start only what i need and what i want.
try the iso and tell us. i boot in 20 sec (from power button to desktop) with a i3 4330, 8ghz ram, 7200 rpm DD with 16M cache. same machine with systemd take 20sec more and it's not stable what we are saying.
@mdooligan, apparently i have some problem with particular people. Well, my server is a free server for the moment, i would like to change but it isn't possible for the moment.
OK. I got the lite one. Works good. Boot to browser in about 20 seconds. Thanks for the grub menu to boot from existing OS. The rest is all playing with config. NFS, sound, etc. Nice work. I like that: "It's not a distro, just me sharing." Thanks for sharing.
I'll have a closer look when I get a chance, but I like the stripped down, bare metal approach.
Update: v0.4 came through. 728760320 bytes in 11m 52s. Thank you very much.
I'm currently revisiting Arch myself. Last time I installed Arch, it was still using the old init system.
As a Debian Sid user, I'm never comfortable with apt-get dist-upgrade. I see using pacman -Syu as the same deal. I'd rather do pacman -Sy && pacman -Qu to see what's going to be upgraded first.
Last edited by replica9000; 08-20-2015 at 01:32 PM.
I'd rather do pacman -Sy && pacman -Qu to see what's going to be upgraded first.
That's not a good idea because if you decide not to upgrade the system, then the installed packages will be out of sync with the database and this may cause problems if you install new packages.
Quote:
Do not use `pacman -Sy` package or any equivalent such as `pacman -Sy` followed by `pacman -S package`, always upgrade (with `pacman -Syu`) before installing a package.
If you run `pacman -Syu` then you can always say "no" to the proposed upgrade but *do not* install new packages before adding the unwanted packages to /etc/pacman.conf (marked as "IgnorePkg") and upgrading the rest of the system with `pacman -Syu` https://wiki.archlinux.org/index.php...ed_packages.3F
Last edited by Head_on_a_Stick; 08-20-2015 at 02:02 PM.
Reason: added "installed" in the first sentence.
you can upgrade the system without the dependancies by : pacman -Sddu
you can install a package and tell to pacman that a package is already installed by : pacman -S package_to_install --assume-installed package_already_installed (pacman -S colord --assume-installed systemd)
and so one..
be careful when doing this. Pacman is a beautiful and powerfull tools that can break your system without error on his part.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.