WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Several problems setting up Tiny Core  (Read 3933 times)

Offline Bluepixel

  • Newbie
  • *
  • Posts: 6
Several problems setting up Tiny Core
« on: November 22, 2020, 05:48:00 PM »
Hi there, after a long day I have finally set up my Tiny Core system.

Everything is functional, I even got pulseaudio working, but there
are still various problems and questions I have about setting up my
system to my preference. I did not want to spam all the boards so I
decided to just post my struggles here.

Alright, first thing first; there is a very annoying pop-up message
when starting up X-Chat.
Quote
Cannot open font:
-b&h-lucidatypewriter-medium-r-normal-*-*-120-*-*-m-*-*-*
Now yes this is likely just a certain font that is not installed on my
system, but this message does not make any sense to my because
I have yet to come across any font with so many characters across
it's name, I just simply don't know what to look for. I'm lost. So, then
my question is; is this a known problem? Either way, does anyone
know how to fix this?

Then, pulseaudio. It's currently working fine, but there is no hotkeys
or shortcuts set to change the sound on the go. Now obviously this
is a matter of customization, but normally I would use something like
sxhkd, but it does not seem to be available in the package manager.
I am not aware if anyone has set something like this up before, also
because Tiny Core is typically not set up as a personalized system..
I did want to know if there was a known way to do this on Tiny Core,
or if there were any recommendations as how to set this up. Another
problem is that the volume always starts out at 8%, but on silence.
This is kinda strange to me, so is there any way I can control the
volume at startup, or might there be a way to remember the current
volume after rebooting.

Finally, WiFi. The WiFi is working fine, and I can properly connect
to my network, but I have no clue how to set up autoconnect. I know
there is probably some wiki or guide on it out there, but I could not
really find much about it (or at least, it did not make a whole lot of
sense to me). So if someone could help me set that up, that would be
fantastic.

Also please forgive me for still being unfamiliar with Tiny Core in case
anything might have a very obvious solution or may not really be related
to Tiny Core in general. I am still rather new to Tiny Core.
I'm running the most recent version of Core Plus installed permanently
installed on my hard drive, in case that matters.


Cheers!

tinycorelinux

  • Guest
Re: Several problems setting up Tiny Core
« Reply #1 on: November 22, 2020, 09:05:38 PM »
Quote
I would use something like sxhkd, but it does not seem to be available in the package manager.
I checked that only TCL for X86_64 repo has this extension, so you can see if it works. If it doesn't, you'll have to compile it yourself.
http://mirrors.163.com/tinycorelinux/11.x/x86/tcz/sxhkd.tcz

Quote
is there any way I can control the volume at startup,

Editing /opt/bootlocal.sh
Code: [Select]
amixer set Master 100% > /dev/null

Quote
or might there be a way to remember the current volume after rebooting.
This might require backing up one of the ALSA or Pulse profiles, which I don't know.

Quote
but I have no clue how to set up autoconnect.

Editing /opt/bootlocal.sh
Code: [Select]
wpa_supplicant -B -i wlan0 -c  /home/tc/wpa_supplicant.conf > /dev/null &
udhcpc -i wlan0 > /dev/null &

If there are any omissions or mistakes, I hope you can point them out, and if you have a different or better approach to each problem,
you can also share them.
« Last Edit: November 22, 2020, 09:09:30 PM by ONE »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: Several problems setting up Tiny Core
« Reply #2 on: November 22, 2020, 11:14:39 PM »
Hi Bluepixel
Welcome to the forum.
... Finally, WiFi. The WiFi is working fine, and I can properly connect
to my network, but I have no clue how to set up autoconnect. I know
there is probably some wiki or guide on it out there,  ...
From the  wifi.tcz.info  file:
Quote
Comments:       A console based tiny wifi scan access point tool.
                Select from menu or type sudo wifi.sh
                Creates wifi.db in HOME directory.
                Can auto connect to first db entry with use of -a flag, e.g.,
                /usr/local/bin/wifi.sh -a 2>&1 > /tmp/wifi.log
                Add above to bootlocal or bootsync for quick auto connect.

                When mobile, use menu for select list of APs.
                wpa_supplicant driver is defined by /etc/sysconfig/wifi-wpadrv
                default is wext. Add it to backup if changed.
                Available drivers wext,nl80211
Found here:
http://tinycorelinux.net/11.x/x86/tcz/wifi.tcz.info

Quote
... Alright, first thing first; there is a very annoying pop-up message
when starting up X-Chat ...
Make sure you have  Xorg-fonts.tcz  installed.
Open the file  ~/.xchat/xchat.conf. Change the 2 lines containing:
Code: [Select]
-b&h-lucidatypewriter-medium-r-normal-*-*-120-*-*-m-*-*-*to:
Code: [Select]
-b&h-luxi mono-medium-r-normal-*-*-120-*-*-m-*-*-*If you don't like that font, change the word  mono  to  sans,  or to  serif.  For a complete list of fonts, run this:
Code: [Select]
xlsfonts
The package is called  xchat.tcz  and the program is called  xchat,  not  X-chat.  Spelling counts when reporting an issue.

tinycorelinux

  • Guest
Re: Several problems setting up Tiny Core
« Reply #3 on: November 22, 2020, 11:24:33 PM »
TCL seems to recommend putting the above type of boot command under ~/.X.d/xxx.sh instead of./opt/bootlocal.sh,
I think to avoid slowing down the boot speed.

For example:
Code: [Select]
su $(/etc/sysconfig/tcuser)
cd ~/.X.d
editor auto.sh
chmod +x auto.sh

The contents of the auto.sh file are as follows
Code: [Select]
# Automatically sets my initialization volume size
amixer set Master 100% > /dev/null

# Automatically connect to my network hotspot
# wpa_supplicant -B -i wlan0 -c  /home/tc/wpa_supplicant.conf > /dev/null &
# udhcpc -i wlan0 > /dev/null &

# It may be easier to use the method provided by Rich
/usr/local/bin/wifi.sh -a 2>&1 > /tmp/wifi.log

# To do other things here

« Last Edit: November 22, 2020, 11:35:45 PM by ONE »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: Several problems setting up Tiny Core
« Reply #4 on: November 23, 2020, 12:08:27 AM »
Hi ONE
Things that need to run before a GUI are started (like kmaps) should go into  /opt/bootsync.sh.
Things that need to run after a GUI are started (like starting a GUI app) should go into  ~/.X.d.
Things that are not sensitive to when they are started can go into  /opt/bootlocal.sh  which runs in the background.

tinycorelinux

  • Guest
Re: Several problems setting up Tiny Core
« Reply #5 on: November 23, 2020, 03:00:44 AM »
Hi ONE
Things that need to run before a GUI are started (like kmaps) should go into  /opt/bootsync.sh.
Things that need to run after a GUI are started (like starting a GUI app) should go into  ~/.X.d.
Things that are not sensitive to when they are started can go into  /opt/bootlocal.sh  which runs in the background.
Thanks for the tip, I see.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Several problems setting up Tiny Core
« Reply #6 on: November 23, 2020, 03:27:16 AM »
And for why the font name is so long: that is the way X11 bitmap fonts are addressed. Name, weight, size, etc are included, when with modern TTF fonts they are all separate info.
The only barriers that can stop you are the ones you create yourself.

Offline Bluepixel

  • Newbie
  • *
  • Posts: 6
Re: Several problems setting up Tiny Core
« Reply #7 on: November 23, 2020, 06:49:30 AM »
Hi there, thanks for all the replies!

Quote
... Alright, first thing first; there is a very annoying pop-up message
when starting up X-Chat ...
Make sure you have  Xorg-fonts.tcz  installed.
Open the file  ~/.xchat/xchat.conf. Change the 2 lines containing:
Code: [Select]
-b&h-lucidatypewriter-medium-r-normal-*-*-120-*-*-m-*-*-*to:
Code: [Select]
-b&h-luxi mono-medium-r-normal-*-*-120-*-*-m-*-*-*If you don't like that font, change the word  mono  to  sans,  or to  serif.  For a complete list of fonts, run this:
Code: [Select]
xlsfonts
So I tried replacing the font in the config, but after starting X-Chat (or just xchat
as it's executable name) I still got the same error, except the font name changed
to the one I replaced it with. After running xlsfonts I found that there were no
-b&h- fonts whatsoever, so I just replaced it with a different font that I liked, and
all was well.

Well, and as for the WiFi and audio problem,

Code: [Select]
#!/bin/sh
#Autoconnect to WiFi
/usr/local/bin/wifi.sh -a 2>&1 > /tmp/wifi.log

#Setup volume
pactl -- set-sink-mute 0 0
pactl -- set-sink-volume 0 40%
I had set up these commands inside of my boot scripts, and it works just as
expected. You might also notice I'm using pactl instead of amixer, that's
because when trying to run the command with amixer, "Master" does not
seem to be recognized, but pactl seemed to handle it just fine, so I went
with that.

I guess all problems that I had mentioned in my initial thread are resolved
now, which is great. I did still want to find a way to bind hotkeys to control
the volume, but seeing as sxhkd is not available in my extension manager,
might there be an alternative program to handle hotkeys for me, otherwise
a smaller and more compact GUI tool for managing audio would be great,
as pavucontrol seems a little excessive for making small adjustments every
so often. If there is no such alternative program, or smaller GUI 'controllers'
I would just prefer setting up my own program in C, for which I would need
some reference as to of how I can turn my executable into a persistent
program that could show up in my work-bar. But I'll look into that myself
before flooding the thread with questions :p

Thanks a lot for the help!
Cheers!


Edit: Nevermind, seems like the pactl command did not want to work for
some reason, I'll look into this and hope I can find a solution. But yeah
in case anyone else has any solution, keep in mind that not only is my
volume at 8%, but it's also muted.
My guess is that pulseaudio has not yet started by the time I'm running
pactl, but who knows. I also tried doing some troubleshooting with amixer,
but I am not able to get it to work..
« Last Edit: November 23, 2020, 07:02:44 AM by Bluepixel »

tinycorelinux

  • Guest
Re: Several problems setting up Tiny Core
« Reply #8 on: November 23, 2020, 07:27:44 AM »
Quote
but seeing as sxhkd is not available in my extension manager,

You can download it manually or compile it yourself.
Code: [Select]
cd /tmp
wget http://mirrors.163.com/tinycorelinux/11.x/x86_64/tcz/sxhkd.tcz
wget http://mirrors.163.com/tinycorelinux/11.x/x86_64/tcz/sxhkd.tcz.dep
wget http://mirrors.163.com/tinycorelinux/11.x/x86_64/tcz/sxhkd.tcz.md5.txt
sudo cp sxhkd* /mnt/your_driver/tce/optional/
tce-load -i sxhkd
« Last Edit: November 23, 2020, 07:31:38 AM by ONE »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Several problems setting up Tiny Core
« Reply #9 on: November 23, 2020, 12:24:43 PM »
There are many hotkey binding programs besides sxhkd, like xbindkeys or actkbd. Many WMs also support such natively (jwm for one).
The only barriers that can stop you are the ones you create yourself.

Offline Bluepixel

  • Newbie
  • *
  • Posts: 6
Re: Several problems setting up Tiny Core
« Reply #10 on: November 23, 2020, 06:40:05 PM »
Hi there, thanks for the replies!

There are many hotkey binding programs besides sxhkd, like xbindkeys or actkbd. Many WMs also support such natively (jwm for one).

Yeah I had found out about xbindkeys and that seemed to do it for me!
I have already made quite a nice setup with it, good stuff.

On another note, I can't seem to figure out how I can adjust my brightness,
I tried xrandr and xbacklight, but there's only errors, something about xrandr's
version.. I also tried looking in my /sys/class/backlight/* directory and finding
something there, but there was only an acpi_video0 folder, in which none
of the files changed the brightness.. Anyways, I'll look into it, but if anyone
has any solutions; let me know!

Cheers!

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Several problems setting up Tiny Core
« Reply #11 on: November 24, 2020, 02:58:41 AM »
xgamma?

If you're on a laptop, you may need Xorg and the native driver to change the builtin display's brightness.
The only barriers that can stop you are the ones you create yourself.