I followed Alan D. Moore's step-by-step guide to have my Raspberry Pi running in kiosk mode.
I did my own configuration as I needed it to run on a touchscreen with no physical keyboard and mouse.
Here's how my ~/.xinitrc file looks.
xset s off
xset -dpms
matchbox-window-manager &
matchbox-keyboard &
while true; do
rsync -qr --delete --exclude='.Xauthority' /opt/kiosk/ $HOME/
midori -i 600 -e Fullscreen -e Navigationbar -a http://myport.ac.uk
done
I used apt-get install for the matchbox-keyboard to be used as an on-screen virtual keyboard solution.
Just look at how small the keys are! Barely touchable and super inaccurate...
The real question is if anyone knows of a way to make the keyboard bigger, could recommend other solutions or tweak the config? I am a total debian newbie so I really hope I get some help here. :)
Look here: http://mottie.github.io/Keyboard/
You can make an OSK with javascript.
Try to replace the line:
matchbox-keyboard &
with:
matchbox-keyboard -s 20 &
where -s is the font size (letter) that appears on each key.
Related
Is there any way to prevent the rasberry console from getiing black after a while?
I use only the console without any GUI. I already tried the following, but it didnt work at all :(
/etc/kbd/config
BLANK_TIME=0
POWERDOWN_TIME=0
Would be very greatful for any hints
Type this...
sudo sh -c "TERM=linux setterm -blank 0 >/dev/tty0"
Add this line to the bottom of your ~/.bashrc file to have the blank screen disabled on boot.
I've a sd card on my phone, it's some type of freez , I could not do any thing on it , when I remove files , it removes and then come back to what it was , it's not formatting.
it freeze and nothing works on it .
What I've tried so fa :
1- tried diskpart in cmd and change readonly and it's not write protected I think .
What should I do ? How can I save this sd card ?
two possibilities, first is that being a hardware thing, as micro SDHC have a little notch you can easily notice which matches another notch in the reader and that basically just enables it in read-only mode. That you can't change, just try to use another reader or you could put a piece of silicon or tape on notch, easiest thing is to use another reader.
Second possibility is that being a file permission issue, in which case you can do the following : In terminal, use these commands:
gksudo nautilus
This will launch nautilus in root shell and bypass all permissions. OR:
sudo fdisk -l
This will give you a list of the drives on your system, figure out which drive it is in the list, easiest way is to look for the blocks as this is the space. It will probably be /dev/sdb or /dev/sdc, then
sudo chown -hR <your username> <the SDHC drive, /dev/sdb for example>
this will change ownership of the drive to you. OR:
sudo chmod -R 777 <the SDHC drive, /dev/sdb for example>
Though if you just execute the first command sudo nautilus it will save you all this trouble, but you'll have to do it every time you use the SDHC.
If all of this doesn't work, use this command :
sudo mount --options remount,rw
If you have a Linux computer with an SD/MMC card reader, try running
sudo sdtool /dev/mmcblk0 unlock
Note that you need an MCC device (not a USB mass storage device) for this to work.
sdtool can be found here.
I have been searching in google since one day and I have not found any information of how to resize the webbrowser window (for example, half of the screen) just starting the raspberry pi.
At the moment I achieved starting the webbrowser in kiosk with this code:
In /etc/xdg/lxsession/LXDE-pi/autostart
#xset s off
#xset -dpms
#xset s noblank
#epiphany-browser http://www.google.de
Any idea of how can give/configure a given size to the browser?
I solved by my own.
Just creating a script and using wmctrl in the script.
When starting the PC it run automatically this script.
#!/bin/bash
epiphany http://www.google.de &
sleep 15s
epiphany --new-window www.wikipedia.com &
sleep 15s
SOURCE=/usr/bin
echo "$SOURCE"
$SOURCE/wmctrl -r wikipedia -e 0,0,0,800,1080
$SOURCE/wmctrl -r Google -e 0,800,0,1120,1080
I'm currently playing with my brand-new raspberry with adafruit's touch-tft and raspberry Cam.
I noticed, if I run raspivid -p, it displays the preview in a frame on top of the bash.
How can I create an application (java, python, c++(preferred)) to display a GUI without having to startx?
I'd love to use adafruit's touch-tft for a project, but startx needs a lot of resources. Of course it would be cool to have the touch-functionality too.
Edit:
Maybe I expressed myself a little bit confusing: I would like to create an application that doesn't need startx but has some kind of GUI.
The answers below aren't 100% ready to go but they pointed me to the right direction. Since I saw many similar questions I will try to give a step-by-step solution:
Setup your raspberry with adafruit's TFT: https://learn.adafruit.com/adafruit-pitft-28-inch-resistive-touchscreen-display-raspberry-pi/overview
(you don't have to replace the TFT with HDMI as standart display)
be sure FRAMEBUFFER=/dev/fb1 startx is running correctly on the TFT screen, I have my TV plugged in the HDMI port, this way I can use the bash on the TV screen and run x on the TFT
Follow this tutorial to create your first pygame: http://www.pygame-doku.laymaxx.de/tut/intro/intro.html
(you can just copy&paste, wget ball.gif)
Insert this 2 lines at the beggining: (github.com/notro/fbtft/wiki/Pygame)
import os
os.environ["SDL_FBDEV"] = "/dev/fb1"
If you want to test the touch-screen to, you can change Line 15:
From:
if event.type == pygame.QUIT: sys.exit()
To:
if event.type == pygame.MOUSEBUTTONDOWN: sys.exit()
This will exit the application if you touch the screen
Save file e.g. pygame1.py and execute with $python pygame1.py
You should now see a bouncing ball on your TFT while the HDMI output still displays the BASH on your TV (but it isn't active of course) touching the screen will exit the game if you completed step 6
Why I'm doing this? This way you can display a simple GUI with e.g. buttons to do some action, like turn your lights on/off if you use your RPI for home-control.
You can use for example pygame library! check this tutorial http://archive.furtherfield.org/rp-resources/RP-workshop-handout.pdf pg. 17
Below, you will find a detailed description of how to be a minimal window manager to start a graphics program of your choice.
-Install Required Packages:
apt-get update
apt-get install xorg - no-install-recommends gdm3 matchbox-window-manager Iceweasel rsync-y
-The system in question, select Add a new user interface gdm3. The terminal is the default name will be used.
adduser kiosk
-Create-Xsession. This script will be executed when the user logs on.
xset s off
xset -dpms
matchbox-window-manager &
while true; do
rsync -qr --delete --exclude='.Xauthority’ /opt/kiosk/ $HOME/
firefox http://www.google.com (Replace your application!!!)
done
Save Ctrl + O; Exit: Ctrl + X
chmod a + x. xsession
cp / opt / kiosk / .xsession / home / kiosk
Set Auto-Login. Kiosk user will enter automatically after boot.
nano / etc/gdm3/daemon.conf
[Daemon]
AutomaticLoginEnable = true
AutomaticLogin = kiosk
We have chosen to configure, program, if necessary
-Screen calibration when not loaded up the whole screen:
/ Boot / config.txt file, clear the comment:
disable_overscan = 1
I hope I helped
Check out Urwid, a text-based ui that can run in a terminal, or, I assume, on a Raspberry Pi started up without startx.
In short you can't, applications like gedit are built atop of a desktop environment (e.g. Gnome, Kde).
I'm having trouble getting 256 colors to work using emacs 23.1.1 connecting using PuTTY and screen. Server is running CentOS 5.6.
In my PuTTY config, my terminal-type string is set to xterm-256color. In my .screenrc I have term xterm-256color Once in screen tput colors gives me 256, echo $TERM gives me xterm-256color, but once I start emacs M-x list-colors-display only gives me 8 colors.
Not sure what the problem is.
Thanks.
I hit the same problem.
To fix this problem, just add this to ~/.bashrc (yes,I use bash)
# -----------
export TERM=xterm-256color
export TERMCAP=
# ------------
run screen and emacs in an screen window. it's ok now.
versions:
bash-4.2.45
emacs-24.3_10
Screen version 4.00.03 (FAU) 23-Oct-06
Your ~/.screenrc should read:
term screen-256color
(this shouldn't be mixed up with xterm-256color)
Putty has a setting to allow 256 color mode. It's under Window/Colours, labeled "Allow terminal to use xterm 256-colour mode". Make sure it's checked.
After you load emacs, you can confirm the TERM value emacs is using with:
(assoc 'tty-type (frame-parameters (car (frame-list))))
It should be (tty-type . "xterm-256color").
Looking at your post and your responses to others, it sounds like your problem is... screen. To test my hypothesis, try this ...
$ wget http://www.frexx.de/xterm-256-notes/data/256colors2.pl
$ chmod 755 256colors2.pl
$ ./256colors2.pl
... if you see 256 colors in the shell, but not in screen, the problem is screen. And, even if there are other problems, you are going to have to fix screen in order to have any hope of seeing 256 colors in emacs ;)
I recently fixed this situation for myself on a system where I don't have sudo by building a personal copy of screen. Screen is small and it is no big deal to do ... and, IMHO, emacs w/256 colors is well worth the bother.
On Linux 2.6.x I did this:
$ wget ftp://ftp.gnu.org/gnu/screen/screen-4.0.3.tar.gz
$ tar -xf screen-4.0.3.tar.gz
$ cd screen-4.0.3
$ ./configure --prefix=$HOME --enable-colors256
$ make
$ make install
Test the new screen out with ...
$ ~/bin/screen
$ ./256colors2.pl
... if it works, put this in your ~/.bashrc:
PATH=~/bin:$PATH ; export PATH
The screen I ended up with reports being an earlier version ...
$ ~/bin/screen -v
Screen version 4.01.00devel (GNUdf0777e) 2-May-06
... than the version on my system:
$ /usr/local/bin/screen -v
Screen version 4.00.03 (FAU) 23-Oct-06
But while they both claim to support 256 colors...
$ tput colors
256
Only the new build really does. Yeah!
I had similar difficulties, I believe both of these lines were required for screen, putty, and emacs to get along with 256 colors.
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
term xterm-256color
You may also need this line too.
defbce "on"
Speak up if that's still not enough.
Try using emacs in daemon mode instead (emacs --daemon), and open emacsclients (emacsclient -t) instead of using screen/tmux. This will give you one less variable to handle in debugging this.
I was having a similar problem with putty and screen, though not using emacs. Following ataylor's response, I went to Window/Colours in Putty. In there I found and checked 'Use system colours'. This fixed my issue.