Home : Linux : Distros :
Debian
My introduction to Debian was a Dockstar I converted to a mini CLI PC (no video). The Dockstar sat around until my server PC crashed (fried motherboard). Seeing that the Dockstar could function as a server (minimal services and low traffic), I bought a Cubieboard2. I'm writing this on the Cubieboard and posting it to the Dockstar... now writing on a Raspberry Pi2 and posting to the Cubieboard (with rsync backups going to the Dockstar).
Raspberry Pi2 with Raspbian Lite and TDE
GhostRaider's [GUIDE] Raspberry Lite with LXDE GUI provides a good introduction to getting Raspberry Pi OS Lite up and running (Part 1)... The above is a bit out of date, the Raspberry Pi Imager makes installing the Pi OS easy (currently bullseye).
This post is a mini how to install the lightweight Trinity Desktop Environment, an active and up to date KDE3 fork that runs quite well on the Raspberry Pi2... and Pi3.
1) Add the Debian Trinity Repository sources to /etc/apt/sources.list. The two deb sources are required, the two deb-src lines are optional. You can do this with nano (sudo nano /etc/apt/sources.list), or by logging into the pi from another pc (ssh, enabled via raspi-config). Once logged in, paste the following (sudo to 2nd EOF) and hit enter. Note: The first line should end with two less than symbols followed by EOF.
--- 06/22 update
sudo tee -a /etc/apt/sources.list <<EOF
deb http://mirror.ppa.trinitydesktop.org/trinity/deb/trinity-r14.0.x raspbian-bullseye main
deb http://mirror.ppa.trinitydesktop.org/trinity/deb/trinity-builddeps-r14.0.x raspbian-bullseye main
deb-src http://mirror.ppa.trinitydesktop.org/trinity/deb/trinity-r14.0.x raspbian-bullseye main
deb-src http://mirror.ppa.trinitydesktop.org/trinity/deb/trinity-builddeps-r14.0.x raspbian-bullseye main
EOF
2) Add the GPG signing key
wget http://mirror.ppa.trinitydesktop.org/trinity/deb/trinity-keyring.deb
sudo dpkg -i trinity-keyring.deb
2.5) Install aptitude (no longer in Raspbian Lite)
sudo apt-get install aptitude
3) Install Trinity desktop
sudo apt-get update
sudo aptitude install tdebase-trinity
While the minimum tdebase-trinity is my favored install, installing tde-trinity provides a lot more TDE apps and would be a better choice unless you know/remember the KDE3 apps you need/want/use/like (e.g. ksnapshot, kolourpaint, kuickshow, kpdf, ark, etc.).
That's it, all dependencies should be pulled in with that single install line.
(Reboot and) enter startx on the command line to boot the Trinity GUI. Note: I was expecting to get TDM like I did on previous installs, but I think I prefer the no login (default) > startx when Trinity is the only GUI.
The default Pi OS Lite install appears to use legacy video drivers that mess up the visuals in Trinity apps. Installing their gldriver-test and enabling the experimental GL driver (raspi-config) solved the graphical issues.
The default also has screen blanking on by default. It appears that the monitor cannot be woken up without xscreensaver installed or screen blanking turned off (via raspi-config), I chose the later.
--- End 06/22 update (some of the following is likely outdated)
You'll probably want to add some programs and synaptic (sudo aptitude install synaptic-trinity) can make that task easier. One thing you need to be careful of is TDE VS KDE apps, e.g. ark (KDE) VS ark-trinity (TDE). All TDE (VS KDE) apps have a -trinity at the end of the package name.
Sudo users should install tdesudo-trinity, others will need to add a root password (sudo passwd root).
While I use Konqueror (filemanager and web browser) for all local/network browsing, and known to work external sites, Firefox and/or Chromium are needed for many sites. Chromium is nice, but it can get bogged down. TTBOMK it's the only program on my system that's made use of the swap partition... not a problem with a 3-6 tabs and I've come to like it better than Firefox... even less of a problem since it has been added to the Raspbian repository (chromium-browser and rpi-chromium-mods)... With Firefox now in the repository, that is what I'm using.
OMXPlayer works really well (local and over sftp). To integrate it into TDE, navigate to its main menu entry (if there is no entry, right click on Multimedia and select Edit menu, File, New Item and Name it OMXPlayer), right click Edit item and change Command (Name and Command are all that's needed) to
xterm -fullscreen -fg black -bg black -e omxplayer -o hdmi --no-ghost-box --align center %u
Leave out -o hdmi if using the headphone jack for sound (no need to specify the default -o local). You can also click the icon to change it. Click the Save icon and exit. In Konqueror, browse to a file you want to play, right click and select Properties, click on the wrench and Add the OMXPlayer application (it's in the Multimedia section, same as in the main menu). Now you can click on any file with that extension (e.g. .mkv) and it will be played with OMXPlayer.
If you install Kodi, Log Out of TDE with End Session. From the log in manager Menu, select Kodi and log in. When you Exit Kodi you'll need to select TDE from the menu to log back into TDE.
...Because I run the HDMI video through a VGA converter and a KVM?, a cold boot doesn't pick up the monitors EDID info - doesn't set/use the monitors native resolution. While rebooting fixes that, setting hdmi_group=2 and hdmi_mode=nn in /boot/config.txt is a permanent fix. See the raspberrypi.org config.txt documentation for details (e.g. hdmi_mode options).
6/22
Raspbian_Trinity_Repository_Installation_Instructions
newer stable builds
[ comment | link | top ]
This post is a mini how to install the lightweight Trinity Desktop Environment, an active and up to date KDE3 fork that runs quite well on the Raspberry Pi2... and Pi3.
1) Add the Debian Trinity Repository sources to /etc/apt/sources.list. The two deb sources are required, the two deb-src lines are optional. You can do this with nano (sudo nano /etc/apt/sources.list), or by logging into the pi from another pc (ssh, enabled via raspi-config). Once logged in, paste the following (sudo to 2nd EOF) and hit enter. Note: The first line should end with two less than symbols followed by EOF.
--- 06/22 update
sudo tee -a /etc/apt/sources.list <<EOF
deb http://mirror.ppa.trinitydesktop.org/trinity/deb/trinity-r14.0.x raspbian-bullseye main
deb http://mirror.ppa.trinitydesktop.org/trinity/deb/trinity-builddeps-r14.0.x raspbian-bullseye main
deb-src http://mirror.ppa.trinitydesktop.org/trinity/deb/trinity-r14.0.x raspbian-bullseye main
deb-src http://mirror.ppa.trinitydesktop.org/trinity/deb/trinity-builddeps-r14.0.x raspbian-bullseye main
EOF
2) Add the GPG signing key
wget http://mirror.ppa.trinitydesktop.org/trinity/deb/trinity-keyring.deb
sudo dpkg -i trinity-keyring.deb
2.5) Install aptitude (no longer in Raspbian Lite)
sudo apt-get install aptitude
3) Install Trinity desktop
sudo apt-get update
sudo aptitude install tdebase-trinity
While the minimum tdebase-trinity is my favored install, installing tde-trinity provides a lot more TDE apps and would be a better choice unless you know/remember the KDE3 apps you need/want/use/like (e.g. ksnapshot, kolourpaint, kuickshow, kpdf, ark, etc.).
That's it, all dependencies should be pulled in with that single install line.
(Reboot and) enter startx on the command line to boot the Trinity GUI. Note: I was expecting to get TDM like I did on previous installs, but I think I prefer the no login (default) > startx when Trinity is the only GUI.
The default Pi OS Lite install appears to use legacy video drivers that mess up the visuals in Trinity apps. Installing their gldriver-test and enabling the experimental GL driver (raspi-config) solved the graphical issues.
The default also has screen blanking on by default. It appears that the monitor cannot be woken up without xscreensaver installed or screen blanking turned off (via raspi-config), I chose the later.
--- End 06/22 update (some of the following is likely outdated)
You'll probably want to add some programs and synaptic (sudo aptitude install synaptic-trinity) can make that task easier. One thing you need to be careful of is TDE VS KDE apps, e.g. ark (KDE) VS ark-trinity (TDE). All TDE (VS KDE) apps have a -trinity at the end of the package name.
Sudo users should install tdesudo-trinity, others will need to add a root password (sudo passwd root).
While I use Konqueror (filemanager and web browser) for all local/network browsing, and known to work external sites, Firefox and/or Chromium are needed for many sites. Chromium is nice, but it can get bogged down. TTBOMK it's the only program on my system that's made use of the swap partition... not a problem with a 3-6 tabs and I've come to like it better than Firefox... even less of a problem since it has been added to the Raspbian repository (chromium-browser and rpi-chromium-mods)... With Firefox now in the repository, that is what I'm using.
OMXPlayer works really well (local and over sftp). To integrate it into TDE, navigate to its main menu entry (if there is no entry, right click on Multimedia and select Edit menu, File, New Item and Name it OMXPlayer), right click Edit item and change Command (Name and Command are all that's needed) to
xterm -fullscreen -fg black -bg black -e omxplayer -o hdmi --no-ghost-box --align center %u
Leave out -o hdmi if using the headphone jack for sound (no need to specify the default -o local). You can also click the icon to change it. Click the Save icon and exit. In Konqueror, browse to a file you want to play, right click and select Properties, click on the wrench and Add the OMXPlayer application (it's in the Multimedia section, same as in the main menu). Now you can click on any file with that extension (e.g. .mkv) and it will be played with OMXPlayer.
If you install Kodi, Log Out of TDE with End Session. From the log in manager Menu, select Kodi and log in. When you Exit Kodi you'll need to select TDE from the menu to log back into TDE.
...Because I run the HDMI video through a VGA converter and a KVM?, a cold boot doesn't pick up the monitors EDID info - doesn't set/use the monitors native resolution. While rebooting fixes that, setting hdmi_group=2 and hdmi_mode=nn in /boot/config.txt is a permanent fix. See the raspberrypi.org config.txt documentation for details (e.g. hdmi_mode options).
6/22
Raspbian_Trinity_Repository_Installation_Instructions
newer stable builds
[ comment | link | top ]
Cubieboard SD Image
Igor Pecovnik's SD image... now Armbian (which is different enough to make this post outdated) , for a Micro home server on the Cubieboard, was one of the key factors in my choosing the Cubieboard for my new server. I used his standard Wheezy image (but not his server script) and, to see what the board could do, installedthe latest (r14) Trinity Desktop Environment (which I'm liking a lot).
Sound
To get sound from the headphones jack I created an /etc/asoundcard.conf containing:
pcm.!default {
type hw
card 0 # card 0 = headphone output, card 1 = HDMI sound
device 0
}
ctl.!default {
type hw
card 0 # card 0 = headphone output, card 1 = HDMI sound
}
Note: one source of this information has invalid (in this context) //... comments (should be #...).
Testing speaker output ($ speaker-test -twav -c2) failed with a permissions error, so I added myself (dave) to the audio group (as root).
# adduser dave audio
Video
I'm running the HDMI output through a VGA converter, and KVM switch, to the VGA socket on my monitor... With a plug-n-play monitor, the cubie should boot using the monitor's native resolution. If it doesn't, make sure the cable has 14-15 connected pins. Pins 12 and 15 need to be connected for EDID to work. Pin 9 (missing on 14 pin cables) may be needed for EDID to work with some TV's (not monitors). I learned this the hard way. I bought a new Sewell VGA cable with 15 pins on both ends, but only 10 of the pins are connected end to end. I also have an ancient cable with 11 connected pins (4 missing pins). Neither cable works because the wires the cubie (any PC) needs to read the monitor's EDID ROM don't exist.
With my setup, EDID seems to be the only option. Changing the /boot/uEnv.cb2 disp.screen0_output_mode=EDID:1280x720p60 to a setting supported by both the cubie and the monitor (which is /sys/class/graphics/fb0/modes?) could work. If it's a valid setting, it will only work if EDID doesn't (fallback mode) or if you remove the EDID: bit. I got a blank screen when I removed the EDID: bit, even when I used the EDID provided settings, so I may be missing something.
IPv6
To disable IPv6 in the kernel, add ipv6.disable=1 to extraargs= in /boot/uEnv.cb2.
Initially I added the suggested entriesto /etc/sysctl.conf, but the effect was minimal and /proc/sys/net/ipv6 was still there - it's gone when the above method is used.
Use # netstat -lnptu to see what servers/daemons are configured to listen on IPv6.
Bind9 "listen-on-v6 {none;};" didn't work, adding -4 to /etc/default/bind9 (OPTIONS="-4 -u bind") did.
The -4 flag works for ntpd as well (/etc/default/ntp, NTPD_OPTS='-4 -g').
For sshd I uncommented "ListenAddress 0.0.0.0" (/etc/ssh/sshd_config) to limit it to IPv4.
For avahi-daemon I changed "use-ipv6=yes" to no (/etc/avahi/avahi-daemon.conf).
Disabled services/modules:
Note: new to me and quite possibly not the right way to do it.
Services disabled with '# update-rc.d -f [service] remove'... I'm not sure where I got that, update-rc.d [service] disable makes more sense (man), ('# update-rc.d [service] defaults' to restore):
avahi-daemon, bluetooth, hostapd, cupsd, cups, saned
Kernel modules commented out in /etc/modules:
bluetooth: hci_uart, bt_gpio, rfcomm, hidp
wifi: wifi_gpio, bcmdhd
TDE Konqueror Detailed List View (or anything other than icons) as default directory format (source):
TCC > TDE Components > File Associations > Type: inode > directory > embedding
Select and move the desired defult view to the top of the Services Preference Order.
...You can also start from Konqueror's Services (2nd image) or Go menus.
...Things like USB sticks, CD-ROMs, SMB, NFS, etc. aren't affected unless you also change the default views for all/select media in media (2nd down from inode).
Hardware Accelerated Video for h264 and mpeg1/2 with Mplayer2 (Wheezy mplayer doesn't have vdpau support)
LIRC: Unlike the Raspberry Pi, RC6 (Philips protocol *) remotes aren't supported. Remotes for the Cubie are limited to those that use the NEC protocol (when using sunxi-ir module). Apparently, many TV remotes should work. I don't have any, so I will be trying a sub $2 remote I found with a "NEC remote control" search on eBay.
...The remote works w/ the cubie, but mine is currently on the other side of a wall (no line of sight to the receiver) so I haven't done much w/ it (my /etc/lirc/lircd.conf and draft ~/.licrc).
see also: Sendmail, Cubieboard Case
[ comment | link | top ]
Sound
To get sound from the headphones jack I created an /etc/asoundcard.conf containing:
pcm.!default {
type hw
card 0 # card 0 = headphone output, card 1 = HDMI sound
device 0
}
ctl.!default {
type hw
card 0 # card 0 = headphone output, card 1 = HDMI sound
}
Note: one source of this information has invalid (in this context) //... comments (should be #...).
Testing speaker output ($ speaker-test -twav -c2) failed with a permissions error, so I added myself (dave) to the audio group (as root).
# adduser dave audio
Video
I'm running the HDMI output through a VGA converter, and KVM switch, to the VGA socket on my monitor... With a plug-n-play monitor, the cubie should boot using the monitor's native resolution. If it doesn't, make sure the cable has 14-15 connected pins. Pins 12 and 15 need to be connected for EDID to work. Pin 9 (missing on 14 pin cables) may be needed for EDID to work with some TV's (not monitors). I learned this the hard way. I bought a new Sewell VGA cable with 15 pins on both ends, but only 10 of the pins are connected end to end. I also have an ancient cable with 11 connected pins (4 missing pins). Neither cable works because the wires the cubie (any PC) needs to read the monitor's EDID ROM don't exist.
With my setup, EDID seems to be the only option. Changing the /boot/uEnv.cb2 disp.screen0_output_mode=EDID:1280x720p60 to a setting supported by both the cubie and the monitor (which is /sys/class/graphics/fb0/modes?) could work. If it's a valid setting, it will only work if EDID doesn't (fallback mode) or if you remove the EDID: bit. I got a blank screen when I removed the EDID: bit, even when I used the EDID provided settings, so I may be missing something.
IPv6
To disable IPv6 in the kernel, add ipv6.disable=1 to extraargs= in /boot/uEnv.cb2.
Initially I added the suggested entriesto /etc/sysctl.conf, but the effect was minimal and /proc/sys/net/ipv6 was still there - it's gone when the above method is used.
Use # netstat -lnptu to see what servers/daemons are configured to listen on IPv6.
Bind9 "listen-on-v6 {none;};" didn't work, adding -4 to /etc/default/bind9 (OPTIONS="-4 -u bind") did.
The -4 flag works for ntpd as well (/etc/default/ntp, NTPD_OPTS='-4 -g').
For sshd I uncommented "ListenAddress 0.0.0.0" (/etc/ssh/sshd_config) to limit it to IPv4.
For avahi-daemon I changed "use-ipv6=yes" to no (/etc/avahi/avahi-daemon.conf).
Disabled services/modules:
Note: new to me and quite possibly not the right way to do it.
Services disabled with '# update-rc.d -f [service] remove'... I'm not sure where I got that, update-rc.d [service] disable makes more sense (man), ('# update-rc.d [service] defaults' to restore):
avahi-daemon, bluetooth, hostapd, cupsd, cups, saned
Kernel modules commented out in /etc/modules:
bluetooth: hci_uart, bt_gpio, rfcomm, hidp
wifi: wifi_gpio, bcmdhd
TDE Konqueror Detailed List View (or anything other than icons) as default directory format (source):
TCC > TDE Components > File Associations > Type: inode > directory > embedding
Select and move the desired defult view to the top of the Services Preference Order.
...You can also start from Konqueror's Services (2nd image) or Go menus.
...Things like USB sticks, CD-ROMs, SMB, NFS, etc. aren't affected unless you also change the default views for all/select media in media (2nd down from inode).
Hardware Accelerated Video for h264 and mpeg1/2 with Mplayer2 (Wheezy mplayer doesn't have vdpau support)
- Add "sunxi_cedar_mod" to the /etc/modules file
- Installing pkg-config, vdpauinfo and libvdpau-dev (w/ associated deps) is required to make libvdpau-sunxi (next)
- Make/install libvdpau-sunxi, see zip readme
Note: The following is probably needed because I haven't learned how to use git properly. - Copy/link above created /usr/lib/arm-linux-gnueabihf/vdpau > /usr/lib/vdpau (won't be found otherwise)
- Add VDPAU_DRIVER=sunxi to /etc/environment file
- Create /lib/udev/rules.d/90-sunxi-disp-permission.rules with contents:
KERNEL=="disp", MODE="0777", GROUP="video"
KERNEL=="cedar_dev", MODE="0777", GROUP="video" - In /boot/uEnv.cb2 remove sunxi_ve_mem_reserve=0 (default 80 reserved, seems fine), or change it to 128.
- Run # adduser your_username video
- Edit ~/.mplayer/config (only the last two are required)
fs=yes
ao=alsa:device=hw=0.0
vo=vdpau
vc=ffh264vdpau,ffmpeg12vdpau - To set TDE default play: select video file, right click, select properties, click wrench icon and move mplayer to the top... You may need to create it (Settings > Menu Editor, command: mplayer %U). If moving mplayer up doesn't stick/work, move the players above it down
- Reboot
LIRC: Unlike the Raspberry Pi, RC6 (Philips protocol *) remotes aren't supported. Remotes for the Cubie are limited to those that use the NEC protocol (when using sunxi-ir module). Apparently, many TV remotes should work. I don't have any, so I will be trying a sub $2 remote I found with a "NEC remote control" search on eBay.
...The remote works w/ the cubie, but mine is currently on the other side of a wall (no line of sight to the receiver) so I haven't done much w/ it (my /etc/lirc/lircd.conf and draft ~/.licrc).
see also: Sendmail, Cubieboard Case
[ comment | link | top ]