Tiny Core Linux

Off-Topic => Off-Topic - Tiny Core Lounge => Topic started by: Ulysses_ on September 22, 2011, 02:50:13 AM

Title: Do you want to make money creating extensions?
Post by: Ulysses_ on September 22, 2011, 02:50:13 AM
Is anyone interested in creating a simple extension for a fee?  Can't do it myself so it would have to be done by someone more technical.  It would probably take you very little time.

If this is of interest, I can pay through paypal.
Title: Re: Do you want to make money creating extensions?
Post by: Ulysses_ on September 22, 2011, 05:07:47 PM
Here's what is required:

A rebuild of flwm_topside with fonts about as large as this:

(http://img17.imageshack.us/img17/2504/15050261.jpg)

Sources must be included plus build instructions as a build script that I can run after booting the live CD of TC 3.8.4 on a PC (x86) and the script does all the downloading necessary and builds the .tcz and associated files.

More extensions wanted also, but let's see how this one goes first.
Title: Re: Do you want to make money creating extensions?
Post by: maro on September 22, 2011, 09:41:09 PM
OK, here is what I believe should suffice:
Code: (bash) [Select]
#!/bin/sh

### a "quick & dirty" FLWM extension creation script ###

MIRROR=http://distro.ibiblio.org
DIR=tinycorelinux/3.x/release/src
FILE=flwm-1.14.tgz
SCRIPTS="/usr/bin/flwm_topside_"

EXT="flwm"
[ "$1" = "-t" ] && shift && EXT="${EXT}_topside"
FONT_SIZE="$1"
echo "$FONT_SIZE" | grep -q '^[0-9][0-9]*$' \
    || ! echo 'need to specify a font size' || exit 1
   
### if the font size is not wanted in the name, comment out the next line ###
EXT="${EXT}_${FONT_SIZE}"

which mksquashfs > /dev/null || tce-load -wi squashfs-tools-4.x
which gcc > /dev/null || tce-load -wi compiletc
[ -f /usr/include/X11//Xlib.h ] || tce-load -wi Xorg-7.5-dev

URL=${MIRROR}/${DIR}/${FILE}
ARCHIVE=$( basename "$URL" )
SRC_DIR=$( echo "$ARCHIVE" | sed 's:\.tgz::' )
PKG_DIR="/tmp/pkg_${EXT}"

# download and extract archive (if required)
[ -d ${SRC_DIR} ] && rm -rf ${SRC_DIR}
[ -f ${ARCHIVE} ] || wget "$URL" || exit
tar xf ${ARCHIVE} || exit

# create the executable (with adjustments for font size and frame layout)
cd ${SRC_DIR}
echo ${EXT} | grep -q topside \
    || sed -i '/^#define TOPSIDE 1$/ s:^:// :' config.h
sed -i "/_FONT_SIZE [0-9]\+$/ s: [0-9]\+$: ${FONT_SIZE}:" config.h
./compileit
mv flwm ${EXT}
cd - > /dev/null

# create package structure (i.e. scipts, the exectuable and the startup script)
sudo rm -rf ${PKG_DIR}
mkdir -p ${PKG_DIR}/usr/bin
sudo cp -p "${SCRIPTS}"* ${PKG_DIR}/usr/bin
if [ "$EXT" != "flwm_topside" ] ; then
    # make appropriate changes in the scripts and to their names
    cd  ${PKG_DIR}/usr/bin
    for SCRIPT in $( ls ) ; do
        sudo sed -i "s:flwm_topside_:${EXT}_:g" "$SCRIPT"
        sudo mv $SCRIPT "${SCRIPT/flwm_topside_/${EXT}_}"
    done
    cd - > /dev/null
fi
sudo cp -p ${SRC_DIR}/${EXT} ${PKG_DIR}/usr/bin
mkdir -p ${PKG_DIR}/usr/local/tce.installed
printf "#!/bin/sh\necho \"${EXT}\" > /etc/sysconfig/desktop\n" \
    > ${PKG_DIR}/usr/local/tce.installed/${EXT}
sudo chown -R root:root ${PKG_DIR}
sudo chmod -R 755 ${PKG_DIR}

# create extension files
rm -f ${EXT}.tcz*
mksquashfs ${PKG_DIR} ${EXT}.tcz > /dev/null
md5sum ${EXT}.tcz > ${EXT}.tcz.md5.txt

Please note that I've taken the liberty to make the script a bit more generic: So as it currently stands a run of this script (which I've named 'cr_flwm_ext.sh') like  cr_flwm_ext.sh -t 18 will create "flwm_topside_18.tcz" and cr_flwm_ext.sh 15 will create"flwm_15.tcz".

I'm not really sure what you hope to achieve by this, because changing just the font size of FLWM will only have an impact on the fonts of the menu and the windows headers. The applications themselves that are managed by the WM are of course not impacted by it.
Title: Re: Do you want to make money creating extensions?
Post by: vinnie on September 23, 2011, 09:45:55 AM
Fine script Maro, even if I do not use flwm but also for my own eyes the font is too small
Title: Re: Do you want to make money creating extensions?
Post by: Ulysses_ on September 23, 2011, 04:28:09 PM
That's way cool! Thanks maro. Where do I send my donation?

Quote
This script makes no attempt to clean up the surplus files extracted from the source archive

This is totally fine, just keeping the .tcz* on a pen drive - as I said it was to be built during a live CD session. 

Quote
changing just the font size of FLWM will only have an impact on the fonts of the menu and the windows headers. The applications themselves that are managed by the WM are of course not impacted by it.

This is totally fine too because I have already received instructions how to change the other font sizes:

http://forum.tinycorelinux.net/index.php?topic=9317.0 (http://forum.tinycorelinux.net/index.php?topic=9317.0)

One last thing I forgot to ask in that thread:

(http://img17.imageshack.us/img17/2504/15050261.jpg)

How can all terminals be made to use a larger font, about as big as the one shown above?

Also, is there any chance of cleartype fonts throughout, to take advantage of TFT displays, such as the font below?

(http://img855.imageshack.us/img855/9748/44363660.jpg)

Just tell me if it seems doable, no need to actually work on it.
Title: Re: Do you want to make money creating extensions?
Post by: Juanito on September 24, 2011, 12:37:25 AM
In future, please first ask if one of the forum members would create your extension for free (the usual way of doing things in the this forum) and failing that post in the off-topic section"
Title: Re: Do you want to make money creating extensions?
Post by: gerald_clark on September 24, 2011, 09:06:11 AM
Selecting a smaller screen resolution will make everything bigger.
Title: Re: Do you want to make money creating extensions?
Post by: vinnie on September 24, 2011, 10:12:58 AM
to change font of aterm add this string to ~/.Xdefaults
Aterm*font: -misc-fixed-medium-r-normal-*-24--*-*-c-*-iso8859-1

I don't remember what is the command to view all font avaible in your OS, i use this.
Title: Re: Do you want to make money creating extensions?
Post by: vinnie on September 24, 2011, 10:32:00 AM
the command is xlsfonts
Title: Re: Do you want to make money creating extensions?
Post by: Ulysses_ on September 24, 2011, 11:05:49 AM
Can't get this to work in .Xdefaults. It works for new terminals you launch from the command line though, if you type:

aterm -fn -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso8859-1

Have you got anything else in .Xdefaults, or any special formatting?  Can you just paste an .Xdefaults that works here?
Title: Re: Do you want to make money creating extensions?
Post by: vinnie on September 24, 2011, 12:15:15 PM
To me works, this is my .Xdefaults
Title: Re: Do you want to make money creating extensions?
Post by: floppy on September 24, 2011, 05:08:35 PM
Is anyone interested in creating a simple extension for a fee?  Can't do it myself so it would have to be done by someone more technical.  It would probably take you very little time.

If this is of interest, I can pay through paypal.
good idea.
Post into http://www.my-hammer.de/ (http://www.my-hammer.de/)
Then the first doing it for xx Euros (or for free) will get the job...!
(sorry in the name of the low patience people having urgent needs with exotic crazy life improving distros..)
Title: Re: Do you want to make money creating extensions?
Post by: Ulysses_ on September 24, 2011, 06:07:15 PM
Except I do not speak German :) 

By the way the extension has been done, see Reply #2 above.
Title: Re: Do you want to make money creating extensions?
Post by: maro on September 24, 2011, 09:38:37 PM
In future, please first ask if one of the forum members would create your extension for free (the usual way of doing things in the this forum) and failing that post in the off-topic section"

Just for the record: I never had any intention to obtain any financial gains for the little script I posted as reply #2. I thought I would just ignore any related questions, but now I felt it to better to state this more explicitly.

I tend to have the habit to create a response when I find a question "interesting" enough. I likewise might put my 2 cents in when I believe to possess some prior knowledge or when a rather quick check of some detail would allow me to add something potentially useful. OTOH monetary considerations are not part of my motivation.
Title: Re: Do you want to make money creating extensions?
Post by: Rich on September 25, 2011, 01:28:09 AM
Hi maro
Based on both your initial reply, and your many other helpful posts, I don't think your motives
were ever in question.
Title: Re: Do you want to make money creating extensions?
Post by: robc on September 25, 2011, 01:37:36 AM
Instead of building a whole new package you can just change the dpi
Title: Re: Do you want to make money creating extensions?
Post by: Ulysses_ on September 25, 2011, 04:11:55 AM
Thank you maro.

Found what was wrong with .Xdefaults: it was to have a line modified, not a new line added.

Instead of building a whole new package you can just change the dpi

That would probably save a lot of effort. What is the command to change the dpi permanently?
Title: Re: Do you want to make money creating extensions?
Post by: vinnie on September 25, 2011, 07:42:41 AM
Hi maro
Based on both your initial reply, and your many other helpful posts, I don't think your motives
were ever in question.

I think these misunderstandings come up easily when taking notable action like the closing of a thread, feelings of aversion can be amplified.


Instead of building a whole new package you can just change the dpi

That would probably save a lot of effort. What is the command to change the dpi permanently?
yep, this is interesting
Title: Re: Do you want to make money creating extensions?
Post by: Ulysses_ on September 25, 2011, 03:00:21 PM
Just found a system-wide setting for the dpi: in .Xdefaults you can type this:

Xft.dpi: 120

But only seen it working in firefox, it does not affect flwm, neither terminals, nor TCB default apps.
Title: Re: Do you want to make money creating extensions?
Post by: vinnie on September 25, 2011, 03:34:43 PM
unfortunately  :(
Title: Re: Do you want to make money creating extensions?
Post by: curaga on September 26, 2011, 08:06:02 AM
That's only for scalable fonts. The X server decides the system DPI, how to override it depends on the server.
Title: Re: Do you want to make money creating extensions?
Post by: robc on September 26, 2011, 11:31:58 AM
Thank you maro.

Found what was wrong with .Xdefaults: it was to have a line modified, not a new line added.

Instead of building a whole new package you can just change the dpi

That would probably save a lot of effort. What is the command to change the dpi permanently?

You should be able to use the -dpi switch
Code: [Select]
Xvesa -dpi 75 -br -screen 1024x768x24 -nolisten tcp or set it in xorg.conf for Xorg
Title: Re: Do you want to make money creating extensions?
Post by: Ulysses_ on September 27, 2011, 05:33:37 AM
That's only for scalable fonts. The X server decides the system DPI, how to override it depends on the server.

Is the following what you mean by overriding the X server's DPI?

You should be able to use the -dpi switch
Code: [Select]
Xvesa -dpi 75 -br -screen 1024x768x24 -nolisten tcp or set it in xorg.conf for Xorg
Title: Re: Do you want to make money creating extensions?
Post by: curaga on September 27, 2011, 08:44:13 AM
Yes.