Remote X server through SSH - Ubuntu Touch General

So I figured out how to get a remote X server working through ssh. So far I have only ran xeyes, xclock and gedit. I am going to try other heavier x applications to see what works
To do this you need to install openssh via these instructions:
https://wiki.ubuntu.com/Touch/ReleaseNotes#Accessing_the_device_over_SSH
once you can ssh into your phone, you then want to install xauth, x11-apps, and gedit
sudo apt-get install xauth x11-apps gedit
Then when finished installing you want to 'logout' of your ssh and log back in with -Y:
ssh -Y [email protected]_of_device
This will now forward x11 connections to your desktop. If you see an error about X11 forwarding after entering your password, add -v to ssh and it will give you more details about why it failed.
Now you should be able to run xeyes and xclock to test it, and use gedit to edit text files. Note that gedit seemed rathe slow to start, it may be because of wifi.

I tried some additional X applications and these ones work:
gimp
inkscape
nautilus
xterm
libreoffice
geany
meld
gnome-terminal (need to edit profile color settings to not use system theme)
glxgears (works better modified to use glFinish before glXSwapBuffers)
electrum (had to edit it because it thought it was android)
eclipse (takes a while to initialize, don't ctl-c!)
These installs but do not work
blender (installs but segfaults)
eog (installs but relocation error libframe.so.6)
These do not install:
qtcreator (qt dependencies)
tortoisehg (qt dependencies)
vlc (qt dependencies)
lastfm (qt dependecies)
minitube (qt and other dependencies)
musique (qt and other dependencies)
wings3d (erlang-wx dependency)
It seems anything that uses qt doesn't install, I'm guessing there are conflicts with the newer version and the older versions.

I thought there was no X and apt-get on the Ubuntu Touch OS.

Sv: Remote X server through SSH
Ubuntu touch (UI) doesn't use X as screen server. But the Ubuntu desktop inside, still does.
Sent from my Transformer using xda app-developers app

blackout23 said:
I thought there was no X and apt-get on the Ubuntu Touch OS.
Click to expand...
Click to collapse
Ubuntu touch does indeed use apt, it is burred inside of the Ubuntu chroot but works.
Although Ubuntu Touch's UI does not use X11 (rather Android's Native Display Flinger), X11 still seems to be baked into the distro.

These X applications are being displayed on the Ubuntu desktop that I am using to ssh into the phone.
I am also able to do this in Windows 7 using putty for ssh and vcxsrv as an X server:
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
http://sourceforge.net/projects/vcxsrv/
and then in a putty ssh session:
export DISPLAY=windows_ip_address:0.0
then all x applications route to your windows desktop
You don't need to have an X server on the phone to run them, you only need the x libraries and in the case of `ssh -Y` you also need xauth.

I figured out how to get qt4 applications to install and run, although for some reason they run considerably slow, which could also be that it is going over wifi.
I had to add a repository, which I did through synaptic.
sudo apt-get install synaptic
sudo synaptic
and then in synaptic select Settings > Repositories
Add a new repository.
URI: http://ppa.launchpad.net/canonical-qt5-edgers/qt5-proper/ubuntu/
Distribution: quantal
Section(s): main
exit synaptic and update
sudo apt-get update
Then you can start installing qt4 applications
sudo apt-get install qtcreator
I tried to build the gallery-app but it didn't find a kit.
It would be awesome some day to build apps on the device itself, or at least plug it into any computer with an x server (Linux, Mac, or Windows) and develop that way.

Thanks for sharing. Gonna give it a go.
Sent from my GT-P7300

Related

[GUIDE] Lazyman's installation guide to ADB on Ubuntu 10.10 - Now with Ubuntu 11.10 !

I've been searching around the forums,the stickies and Google on how to install ADB in Ubuntu from scratch but I wasn't able to get a guide anywhere. What I found mostly are for Windows or little bits and pieces of info which did not cover the whole thing. Which is when I decided to grab some Tab and Mountain Dew, and Google my way through to make it work and share it to those who had trouble or no idea how to install it on Ubuntu.
When I'm writing this, I'm using Ubuntu 10.10 64bit to install and run everything. I will update the guide periodically for updates and other things. There was mentions of using Eclipse SDK while searching around, but I won't be touching on that. There's another guide for it at the end of my guide. I have yet to encounter any problems while using ADB in 64bit environment. I've tested it out on the 32bit platform as well and it works. It'll also work on SD and NAND versions of Android for the HD2, since it's my main phone. Also, this is my first time making a guide, so bear with me if there's any mistakes. I've checked the article a few times hoping that it's clear and easy to understand. From
Steps 1 to 4 and Steps 6 and 7, there's no differences in installation instructions for Ubuntu 11.04. You do have to take special note in Step 5 and the key difference of ADB working for your device in Ubuntu 11.04 is found here.
For Ubuntu 11.10, you can see the guide here. Credit goes to loveubuntu for making it.
Step 1. Install JDK
You'll need to install JDK for ADB to work. If you have already installed JDK, I recommend reinstalling it again, just in case there are new updates or you have the older version.
In Terminal, do the following
Code:
$ sudo add-apt-repository ppa:sun-java-community-team/sun-java6
$ sudo apt-get update
$ sudo apt-get install sun-java6-jre sun-java6-bin sun-java6-jdk
Edit: If you're getting a "404 Not Found" when trying to install java in Ubuntu 11.04, this link here will give you a quick fix.
Edit: If you want or need to use Eclipse, here's a simple installation command
Code:
$ sudo apt-get install eclipse ruby rubygems ruby-dev libxml2 libxml2-dev libxslt-dev openjdk-6-jdk ant git
$ sudo gem install nokogiri
Step 2. Download and Install Android SDK
Download the Android SDK. Obviously, choose the one for linux (android-sdk_rXX-linux_86.tgz), where "rXX" is the latest version.
Code:
http://developer.android.com/sdk/index.html
Extract the android-sdk-linux_x86 folder from android-sdk_rXX-linux_x86.tgz. Just double click the tgz file, and drag-n-drop the that lone folder to your desired location. In my case, I extracted the files to my Home Folder, which I highly recommend. I'll also advice to not renaming the folder.
Step 3. Choose packages to install
In Terminal, type the following -
Code:
$ cd ~/android-sdk-linux_x86/tools
$ ./android update sdk
The 'Android SDK and AVD Manager' window will appear (screencap below). You can choose to accept all of them or just install all except for Android 1.5 and 1.6. Once installation is finished, it will prompt you to restart the manager. Just click 'Yes' and close the manager
Step 4. Check your device's permission
Now head over to the platform-tools directory
Code:
$ cd ~/android-sdk-linux_x86/platform-tools
Check if you have permission for your device
Code:
$ ./adb devices
If you're getting the following, go on to Step 5.
Code:
List of devices attached
???????????? no permissions
If you're getting something like this or other random numbers with the word device next to it, congrats! You now could use ADB. Now go on to Step 7.
Code:
List of devices attached
0123456789ABCDEF device
Step 5. Giving permission to your device
You'll need to create a certain udev rule. First off type the following in Terminal:
Code:
$ sudo gedit /etc/udev/rules.d/99-android.rules
For those using Ubuntu 10.10, use the following! For Ubuntu 11.04 users, please scroll down a little for 11.04 guide.
Ubuntu 10.10
Once the gedit window pops-up, type the following line.
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="####", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev"
Take note of ATTRS{idVendor}=="####". Replace #### to the correct Vendor ID of your device. If you're using Acer, then it's 0502, for HTC it's 0bb4. ADB might not be able to detect your device if you use the wrong ID. Here's a list of each vendor's ID. Source: http://developer.android.com/guide/developing/device.html
Code:
Manufacturer USB Vendor ID
Acer -0502
Dell -413c
Foxconn -0489
Garmin-Asus -091E
HTC -0bb4
Huawei -12d1
Kyocera -0482
LG -1004
Motorola -22b8
Nvidia -0955
Pantech -10A9
Samsung -04e8
Sharp -04dd
Sony Ericsson -0fce
ZTE -19D2
Save the file and exit out of gedit. Back in Terminal execute the following
Code:
$ sudo chmod a+rx /etc/udev/rules.d/99-android.rules
$ sudo restart udev
For Ubuntu 11.04. Special thanks to mmdl1001 for figuring this one out! Would've posted it earlier Ubuntu 11.04 was a little nasty on my PC for me to test it out. VMWare saved me though...
For Ubuntu 11.04 users, you'll need an 8 digit number, which is slightly different from Ubuntu 10.10. Copy and paste the following code in the 99-android.rules file you created
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="####:####", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev"
TEST=="/var/run/ConsoleKit/database", \
RUN+="udev-acl --action=$env{action} --device=$env{DEVNAME}"
Next, you'll need to find the digits to replace "####:####' above. In terminal type
Code:
$ lsusb
You should be getting a list like so. Note that what is generated in your PC will be much different from mine below!
Code:
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 046d:c019 Logitech, Inc. Optical Tilt Wheel Mouse
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 010: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 007: ID 22b8:2d66 Motorola PCS
Look for your device. It's easily identifiable via its brand . In this case, "Bus 001 Device 007: ID 22b8:2d66 Motorola PCS" is for my device. Copy the ID numbers, 22b8:2d66 for my case, and replace the ####:#### in the 99-android.rules file. Save the file and close gedit and execute the following in Terminal.
Code:
$ sudo service udev restart
Now to check if it works
Code:
$ ./adb devices
You should be getting the following line or something similar.
Code:
List of devices attached
0123456789ABCDEF device
Congrats! Now you can use ADB in Ubuntu! Now hop on to Step 6!
If that fails and still give you "???????????? no permissions", try restarting the adb server. That should do the trick. If that still doesn't work, check the file, 99-android.rules, that you created earlier. Most likely you have put in the wrong Vendor ID.
Code:
$ sudo adb kill-server
$ sudo nohup adb start-server
Step 6. Now to have fun!
Head down to Captainkrtek's ADB Workshop and Guide for everyone to learn how to use ADB. Take note that while using adb in Linux, you'll need to type ./adb to execute adb unless you create a path in bashrc. Go to Step 7 for that . For now, here are some examples on running adb if you don't create a path.
To get into the phone
Code:
[email protected]~/android-sdk-linux_x86/platform-tools:~$ ./adb shell
To grab files from phone
Code:
[email protected]~/android-sdk-linux_x86/platform-tools:~$ ./adb pull /system/etc/file.txt file.txt
To send file to phone
Code:
[email protected]lelune-~/android-sdk-linux_x86/platform-tools:~$ ./adb push this.txt /sdcard/this.txt
Also, do take note that when you pull a file, it will save itself in your android-sdk-linux_86 folder if no destination folder was given.
Step 7. Create path for ADB
Code:
$ sudo gedit ~/.bashrc
Add the following line at the very end of the file. Once you're done, save and exit.
Code:
# Android tools
export PATH=${PATH}:~/android-sdk-linux_x86/tools
export PATH=${PATH}:~/android-sdk-linux_x86/platform-tools
Now you can just run adb like it's a command.
Edit: Okay, for some odd reason, while the above worked for my desktop, it failed when I tried it on my notebook. If you tried to create a path but it failed, here's an alternative method
Code:
$ gedit ~/.profile
Once the gedit window pops up, scroll down to the very bottom of the file and add this line
Code:
[...]
PATH="$HOME/android-sdk-linux_x86/tools:$HOME/android-sdk-linux_x86/platform-tools:$PATH"
Once you've saved and closed gedit, run the following command in Terminal
Code:
export PATH="$HOME/android-sdk-linux_x86/tools:$HOME/android-sdk-linux_x86/platform-tools:$PATH"
And that's about it. Feel free to comment, give suggestions or ask questions if you're still unsure.
Also for more in-depth guide, try HowtoForge. Just found this guide today and I find it VERY useful and even have a good guide on Eclipse.
Took me about 10 mins to get this going. Thank you very much!
I have a guide to setup up a build enviroment for compiling android on a ubuntu 10.10 64bit or 32bit that covers adb also along with test signing. Just google guide to compiling android, covers cm7 and you will find it. It might be under gridlock32404 which was my old user name
Sent from my HTC Vision using XDA App
ffffffffuuuuuuuu where was this last year? took me 2 days to get ADB working in Ubuntu 10.04 lol.
i do have the Ubuntu 10.10 ISO image...thinking about dual booting with win7 64bit.
not sure why i want to go back to Linux though...games ran slower on it =/
Amazing work man. It works like a charm with my milestone.
nice tutorial but it would be even nicer to have a .deb; I never made debs before but I think this should all be doable with rpm though, so I guess it should also be doable with debs
(eg with a postinstall script update udev rules, using sed, restart abd and add a .desktop file)
saved a lot of do it myself
i was about to do this thank you for doing it first nice
I get following error when i try to refresh sources.
Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml, reason: java.lang.RuntimeException: error instantiating default socket factory: java.security.KeyManagementException: java.security.KeyStoreException: java.io.FileNotFoundException: /usr/lib/jvm/java-1.5.0-gcj-4.4/jre/lib/security/cacerts (No such file or directory)
Click to expand...
Click to collapse
Edit:- I installed all packages like openjdk, openjre, icedtea etc and i was able to connect to google repo.
thanks Im installed
atapia984 said:
Took me about 10 mins to get this going. Thank you very much!
Click to expand...
Click to collapse
You're welcome! Honestly, it took me about 2 to 3 hours to get it running.
godutch said:
nice tutorial but it would be even nicer to have a .deb; I never made debs before but I think this should all be doable with rpm though, so I guess it should also be doable with debs
(eg with a postinstall script update udev rules, using sed, restart abd and add a .desktop file)
Click to expand...
Click to collapse
Personally, I don't think a .deb file is required. Almost everything can be found in the repository anyways and it's quite easy to set up using terminal, and uh, I never really made debs before either
thank u very muchhhhhhhhhhhhhhhhhhhhhhh, ADB was big problem with me .
thanks again.
sdk now says "x86"
I'm not sure if anyone else had this problem, but I was foolishly copying and pasting the commands over from the OP and it didn't work.
However, when I realized that the SDK package is now titled "android-sdk-linux_x86" with that tiny little "x" before the "86", I got it to work flawlessly.
Now my Ubuntu ADB installation works easier than my Windows ADB!
could someone tell me if you can run movie after you run ubuntu on your PDA
expeciali .mkv video...
please ansevar me...
strikeir13 said:
I'm not sure if anyone else had this problem, but I was foolishly copying and pasting the commands over from the OP and it didn't work.
However, when I realized that the SDK package is now titled "android-sdk-linux_x86" with that tiny little "x" before the "86", I got it to work flawlessly.
Now my Ubuntu ADB installation works easier than my Windows ADB!
Click to expand...
Click to collapse
Thanks for the heads up! I've updated the guide accordingly. Looks like they've changed the name with revision 10
Cool write up. definitely bookmarked.
only because i want to compare it to the method i used to get it running earlier. There are a lot of extra steps it looks like with this method that i didn't do earlier.
Thanks. First method to add to path didn't work, but second did finely.
very nice, thank you. Only three hints that helped me get everything working perfectly:
1- Assume you have no permission and create the udev rule step. In that same step when typing
Code:
./adb devices
to see if it worked, make sure you cd to the right directory. You have to be in
Code:
cd ~/android-sdk-linux_x86/platform-tools
.
2- In step 7 creating paths, eliminate the space between {PATH}: and ~/android. If left that way, the terminal gives you a not valid identifier error.
3- The Howtoforgelink at the bottom is very nice also but note that they are using an older SDK and file name has to be changed if you want the latest (add the x).
I hate the fact that most guides out there for a Linux based OS (Android) is written for Windows. Quite ironic. Thanks again for your hard work.
loveubuntu said:
very nice, thank you. Only three hints that helped me get everything working perfectly:
1- Assume you have no permission and create the udev rule step. In that same step when typing
Code:
./adb devices
to see if it worked, make sure you cd to the right directory. You have to be in
Code:
cd ~/android-sdk-linux_x86/platform-tools
.
2- In step 7 creating paths, eliminate the space between {PATH}: and ~/android. If left that way, the terminal gives you a not valid identifier error.
3- The Howtoforgelink at the bottom is very nice also but note that they are using an older SDK and file name has to be changed if you want the latest (add the x).
I hate the fact that most guides out there for a Linux based OS (Android) is written for Windows. Quite ironic. Thanks again for your hard work.
Click to expand...
Click to collapse
Thanks, I'm gonna try it out on my notebook when I get a chance on Monday. Left it at my workplace. Hopefully, that little space is the reason why the path didn't work on my notebook .
As for the HowtoForge guide link, I wasn't able to find a more updated version for it. It'll be great if they update that guide as well though.
It really is kind of sad, and ironic, that Windows is dominating even on a Linux based OS which is Android. But after playing around with both Windows and Ubuntu for ADB, I personally find ADB on Ubuntu is much more easier (and a bit more stable) to handle. Maybe it's because I usually work with command line on Linux and more on GUI on Windows.
I came across this thread on DF also that seems to be very helpful. CorCor67 put a lot of time into it.
http://www.droidforums.net/forum/droid-themes/129400-themer-studio.html
I cross referenced both threads for those looking
Anybody know howto - about fastboot.exe I mean I have done all the steps ahead and have adb installed but cant figure out how to install fastboot in platform-tools directory.
I reinstalled it again but there is no fastboot.exe it hadn`t appeared in platform-tools. 3 month`s ago I did it just like that and it installed fastboot automagically but this time I just don`t now what to do and where to dig. Not able to flash radio at the moment.
Ubuntu 10.04
Desire HD

(Working) Ubuntu on A500

Maybe you've heard of this app? https://market.android.com/details?id=com.galoula.LinuxInstall
Note: You need to be rooted for this to work.
I've just installed and run it on my a500 (After a full backup through CWM of course). In settings, I set it to install Ubuntu Maverick Meerkat. It installed fine, although you have to go through some trial and error with the settings panel:
Loop file must be "/data/local/tmp/Linux.loop"
"Bind Android" must be enabled
"Allow write on /system" must be enabled!
Linux is activated through a terminal by typing "linuxchroot". Here is an extract from the terminal. (I'll upload screenshots when I find a working program.)
Code:
#linuxchroot
I: Mounting device for ubuntu maverick...
I: Entering chroot...
I: Executing /etc/init.android/rc_enter.sh
/etc/init.android/rc_enter.sh: 2: /etc/init.d/hostname.sh: not found
[email protected]:/# cat /etc/issue
Ubuntu 10.10 \n \l
[email protected]:/# apt-get install python
Reading package lists... Done
Building dependency tree... Done
python is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[email protected]:/# python
Python 2.6.6 (r266:84292, Sep 16 2010, 14:12:30)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 3+7
10
>>> exit()
[email protected]:/#
I'm running a stock 4.010.13_COM_GEN2 rom.
I'm working my way around the console now. As you can see, apt-get and python work. I just need to figure out how (if it's possible) to install gnome onto this installation.
Update:
So it turns out "add-apt-repository" isn't installed by default in the usual place. Or the shortcut doesn't work. Either way, I found that the /usr/bin directory contains all the required files. Since this linux seems to log you in directly into root, which might not have well-made shortcuts, you cannot access the applications normally. I cd'd inbto /usr/bin and add-apt-repository works. Now to see if usr can be the default login.
Alright. Forget about trying to get a GUI working on this type of linux. Nvidia's Tegra drivers for Xorg are MIA.
Getting the following:
/system/xbin/linuxchroot.sh: UID: readonly variable
Any thoughts?
Sent from my MB860 using xda premium
just_mike said:
Getting the following:
/system/xbin/linuxchroot.sh: UID: readonly variable
Any thoughts?
Sent from my MB860 using xda premium
Click to expand...
Click to collapse
When do you get the message? Right after you type "linuxchroot"? If so, try typing su then hitting enter; and then typing "linuxchroot"
Same thing happens, will post over in the main thread? Thanks
Sent from my MB860 using xda premium
If you want a working guide with all the necessary files there is an app in the market.
For Ubuntu:
https://market.android.com/details?id=com.appbuilder.u14410p30729
Or for backtrack:
https://market.android.com/details?id=com.appbuilder.u14410p30729
Both work on the iconia. The only fiddling I had to do was change a CD command from the guides suggested command to CD /mnt/external_sdcard. I am able to boot both from my iconia .
profclean2000 said:
If you want a working guide with all the necessary files there is an app in the market.
For Ubuntu:
https://market.android.com/details?id=com.appbuilder.u14410p30729
Or for backtrack:
https://market.android.com/details?id=com.appbuilder.u14410p30729
Both work on the iconia. The only fiddling I had to do was change a CD command from the guides suggested command to CD /mnt/external_sdcard. I am able to boot both from my iconia .
Click to expand...
Click to collapse
I cant load it in the iconia
FearL0rd said:
I cant load it in the iconia
Click to expand...
Click to collapse
Where are you stuck? Maybe I can help.
GNOME
Zen_Jackal said:
I just need to figure out how (if it's possible) to install gnome onto this installation.
Click to expand...
Click to collapse
Idea: Install GNOME and then a VNC client and connect.
I'll try it later. Will post my conclusions/steps taken/results here.
-Cameron
Zen_Jackal said:
Alright. Forget about trying to get a GUI working on this type of linux. Nvidia's Tegra drivers for Xorg are MIA.
Click to expand...
Click to collapse
http://developer.nvidia.com/linux-tegra
Possibly this could help??
You cannot run Xorg with Tegra 2 drivers when your GPU is already in use by Android. Either you have to run some sort of a virtual Xorg driver and use VNC to connect to the Linux, or you have to use native Linux and scrap Android.
Connecting via VNC works just fine, I'm doing it all the time... Just don't try running a heavyweight like GNOME or KDE, use something like LXDE (looks ok, but it's a lot faster!). There are plenty of tutorials on how to set this up on the internet.

X11 on Acer Iconia A500 (3.2) through VNC

Hi everbody,
I do not know if this is an appropriate place to for this post but since I am a new member, it was not possible to post it in development.
Please note that if you choose to apply following steps, I accept no responsibility about whatever happens. Do not come back and whine about a bricked device.
I have been trying to get a Linux system running on my beloved A500, and I also wanted to have X windows system (I have to confess that I suck at command prompt). I have finally achieved it. I thought to sketch a short "how to". Most of things I explain here are from a post by gmaster1440. I just wanted to have a "how to" for specific our beloved A500. I hope this help.
1- You need to root your A500. I do not think this would work on a unrooted device. Also, you need to have an internet connection (preferably a fast one) for installation. During the following procedure, I was using Hacker's Keyboard. It has most of the keys like CTRL which will greatly ease your job.
2-Grab Linux Installer from the market.
3- Read through the documentation (at the very least Quick Installation guide).
4- Install Debian Wheezy on your sdcard. (it is not recommended to install in on external sdcard although I did so). Ubuntu distros did not work for me, so I had to try several installations. finally I did get it working on Debian Wheezy. To connect you debian you need a SSH client. I used ConnectBot for that purpose. In connectBot, just select localhost, give connection any name and hit enter (return). This will give you a prompt with $ sign. Depending on where you put your linuxchroot script, you have to go there. In my case it is in /system/xbin directory. Just go where ever it is and run the script. If you left the option in linuxInstaller as there are, it should be named linuxchroot. Run it. If everything goes ok, you will get a bash (don't know what bash is? maybe more reading for you?) prompt.
5- As explained in the original thread by gmaster1440 here, install tightvncserver. You can do this by the command "apt-get install tightvncserver" (without quotes)
6- Next you need to install a desktop. Here you have several choices with several tastes and capabilities. Including ooo-so-mighty Gnome and KDE, but I just went with lxde. If you choose to install lxed you just need to enter "apt-get install lxde" on your command prompt. This will take a while depending on you internet connection speed so be patient (it took about an hour in my case).
7- You also need a VNC client for your A500. I tried this with android-vnc-viewer and Mocha VNC Lite and later worked better for me (in terms of resolution, color and keyboard input). Any other suggestions welcome.
8- You need to setup a few more things on your Debian before connection. Again quoting from the thread by gmaster1440, you have to issue following command on your debian prompt
export USER=root
additionally I did the following
export TERM=linux
export HOME=/root
You have to do this each time you connect your debian so it is a good idea to put them into your .bashrc file or to create a script.
9- You are ready to start your vncserver, in debian command propot just write "vncserver" and hit enter. This will (hopefully) start vncserver, and asks you for two passwords, enter a password for the first one. vncserver will want you to repeat this first password twice. After the first password, it will ask for a second password for view only connection, Just skip it.
10- After starting vncserver, kill it by issuing "vncserver -kill :1". Navigate to folder /root/.vnc and open the config file "xstartup" with a text editor of your choice. For newbies nano works just fine. Just write "nano xstartup". If you do not have nano then intall it "apt-get install nano". Comment out the line "/etc/X11/xsession" by putting a "#" sign before it (without quotes) and add this two lines
lxde (return)
lxsession (return)
then just save the file. (hit X while pressing CTRL "remember hackers keyboard") it will ask you if you are sure, say yes, hit enter again for not changing the ile name and return to the command prompt.
11- start vncserver again and connect it with your android vnc client. user name is root (remember export NAME), password is whatever you entered when you first run vncserver, host is localhost, and port is (at least in my case) 5901 (port can be different in your case depending on several things including number of vncserver you run, you can check it on the log files under /root/.vnc folder). Say connect and hopefully you will see your X-desktop.
You can specify the resolution o X desktop as you invoke it. That is, "vncserver -geometry 800x600" creates a X desktop in 800x600 pixels.
I still have to play with it to make it more productive and fun. Maybe I will add a screenshot as well. I would like to hear about any suggestions and (for sure) corrections.
Have fun with your X windowed A500.
This setup is very similar to installing Backtrack to the system but without installing the Linux Installer from the Market. If this is faster than installing Backtrack and more efficient, then I am all on it. Will try it later. ThanX for the Tut!
Thanks for the tutorial!
I am wondering which debian version did you choose?
is the businesscard-version (40mb) enough, or do I need to download the whole dvd version?
So which one to choose:
cdimage.debian.org/debian-cd/6.0.3/armel/iso-cd/
-Acid
Linux Installer keeps telling me I don't have root. I'm on Thor 13.2.
Sent from my a500 using xda premium

[WebTop] - [HowTo] - Setup WebTop environment with AfterStep as a window manager

Setting up WebTop environment
Prerequisites
You have to have your phone rooted and SU installed. There are number of exploits and tools available depending on the phone.
Naturally you should already have either Motorola HD Multimedia Dock or whatever webtop capable dock comes with your phone. Good idea to plug it into hdmi capable display and have keyboard+mouse attached to it.​
webtop2sd
It is recommended that you do not modify the WebTop environment in phone's own flash, but instead create a partition on SD card and use webtop2sd utility to copy phone's WebTop. webtop2sd will then mount this partition ontop of the phone's own stuff and if it get's screwed up you'll be able to go back to the blank slate and use your phone's WebTop again.
Get webtop2sd and instructions here.
In my experience running webtop configurator to install lxterminal did not work the first time. I had to reboot the phone one more time, and upon running webtop configurator again - lxterminal installed fine.​
webtopscripts
Package management is horribly broken in webtop due to manufacturers doing weird things to it, and possibly breaking it on purpose. To fix stuff, so that apt-get works again - use webtopscripts. Download from Google Code and follow the instructions. Setup script walks through all of the fixes - there is no need to run individual scripts.
After this you get Ubuntu Jaunty in more or less usable state. Time to install packages and tweak.​
Basic tweaks
The first thing you want to do is disable (or possibly re-configure) xscreensaver. By default it will show nasty looking day-glo colored waves on the screen in colors that hurt eyes like acid. Open LXTerminal - (there should be a button for it on the dock at the bottom of the screen) and run:
Code:
kill $(ps -ef | grep 5000 | grep xscreensaver | cut -c10-15).
Another good thing to kill is webtop-wallpaper. Its a desktop window layered underneath everything else and displaying wallpaper and maybe icons? Anyway this stuff is bad. Kill it:
Code:
kill $(ps -ef | grep 5000 | grep webtop-wallpaper | cut -c10-15)
This changes have effect only temporarily until webtop shuts down, which is either when phone runs out of memory and garbadge collection kicks in or when it's powered off. Note that undocking the phone preserves your session!
For more permanent solution - we need to edit startup scripts, but first we need something to edit those with - my personal low tech favorite - nano:
Code:
sudo apt-get install nano
Also useful the text-mode file manager Midnight Commander :
Code:
sudo apt-get install mc
Both nano and mc are great in large measure because they don't depend on other packages.
Now we can edit the config files:
Code:
sudo nano /osh/usr/local/bin/start-oshwt-1.sh
and comment out xscreensaver line.
Unfortunately as Webtop is using older version of Ubuntu - it runs circa 2009 version of gnome-settings-daemon, which automatically starts xscreensaver with no way to stop this behavior. The only way is to comment out gnome-settings-daemon out of start-oshwt-1.sh, but that will also disable webtop-panel, which is still useful for us until we get AfterStep up and running. Meanwhile use the kill code from above.
Code:
sudo nano /osh/usr/local/bin/start-oshwt-2.sh
and comment out webtop-walpaper line.​
With annoyances taken care of we can now start with with the useful stuff.
Getting the AfterStep
AfterStep package in Jaunty is old and broken in webtop environment, therefore it is recommended to install AfterStep from the source code. Naturally we need some tools :
Code:
sudo apt-get install cvs
sudo apt-get install openssh-client
Strictly speaking ssh client is not required unless you want write access to CVS repository, but it's still useful to have around. Checkout AfterStep sources :
Code:
cvs -d :pserver:[email protected]:/home/cvsroot login
cvs -d :pserver:[email protected]:/home/cvsroot co afterstep-stable
Note: Just hit Enter when prompted for login password​
Compilation
Prerequisites
Naturally, to be able to compile AfterStep we need the compiler :
Code:
sudo apt-get install gcc
That will install gcc 4.3 and binutils. Suggested packages : gcc-multilib, manpages-dev, autoconf, libtool, and if you want to do some debugging - gdb.
Code:
sudo apt-get install autoconf
Also installs automake, autotools-dev and m4.
Code:
sudo apt-get install libtool
Also for some reason compilation won't work without floating point library:
Code:
sudo apt-get install libmpfr-dev
Useful libraries for AfterStep:
Code:
sudo apt-get install libfreetype6-dev
sudo apt-get install zlib1g-dev
Naturally, we need Xorg devel libraries :
Code:
sudo apt-get install xorg-dev
More useful stuff (Optional):
Code:
sudo apt-get install x11-utils
sudo apt-get install nedit
MS Core Fonts, so that you can use Helvetica, Courier, Times, etc. fonts (Optional):
Code:
sudo apt-get install ttf-mscorefonts-installer
Compilation
The actual compilation step should be quite painless:
Code:
cd afterstep-stable
./configure
make
sudo make install
At this point you should have AfterStep installed in /usr/local/bin (binaries) and /usr/local/share/afterstep (data files). Now we need to setup the system to make good use of it.​
System Configuration
Files to change :
/etc/xdg/lxsession/LXDE/config : Replace window_manager line with : window_manager=afterstep -l /home/adas/afterstep.log
/etc/xdg/lxsession/LXDE/default : Comment out xscreensaver, openbox and lxpanel lines.
/usr/local/bin/start-oshwt-1.sh : Comment out gnome-settings-daemon and xscreensaver lines. Apparently fcitx does not work anyway - not sure why they have it in there.
/usr/local/bin/start-oshwt-2.sh : Comment out awn-autostart, webtop-panel, window_switcher and avahi_start lines Note: You can always re-enable webtop-panel, just make sure you start gnome-settings-daemon first. See screensaver notes above.
AfterStep configuration
Copy autoexec file to your home .afterstep dir:
Code:
cp /usr/local/share/aftertep/autoexec ~/.afterstep/
And comment out WorkstateSpace line, as it may trigger duplicate aiw windows and some other weird things due to the way Webtop organizes its X session.​
Finally
Reboot.
At this point you should be all set. Pull the phone out of the dock and reboot it. Put it back in and you should have AfterStep desktop in a few seconds.
If you happened to break things and Webtop don't start - you should be able to recover by double checking or reversing above changes in config files. The files are located under /osh mount point when viewd using Root Explorer on the phone itself.​

[GUIDE] Hosting A Live Wordpress Site On A Raspberry Pi Zero

How to host a WordPress website from home on a Raspberry Pi Zero.
You will need:
-A Raspberry Pi
-A wireless adaptor
-A bit of time
This guide assumes you already have Raspbian running on your Pi.
All commands can be run over ssh but you will need to VNC into it
a bit later. So you could also do all of it through VNC if you wish.
WARNING:
This is a fun little project but it's not advised to run a website
from your home network. If you miss-configure something or don't keep
things updated on your Pi the risk is greater than if you use a
web hosting service because if your Pi gets compromised, the attacker
now has a full Linux distro already authenticated on your network.
The risk of this actually happening is about as low as getting mugged.
It's not likely but...better safe than sorry.
Now for the good bit:
Ssh to your Pi, change the default password to a strong one and lets get started:
Install apache2:
$ sudo apt-get install apache2 -y
$ sudo apt-get install apache2-util
install mysql and php:
$ sudo apt-get install mysql-server php5-mysql -y
(mysql will prompt you for setup)
Restart apache:
$ sudo service apache2 restart
Move to this directory:
$ cd /var/www/
create a new folder:
$ sudo mkdir wordpress
Move to the new directory:
$ cd wordpress
Get wordpress:
$ sudo wget http://wordpress.org/latest.tar.gz
Extract wordpress:
$ sudo tar xzf latest.tar.gz
Move the contents of the wordpress folder to the current directory:
$ sudo mv wordpress/* .
Delete the now empty folder and the tar:
$ sudo rm -rf wordpress latest.tar.gz
Set perms:
$ sudo chown -R www-data: .
Create a database:
$ mysql -uroot -p (this assumes username is root and will prompt for password)
$ create database WordPress;
Forward port 80 to your Pi:
There is no 'one way' to do this. it depends on what router you have.
If you don't know how to do it, use Youtube and Google to find out how.
What you want to do though is forward port 80 to your Pi's LAN adress.
(the adress you used to ssh to the Pi).
Note: Some internet service providers block traffic on port 80 by
default so you may need to use different ones. If thats the case you might
also need to setup apache differently.
Get a domain name:
Go to a freedns site(https://freedns.afraid.org/) and register a subdomain to
your Pi's EXTERNAL IP adress. You can find your external address by visiting
'whatismyip.com' however this requires a screen so you will have to enable VNC
on your Pi by typing '$ sudo raspi-config' and going to the 'advanced' menu.
You then need a VNC viewer on the computer you are setting this up from. So type
'$ sudo apt-get install xtightvncviewer' then connect to you Pi by typing
'$ vncviewer the.Pi.lan.ip:5901'.
Next we need to point apache to the right directory for Wordpress because
you may have noticed that at the moment your subdomain just takes you
to the apache startup page.
$ sudo nano /etc/apache2/sites-enabled/000-default.conf
This will open a config file. Make sure the directory listing in there
is pointing to your Wordpress directory and add your site alias within
the virtual host tags. It should look something like this:
<VirtualHost *:80>
# blah blah blah
# blah blah blah
# blah blah blah
ServerAdmin [email protected]
DocumentRoot /var/www/wordpress
ServerAlias yoursubdomain.here.com
#My changes
<Directory "/var/www/wordpress">
AllowOverride All
</Directory>
# blah blah blah
# blah blah blah
# blah blah blah
/VirtualHost>
press ctrl+o to save it. Hit enter to confirm then exit by
pressing ctrl+x
Now we need to install Wordpress.
In a browser type you Pi's LAN IP address and Wordpress will guide you
through the installation and setup.
(leave the database host as localhost when prompted)
Now we need to change the URLs in the database we created to
the URL of our subdomain.
For this you need to install PHPmyadmin:
$ sudo apt-get install phpmyadmin
You will be prompted to configure it and you will need to put
database username and password in.
The installation process actually adds the phpMyAdmin Apache
configuration file into the /etc/apache2/conf-enabled/ directory,
where it is automatically read.
The only thing we need to do is explicitly enable the php5-mcrypt
extension, which we can do by typing:
$ sudo php5enmod mcrypt
Afterwards, you'll need to restart Apache for your changes to be recognized:
$ sudo service apache2 restart
You can now access the web interface by visiting:
http://localhost/phpmyadmin (through vncviewer) or
http://lan_ip_of_Pi/phpmyadmin(from another machine on the network)
From here, once logged in, you should be able to see a collapsed directory
tree on the left side of the page. One of the databases listed here
should be named 'wordpress'. expand it by pressing the '+' then
click on 'wp_options'. Now in the main window you should see a
table with various entries. The ones we are interested in are
the ones named 'siteurl' and 'home'. Click the edit button to the
left of them and change the value of both of them to:
'http://YOUR_DOMAIN_HERE.com.'
Now there is just one last place to change the URLs.
In the browser of a machine on the same network as your Pi go to the
LAN IP of your Pi adding '/wp-admin' at the end. Log in with the
details you supplied during the setup. At the top of the page you will
now see an admin toolbar. Hover over the icon that looks like a dial
and click on 'dashboard'. When it loads the side bar, scroll down to
'settings' and select 'general'. Here you change 'Wordpress address URL'
and 'site address URL' to your shiny new domain name.
Voila! You should now have a live to the world Wordpress site
running off a cheap home server, with no hosting costs.
This guide 'should' get you all the way to a live site but there
is a chance that extra configuration is needed or that I forgot
something.
Similar steps can be used for all kinds of different servers. If You just want to serve files straight from an apache index style page you can follow this guide, missing out the wordpress stuff and leaving your apache configs alone. Implementing htaccess you can also password protect your files or a folder. If you do this I highly recommend not adding a directory listing for the folder that is 'private'. even if it is password protected.
Enjoy!!

Categories

Resources