Sunday, September 28, 2014

Autorun testing

1/ For PI: - create a desktop file -> running a python file (readme)
- create a desktop file: type nano <filename>.desktop
- type the followings: http://www.raspberry-projects.com/pi/pi-operating-systems/raspbian/gui/desktop-shortcuts
- put it in the autostart directory: 'mkdir ~/.config/autostart" , then copy the desktop file to there (http://raspberrypi.stackexchange.com/questions/12730/start-a-lxterminal-on-startup)
- python path here:
 

setting full screen for lxterminal:

> change the xml file in pi/.config/openbox  -> add
<application name = "lxterminal"> 
<decor>no</decor>
<maximized>true</maximized>
<fullscreen>true</fullscreen>

Procedures for my pi:
- plug in ethernet cable (not the mouse and keyboard)
- plug in power
- everything will start by itself!

* To set HDMI -> VGA, need to change the config file: http://www.makeuseof.com/tag/three-ways-to-display-your-raspberry-pi-on-a-monitor-or-tv/
* To set background and foreground color, just go to lxterminal > preference
* To set screensaver off, edit the file (sudo nano xxxxxxx):






- http://www.etcwiki.org/wiki/Disable_screensaver_and_screen_blanking_Raspberry_Pi
- more methods: http://www.raspberrypi.org/forums/viewtopic.php?f=66&t=18200












- and this: http://it.thelibrarie.com/weblog/2013/07/raspberry-pi-disable-screensaver/

* to remove mouse cursor (this works for me, but you need to remove that line if you want the cursor appears again) : http://darmawan-salihun.blogspot.hk/2013/01/disabling-raspberry-pi-cursor-inside.html
...
[SeatDefaults]
xserver-command=X -nocursor
...

2/XP computer : running a web page
1/ get firefox and set the homepage
2/ download an addon call full screen add on -> do the settings for auto full screen
3/ create a new firefox short cut in start up : start> all programs > right click > ..
4/ hide your mouse here: http://www.softwareok.com/?seite=Microsoft/AutoHideMouseCursor

3/ macbook : running a python file (writeemail)

- Download iTerm2 to replace original terminal (because with full screen feature)
- Then set the default command line (say: run a specific python path)
- Set the full screen mode and set as default window arrangement
- in iTerm2 preference, check for default window arrangement (means everytime will open in full screen)
- go to system preference > account > login > add in iTerms (to make sure whenever macbook login, it will automatically load iTerm2)

Monday, September 22, 2014

autorun

For the purpose of minimizing administrative procedures, I have to think of ways to smooth-en the setup of my works.

Currently I have three programs, my ideal mapping as follow:
  • Pi -> run python script > 
- need to make a launcher script http://www.instructables.com/id/Raspberry-Pi-Launch-Python-script-on-startup/
- edit http://www.slideshare.net/SeggySegaran/raspberry-pi-autostarting-a-python-program
- start on terminal: http://www.raspberrypi.org/forums/viewtopic.php?f=32&t=76653
- setting screen size: http://ubuntuforums.org/showthread.php?t=1888851
- edit configure file for full screen: http://forum.lxde.org/viewtopic.php?f=3&t=31566 
- more customization: http://bbs.archbang.org/viewtopic.php?id=355
- autorun when boot: http://www.raspberrypi.org/forums/viewtopic.php?f=91&t=65607
- note: can it do full screen automatically?
  • mac book -> run python script
- Download iTerm2 to replace original terminal (because with full screen feature)
- Then set the default command line (say: run a specific python path)
- Set the full screen mode and set as default window arrangement
- in iTerm2 preference, check for default window arrangement (means everytime will open in full screen)
- go to system preference > account > login > add in iTerms (to make sure whenever macbook login, it will automatically load iTerm2)
- SUCCESS!!

-> also need to do ssh to allow remote access-> just in case need to fix any issues

extra:

- autorun a PI with full screen browser and a specific address: http://www.raspberry-projects.com/pi/pi-operating-systems/raspbian/gui/auto-run-browser-on-startup

Sunday, September 21, 2014

Thinking about error code and exceptions

In an exhibition settings, of course I would like to minimize the possible errors and so that minimize admin configuration by the gallery assistant. As such, I need to implement functions such as: continuous loop, catch exceptions and log them, also bypass if any exceptions are found. Then I realize this acts possibly the ways to contribute automation. To keep machines running, no matter errors are found, it keeps produce thing.




Programming 3: reading networked replies

Third screen is about reading networked replies..
- selecting what to display: I tend to display everything includes header and things that is usually hidden in an email client interface. But I do want to exclude the original sent message (which includes poems), because audience suppose to see those msg already and it is hardly seen everything in one screen if there is no mouse provided.

Thursday, September 11, 2014

Exhibition: computers allocation

1x windows - run python - screen 2 [need to check if i need to install python] -> or download another browser to run animation such as firefox.
1x Pi -> run python - screen 3 [python available in pi]
1x macbook -> run animation on a browser

two php run on the server, a conj job is set.
1x getting the latest spammer list
1x display animated interface 

Programming 2: sending out spam poems

The second program logic has been drafted. It took me almost two days to finish the programming.
*outstanding thing:
1/ think of how to select around 8k emails
2/ dedicated IP -> trial run -> load test for consecutive days of code running