Git Product home page Git Product logo

gekis-playground's Introduction

gekis-playground

The playground of gekis hacking on Gentoo Linux distribution.

System composed of EFI-based kernel, sysvinit/old openrc/eudev-based startup process and lightdm/mate desktop experience.

Featured by wpa_supplicant/dhcpcd-transparent network connections and seamless switch of display/audio from internal components to hdmi.

Here are some useful commands and configurations, which are described in a good wiki of a proper distribution.

wpa_supplicant: configure connection once

ip link set wlp1s0 up
iwconfig wlp1s0 essid <ssid>
wpa_passphrase <ssid> >> /etc/wpa_supplicant/wpa_supplicant.conf
ifconfig wlp1s0

udev: reload rules

udevadm control --reload

udev: switch display/audio(pulseaudio) to hdmi

~ cat /etc/udev/rules.d/90-display.rules

ACTION=="change", SUBSYSTEM=="drm", RUN+="display.sh &"

~ cat /lib64/udev/display.sh

#!/bin/sh

# config
DISPLAY=":0"

# function
function select_display()
{
        local mode="default"

        # add tests for other cards
        if [ "connected" == "$(/bin/cat /sys/class/drm/card0-HDMI-A-1/status)" ]
        then
                mode="hdmi"
        #elif  [ other card ]
        fi

        case "${mode}"
        in
        "hdmi")
                /usr/bin/xrandr --output HDMI1 --auto --output LVDS1 --off
                /bin/su ${USER} -c "/usr/bin/pacmd set-card-profile alsa_card.pci-0000_00_1b.0 output:hdmi-stereo+input:analog-stereo"
                ;;
        *)
                /usr/bin/xrandr --output LVDS1 --auto --output HDMI1 --off
                /bin/su ${USER} -c "/usr/bin/pacmd set-card-profile alsa_card.pci-0000_00_1b.0 output:analog-stereo+input:analog-stereo"
                ;;
        esac
}

# execute
USER="$(/usr/bin/w -husf|/usr/bin/awk "\$2 == \"${DISPLAY}\" {print \$1; exit 3}")"

if [ ${?} -eq 3 ]
then
        XAUTHORITY="/home/${USER}/.Xauthority"
        PULSE_RUNTIME_PATH="$(/bin/ls -ld /tmp/pulse-*|/usr/bin/awk "\$3 == \"${USER}\" {print \$9; exit 3}")"

        if [ ${?} -eq 3 ]
        then
                export DISPLAY XAUTHORITY PULSE_RUNTIME_PATH

                select_display
        fi
fi

exit 0

gekis-playground's People

Contributors

geki-yaba avatar

Stargazers

 avatar

Watchers

James Cloos avatar holgersson avatar  avatar

gekis-playground's Issues

fail to build dev-libs/boost-program_options-1.46.1

fail to build with lastest svn121

...failed updating 1 target...
 * ERROR: dev-libs/boost-program_options-1.46.1 failed (compile phase):
 *   build failed for options: pch=off --user-config=/var/build/portage/dev-libs
/boost-program_options-1.46.1/work/boost_1_46_1/user-config.jam --prefix=/var/bu
ild/portage/dev-libs/boost-program_options-1.46.1/image//usr --boost-build=/usr/
share/boost-build-1_46 --layout=versioned --with-program_options


attached file is detail build log, and my emerge --info


Original issue reported on code.google.com by [email protected] on 24 Mar 2011 at 2:30

Attachments:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.