Home
Forum
Help
Login
Register
XO Laptop Shop
Forum Staff
OLPC News
OLPC News Forum
»
XO Laptop
»
XO Hacks
»
Other Operating Systems
»
Xfce?
Welcome,
Guest
. Please
login
or
register
.
Get your own OLPC -
Buy an XO laptop on eBay
!
Pages:
1
...
3
4
5
[
6
]
7
8
9
...
12
« previous
next »
Print
Author
Topic: Xfce? (Read 133803 times)
#75
Re: Xfce?
tlrobinson
Commenter
Posts: 13
Minute 1 Donor
January 08, 2008, 11:17:39 AM
Excellent! I've got my XO set up to open an Xterm only on boot (by editing .Xsession) and can type either "sugar" or "startxfce4" to run Sugar or Xfce.
My only question is, is there a more graceful way of exiting out of Sugar or Xfce than ctrl-alt-backspace, in order to switch between them?
I tried running both at the same time but it does work too well with the XO's limited memory.
Also, is there a way to run Sugar activities from Xfce?
Logged
#76
Re: Xfce?
moocapiean
Master Contributor
Posts: 330
January 08, 2008, 11:36:45 AM
Quote from: bradpitcher on January 07, 2008, 10:12:06 PM
I hope it doesn't feel like I've hijacked this thread just to speak about xbindkeys. It is relevant, right?
Anyway, I was wondering if anyone here has found a way to map the button in the top right to fullscreen like in sugar. Normally F11 is fullscreen (for firefox, evince, terminal anyway), but F11 is volume decrease. Any ideas?
You can find the keycode for any button by using
xbindkeys -mk
. Just run that and press the key you want. Since I don't have my XO with me right now, I'll use the End button, but you should use the button you want. Anyway, if you press End, you should get output similar to:
Code:
"NoCommand"
m:0x0 + c:103
End
The first line tells you what command is associated with that button (or key combination if you wanted to do multiple keys at once). Here, you see End doesn't have a command.
The next line is the important one, it tells you what the character code is. If I wanted to associate a command with End, I know that I'd need to use character code 103.
So now that you have the character code, we want X to think that End is really F11. To do that, run
xmodmap -e 'keycode 103 = F11'
in a terminal.
Unfortunately, this'll only last until X restarts (such as when you restart your XO). So, how do we make it permanent? Well, let's have it run at startup. Put it in your ~/.xfce4_startup file.
If you don't have one, just create it, but be sure to put
#!/bin/bash
on the very first line! Then run
chmod +x /home/olpc/.xfce4_startup
. And finally, add it to Xfce Menu -> Settings -> Autostarted Applications .
Logged
#77
Re: Xfce?
moocapiean
Master Contributor
Posts: 330
January 08, 2008, 11:46:31 AM
Quote from: ashtond33 on January 07, 2008, 07:47:32 PM
To those seeking an OS other than Sugar, I highly reccomend XFCE. While not a completely new OS, its probiby what most users are looking for. With that said, does the default xfce have a screensaver or monitor shut off? I finally got a wep connection and im afraid to shut the XO off lol
Ashton
I'd definitely recommend Xfce too (if that's not obvious by now ;-) ). Averaged over two trials each, I found that Xfce (running only a terminal) had 42% free memory, while sugar (running a terminal) had only 15% free memory. Although I didn't collect any data on xfce+debian, it felt sluggish during the one time I played with it.
Anyway, you've probably found a solution by now (or just shut off your laptop), but I looked at installing xscreensaver, but it wanted to use too much space (a couple hundred megabytes?!), so I'd recommend just blanking the screen. I think mine does that already (you have to wait maybe 20 minutes), but if it doesn't, try following these instructions:
http://www.shallowsky.com/linux/x-screen-blanking.html
Logged
#78
Re: Xfce?
bradpitcher
Contributor
Posts: 31
January 08, 2008, 02:49:49 PM
Thanks moocapiean! That works great. The keycode was 147.
Logged
#79
Re: Xfce?
nivek2002
Commenter
Posts: 14
North Texas User
January 08, 2008, 03:04:54 PM
Quote from: info_anarchy on December 24, 2007, 10:55:55 AM
also, you can apparently change the brightness simply by sending number values to /sys/class/backlight/dcon-bl/brightness
for example: echo 15 > /sys/class/backlight/dcon-bl/brightness
sets it to full brightness, while echo 0 > /sys/class/backlight/dcon-bl/brightness
turns off the backlight. Interestingly, i think this enables finer brightness increments than the buttons do in sugar, so you might be able to set your screen to use even less power at night by keeping the backlight super dim.
there may be a similar device control for the sound, but I haven't found it.
Do we know of a way to do this for sound yet? I don't change my brightness or volume enough to warrant me stumbling through an xbindkeys install so something simple would be nice. Thanks for all the help in this thread for getting xfce working!
Kevin
Logged
#80
Re: Xfce?
moocapiean
Master Contributor
Posts: 330
January 08, 2008, 03:14:54 PM
Quote from: nivek2002 on January 08, 2008, 03:04:54 PM
Do we know of a way to do this for sound yet? I don't change my brightness or volume enough to warrant me stumbling through an xbindkeys install so something simple would be nice. Thanks for all the help in this thread for getting xfce working!
Kevin
Yep, you can just run
amixer -c - set Master,0 2dB-
to decrease the volume and
amixer -c - set Master,0 2dB+
to increase the volume. I don't think you need root privilege to do this.
Logged
#81
Re: Xfce?
nivek2002
Commenter
Posts: 14
North Texas User
January 08, 2008, 04:19:03 PM
Quote from: moocapiean on January 08, 2008, 03:14:54 PM
Yep, you can just run
amixer -c - set Master,0 2dB-
to decrease the volume and
amixer -c - set Master,0 2dB+
to increase the volume. I don't think you need root privilege to do this.
I just cannot get this to work...humm.
Also, my workaround for connecting to my wireless network is this.
Startup with .xserver line commented out so that Sugar starts up normally.
Connect to network.
Open terminal and uncomment .xserver.
Then Ctrl+alt+erase to reboot.
It goes directly to xfce and has the internet connection. Not the simpliest solution im sure, but its working reliably for me.
Kevin
Logged
#82
Re: Xfce?
ktrout153
Commenter
Posts: 25
January 08, 2008, 05:50:27 PM
Oops, that's my fault. Here's what it should be...
Increase Volume: amixer -c 0 set Master,0 2dB+
Decrease Volume: amixer -c 0 set Master,0 2dB-
Mute Volume: amixer -c 0 set Master,0 toggle
Evidently that '-' slipped in there. If it wasn't for the fact that '-' is next to the '0' on the keyboard, I wouldn't have a clue how it happened.
Sorry about that!
Kilgore.
Logged
#83
Re: Xfce?
nivek2002
Commenter
Posts: 14
North Texas User
January 08, 2008, 06:31:21 PM
Thanks Kilgore, it worked perfectly that time!
Kevin
Logged
#84
Re: Xfce on XO Brightness
Frihet
Commenter
Posts: 20
January 12, 2008, 05:03:51 PM
Quote from: moocapiean on December 30, 2007, 07:45:56 AM
I finally have the brightness thing working. Thanks to those who provided some of the steps!
<snip>
I have tried to duplicate your work, but have not succeeded so far. I started from the quoted line above, assuming all previous work was obsoleted.
I'm hoping you can quickly see something. I get no error messages. Here are contents of the key files:
/root/xbindkeysrc
...
xbindkeys --defaults > /home/olpc/.xbindkeysrc
---
/home/olpc/.xbindkeysrc
...
# For the benefit of emacs users: -*- shell-script -*-
###########################
# xbindkeys configuration #
###########################
#
# Version: 1.8.0
#
# If you edit this file, do not forget to uncomment any lines
# that you change.
# The pound(#) symbol may be used anywhere for comments.
#
# To specify a key, you can use 'xbindkeys --key' or
# 'xbindkeys --multikey' and put one of the two lines in this file.
#
# The format of a command line is:
# "command to start"
# associated key
#
#
# A list of keys is in /usr/include/X11/keysym.h and in
# /usr/include/X11/keysymdef.h
# The XK_ is not needed.
#
# List of modifier:
# Release, Control, Shift, Mod1 (Alt), Mod2 (NumLock),
# Mod3 (CapsLock), Mod4, Mod5 (Scroll).
#
# The release modifier is not a standard X modifier, but you can
# use it if you want to catch release events instead of press events
# By defaults, xbindkeys does not pay attention with the modifiers
# NumLock, CapsLock and ScrollLock.
# Uncomment the lines above if you want to pay attention to them.
#keystate_numlock = enable
#keystate_capslock = enable
#keystate_scrolllock= enable
# Examples of commands:
"xbindkeys_show"
control+shift + q
# set directly keycode (here control + f with my keyboard)
"xterm"
c:41 + m:0x4
# specify a mouse button
"xterm"
control + b:2
#"xterm -geom 50x20+20+20"
# Shift+Mod2+alt + s
#
## set directly keycode (here control+alt+mod2 + f with my keyboard)
#"xterm"
# alt + c:0x29 + m:4 + mod2
#
## Control+Shift+a release event starts rxvt
#"rxvt"
# release+control+shift + a
#
## Control + mouse button 2 release event starts rxvt
#"rxvt"
# Control + b:2 + Release
# Here starts definition for XO keys
# Increase brightness
"/usr/bin/adjust_brightness.sh +"
c76
# Decrease brightness
"/usr/bin/adjust_brightness.sh -"
c75
# End of XO definitions
##################################
# End of xbindkeys configuration #
##################################
---
/usr/bin/adjust_brightness.sh
...
#!/bin/bash
# The first argument is whether to increase the brightness (+) or
# decrease the brightness (-).
# The second argument is optional and indicates the step size when
# increasing or decreasing the brightness. The default is 1.
if [ $# -eq 0 ]; then exit 1; fi
bright_file="/sys/class/backlight/dcon-bl/brightness"
mbright_file="/sys/class/backlight/dcon-bl/max_brightness"
while read line; do
brightness=$line
done < <(cat "$bright_file")
while read line; do
max_brightness=$line
done < <(cat "$mbright_file")
step=1
if [ $# -gt 1 ]; then
step=$2
fi
declare -i brightness
if [ $1 = "-" ]; then
if [ $brightness -ne 0 ]; then
brightness=$brightness-$step;
echo $brightness > /sys/class/backlight/dcon-bl/brightness
fi
else
if [ $brightness -ne $max_brightness ]; then
brightness=$brightness+$step;
echo $brightness > $bright_file
fi
fi
---
/home/olpc/.xfce4_startup
...
#!/bin/bash
xbindkeys
sudo chgrp olpc /sys/class/backlight/dcon-bl/brightness
sudo chmod g+w /sys/class/backlight/dcon-bl/brightness
---
sudoers.tmp
...
olpc ALL=(root) NOPASSWD: /bin/chgrp olpc /sys/class/backlight/dcon-bl/brightness
olpc ALL=(root) NOPASSWD: /bin/chmod g+w /sys/class/backlight/dcon-bl/brightness
---
Thank you!!
Logged
#85
Re: Xfce on XO Brightness
Frihet
Commenter
Posts: 20
January 12, 2008, 05:29:24 PM
Quote from: Frihet on January 12, 2008, 05:03:51 PM
Quote from: moocapiean on December 30, 2007, 07:45:56 AM
I finally have the brightness thing working. Thanks to those who provided some of the steps!
<snip>
I have tried to duplicate your work, but have not succeeded so far. I started from the quoted line above, assuming all previous work was obsoleted.
<snip>
I think the problem is related to the term "brightness". When I run:
sudo chgrp olpc /sys/backlight/dcon-bl/brightness
I get an error:
. . . No such file or directory.
I'm probably missing a group.
Logged
#86
Re: Xfce on XO Brightness
Frihet
Commenter
Posts: 20
January 12, 2008, 05:37:42 PM
Quote from: Frihet on January 12, 2008, 05:29:24 PM
Quote from: Frihet on January 12, 2008, 05:03:51 PM
Quote from: moocapiean on December 30, 2007, 07:45:56 AM
I finally have the brightness thing working. Thanks to those who provided some of the steps!
<snip>
I have tried to duplicate your work, but have not succeeded so far. I started from the quoted line above, assuming all previous work was obsoleted.
<snip>
I think the problem is related to the term "brightness". When I run:
sudo chgrp olpc /sys/backlight/dcon-bl/brightness
I get an error:
. . . No such file or directory.
I'm probably missing a group.
Nope. It's just the permissions on /sys/backlight/dcon-bl/brightness. I'll have to ponder that for a while.
Logged
#87
Re: Xfce on XO Brightness
Frihet
Commenter
Posts: 20
January 12, 2008, 06:10:30 PM
Quote from: Frihet on January 12, 2008, 05:37:42 PM
Nope. It's just the permissions on /sys/backlight/dcon-bl/brightness. I'll have to ponder that for a while.
Ok, permissions are fine. I can manually pass +/- arguments to adjust_brightness.sh and it works fine.
Pardon me for thinking out loud here. I'm surprised I got this far. Now I'm looking for why the keys are not talking to the script.
Logged
#88
Re: Xfce?
moocapiean
Master Contributor
Posts: 330
January 12, 2008, 06:33:13 PM
Hmm, I think the problem's that you need a colon between the 'c' and the number in your .xbindkeysrc file. I guess I forgot to fix my post. Your .xbindkeys entries should look like:
# Increase brightness
"adjust_brightness.sh +"
c:76
# Decrease brightness
"adjust_brightness.sh -"
c:75
Let me know if that fixes your problem.
Logged
#89
Re: Xfce?
Frihet
Commenter
Posts: 20
January 12, 2008, 07:37:00 PM
Quote from: moocapiean on January 12, 2008, 06:33:13 PM
Hmm, I think the problem's that you need a colon between the 'c' and the number in your .xbindkeysrc file. I guess I forgot to fix my post. Your .xbindkeys entries should look like:
# Increase brightness
"adjust_brightness.sh +"
c:76
# Decrease brightness
"adjust_brightness.sh -"
c:75
Let me know if that fixes your problem.
I finally figured that out with xbindkeys -s:
---
bash-3.2# xbindkeys -s
"xbindkeys_show"
Control+Shift + q
"xterm"
m:0x4 + c:41
Control + f
"xterm"
m:0x4 + b:2 (mouse)
"/usr/bin/adjust_brightness.sh +"
m:0x0 + c:76
F10
"/usr/bin/adjust_brightness.sh -"
m:0x0 + c:75
F9
---
The buttons still do not work. xbindkeys seems to be passing nothing to the script (which works fine when I call it from the command line).
I also moved .xbindkeysrc into /root. It seemed to "disappear every now and then to xbindkeys when it was in /home/olpc. I don't know if that's bad or good.
Thoughts?
Logged
Pages:
1
...
3
4
5
[
6
]
7
8
9
...
12
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
OLPC G1G1 Information
-----------------------------
=> G1G1 Introduction
===> First Impressions
===> G1G1 Europe
===> XO Shipping - USA
===> XO Shipping - Canada
===> XO Shipping - Problems
=> XO User Groups
===> OLPC Canada
===> OLPC Learning Club DC
===> XO Europe User Group
===> Assistive Technology Group
=> OLPC Publicity
-----------------------------
XO Laptop
-----------------------------
=> XO Laptop Help
===> User Guide
===> Internet & Mesh Networking
===> Sugar & Linux
===> Battery & Power
===> T-Mobile HotSpot
=> XO 1.5 Laptop
=> XO Activities
===> Activities Development
===> Games!
===> eBooks
===> Music & Radio
===> Jabber & Chat
=> XO Hacks
===> Hardware Modifications
===> Other Operating Systems
=> XO Accessories
===> USB Memory Sticks & SD Cards
===> USB Adapters & Attachments
=> XO Problemo
===> Hardware Trouble
===> Keyboard
=> XO MISC
-----------------------------
OLPC Outreach
-----------------------------
=> Press & Blogs
=> Your Opinion
=> Promoting OLPC to Schools
-----------------------------
Other Devices
-----------------------------
=> Asus Eee PC
=> Classmate and 2go PC
=> Other 4P Computers
Stats
Members
Total Members: 2406
Latest:
sembik
Stats
Total Posts: 31943
Total Topics: 3843
Online Today: 29
Online Ever: 238
(April 18, 2011, 09:48:50 PM)
Users Online
Users: 0
Guests: 15
Total: 15
Loading...