<< Previous | Home | Next >>

Multimonitor-Setup mit 4k and HD

Ubuntu Mate: Since I have a 4k monitor I want to get both monitors to be scaled accordingly. I had to increase the dpi on the 4k which resulted in too big fonts on the HD-Monitor. Now I found a way to set this up right base on one forum-entry . (Thx to user: dglt)

In my setup I set the font dpi to 125 and set scale for the HD-Monitor to 1.3x1.3. I actually don't know why higher numbers means to zoom out more but I didn't read too much about xrandr at all:

sudo xrandr --output HDMI-1 --auto --scale 1.3x1.3 --output HDMI-0 --auto --scale 1.0x1.0 --left-of HDMI-1

To check the monitor name, you can use:

xrandr --listmonitors 

One way to make it permanent you can create a .desktop file which will be executed on startup put it here:
/usr/local/share/display-scale.desktop

[Desktop Entry]
Type=Application
Name=Set xrandr display scale
Exec=sh -c "xrandr --output HDMI-1 --auto --scale 1.3x1.3 --output HDMI-0 --auto --scale 1.0x1.0 --left-of HDMI-1"
NoDisplay=true
X-GNOME-Autostart-Phase=DisplayServer

Last thing to do to create 2 sym-links in some other autostart-locations:

sudo ln -s /usr/local/share/display-scale.desktop /usr/share/gdm/greeter/autostart/display-scale.desktop
sudo ln -s /usr/local/share/display-scale.desktop /etc/xdg/autostart/display-scale.desktop
Tags : ,

Export this post as PDF document  Export this post to PDF document

Social Bookmarks :  Add this post to Slashdot    Add this post to Digg    Add this post to Reddit    Add this post to Delicious    Add this post to Stumble it    Add this post to Google    Add this post to Technorati    Add this post to Bloglines    Add this post to Facebook    Add this post to Furl    Add this post to Windows Live    Add this post to Yahoo!

rapidjson: iterate over object and array

    // get an object    
    auto groups = doc["groups"].GetObject();

    // iterate over key-value-pairs ( group.name and group.value )
    for (auto const& group : groups){
        cout << "group:" << group.name.GetString() << endl;

        // the value is an array. The call to iterate over the array is basically the same as for the object 
        for (auto const& p : group.value.GetArray()){
            cout << "\t" << p.GetString() << endl;
        }
    }

obviously you don't need to const the value:

for (auto& group : groups){...
Tags : ,

Export this post as PDF document  Export this post to PDF document

Social Bookmarks :  Add this post to Slashdot    Add this post to Digg    Add this post to Reddit    Add this post to Delicious    Add this post to Stumble it    Add this post to Google    Add this post to Technorati    Add this post to Bloglines    Add this post to Facebook    Add this post to Furl    Add this post to Windows Live    Add this post to Yahoo!

GGJ '20 : Preparations

After I was ill last year I decided to attend headup's global game jam again. Perfect that it is located in my city and I can use it to kickstart me into Urho3D. Well,... I'm building on getting a good blender-addon for this for quite a while now, without actually every created a real game.... ( only small thingy is this )

So, to be more focused on finishing something ggj will help me...but to make it work I have one week to look a bit deeper into the engine:

  • navmesh:

    • creation
    • agents
    • movement
    • pathfinding
  • ui ( only basic )

  • controller:

    • mouse
    • gamepad
    • keyboard

It would be great to fulfill the "keep it simple"-rule, but for some reason,.... ;)

EDIT Here is the result. I actually like it. https://globalgamejam.org/2020/games/caravan-5 ggj2020

Tags : ,

Export this post as PDF document  Export this post to PDF document

Social Bookmarks :  Add this post to Slashdot    Add this post to Digg    Add this post to Reddit    Add this post to Delicious    Add this post to Stumble it    Add this post to Google    Add this post to Technorati    Add this post to Bloglines    Add this post to Facebook    Add this post to Furl    Add this post to Windows Live    Add this post to Yahoo!

Blender-Addons: Get Nodetree of current node_editor panel

If you want to access data from the selected nodetree inside a node_editor panel:

class UrhoExportNodetreePanel(bpy.types.Panel):
    bl_space_type = 'NODE_EDITOR'
    bl_region_type = 'UI'
    bl_label = "Urho3d-Nodetree"
    bl_category = "Urho3D"

    @classmethod
    def poll(cls, context):
        return True

    def draw(self, context):
        if bpy.context.active_object:
            obj = bpy.context.active_object
            
            # nodetree type of space 
            # (use this to check for current type, as nodetrees can be None)
            space_treetype = context.space_data.tree_type 

            ctx_nodetree = context.space_data.node_tree # the nodetree-obj
            ctx_nodetree_name = ctx_nodetree.name       # name of the selected nodetree  
            ctx_nodetree_type = ctx_nodetree.bl_idname  # type of the nodetree



Export this post as PDF document  Export this post to PDF document

Social Bookmarks :  Add this post to Slashdot    Add this post to Digg    Add this post to Reddit    Add this post to Delicious    Add this post to Stumble it    Add this post to Google    Add this post to Technorati    Add this post to Bloglines    Add this post to Facebook    Add this post to Furl    Add this post to Windows Live    Add this post to Yahoo!

docker: get rid of images and containers

I moved the blabbering behind the important stuff: how to get rid of the docker images/containers

docker system prune # dangling containers

docker system prune -a # dangling,stopped containers and all unused images

docker rmi $(docker images -a -q) # all images

docker rm $(docker ps -a -f status=exited -q) # all exited containers

Further Info

Atm I'm working lots with docker to have my one-click deployer for Urho3D. The main-developers have already made insane good work. On their docker images. The current dockerized-build-toolchain would let you compile Urho3D on your host with which you then can compile your project.

I want to have Urho3D-Libs in the docker-images so that I can throw my (project)[https://github.com/dertom95/urho3d-minimal-new-project] against it, and it will just spit out the result for windows,linux,web,android. The first three were actually no real problem and very straight forward. Again, thx to the incredible work that is already done.

Android on the other hand was/is a real struggle. I was using android back in the good old ant,eclipse-days. Now with gradle and kotlin....I just can say. WTF? Looks like gradle can do a lot, but it is so funky hard to understand what's going on just be reading.

Urho3D actually could already build the engline and it's samples out of the box. But replacing this with your own project isn't as straight forward, as it might sound. Especially if you want it to be a one click-solution. I'm on a good way, though. But I burned a complete day for this

Building the android-project with all ABIs simply let's you harddisc explode :D

My docker hub with urho3d-images

Tags :

Export this post as PDF document  Export this post to PDF document

Social Bookmarks :  Add this post to Slashdot    Add this post to Digg    Add this post to Reddit    Add this post to Delicious    Add this post to Stumble it    Add this post to Google    Add this post to Technorati    Add this post to Bloglines    Add this post to Facebook    Add this post to Furl    Add this post to Windows Live    Add this post to Yahoo!

CMake: glob_recurse with symbolic linked folders

If using CMake's file glob_recurse for catching source-file and you want this to also follow symbolic-links, just add the 'FOLLOW_SYMLINKS'-keyword:

Like this:

  
file( GLOB_RECURSE SOURCE_FILES FOLLOW_SYMLINKS src/*.cpp src/*.h )
  

Have look here: cmake file-docs

And a bit related. In linux to copy a folder to a new location with symlinks solved:

cp -r -L [from] [to]

Read more...

Export this post as PDF document  Export this post to PDF document

Social Bookmarks :  Add this post to Slashdot    Add this post to Digg    Add this post to Reddit    Add this post to Delicious    Add this post to Stumble it    Add this post to Google    Add this post to Technorati    Add this post to Bloglines    Add this post to Facebook    Add this post to Furl    Add this post to Windows Live    Add this post to Yahoo!

NFS and friends on RPI with openmediavault

rpi,cluster,nfs

Since I'm still experimenting with kubernetes and docker and on the search for a good filesystem-backend, I can put the data on.

I first used a simple nfs-server then had problems with postgres, then I tried cephfs, which worked but seemed to be an overkill and I guess you need more power and memory to really use it effectively.

And now I switched back to NFS using (openmediavault)[https://www.openmediavault.org/].

OMV Screenshot

OMV is based on armbian and provides all you need to create an NFS/Samba/ftp/...-System outofthebox for you. So I now have two rpi4b setup with it. One with an two mirror-raids once two 256gb-usb3-sticks on usb3 and two 256gb on usb2 and on the other on 2TB-usb3-HD which will be my file-backend. Privately and for docker/k8s.

Tags : ,

Export this post as PDF document  Export this post to PDF document

Social Bookmarks :  Add this post to Slashdot    Add this post to Digg    Add this post to Reddit    Add this post to Delicious    Add this post to Stumble it    Add this post to Google    Add this post to Technorati    Add this post to Bloglines    Add this post to Facebook    Add this post to Furl    Add this post to Windows Live    Add this post to Yahoo!

VIM: deactivate automatic visualmode on mouse-selection

vim,linux

One of the most annoying things is for me when (VIM(editor))[https://www.vim.org/] is switching to visualmode when you use the mouse-select. Especially this is the case on (armbian-systems)[https://www.armbian.com/].

I stumbled over a (github-comment)[https://gist.github.com/u0d7i/01f78999feff1e2a8361#gistcomment-3008129] which has te solution. Just do this:

echo "syntax enable" >> ~/.vimrc
echo "set mouse-=a" >> ~/.vimrc

Do make it clear. I hate visualmode ;) Really, I do!

Tags : , ,

Export this post as PDF document  Export this post to PDF document

Social Bookmarks :  Add this post to Slashdot    Add this post to Digg    Add this post to Reddit    Add this post to Delicious    Add this post to Stumble it    Add this post to Google    Add this post to Technorati    Add this post to Bloglines    Add this post to Facebook    Add this post to Furl    Add this post to Windows Live    Add this post to Yahoo!

Build Urho3D on arm-device

As I'm building my little Urho3D based game-server to run on rpi and alike systems I tend to compile the whole stuff on the device itself. (Yeah,...I should have a look in just cross-compiling...). I often struggled to finish compilation due to problems with angelscript and assimp here is the cmake-call to ignore those:

cmake -DURHO3D_ANGELSCRIPT=0 -DURHO3D_SAMPLES=0 -DURHO3D_TOOLS=0 /path/to/urho3dsource

Export this post as PDF document  Export this post to PDF document

Social Bookmarks :  Add this post to Slashdot    Add this post to Digg    Add this post to Reddit    Add this post to Delicious    Add this post to Stumble it    Add this post to Google    Add this post to Technorati    Add this post to Bloglines    Add this post to Facebook    Add this post to Furl    Add this post to Windows Live    Add this post to Yahoo!

mount postgres data-folder on NFS

I struggled for some time getting postgres to run on docker/k8s with /var/lib/postgresql/data mounted on an nfs-server.

I reguallary ended up with

chown: changing ownership of '/var/lib/postgresql/data/base/**/**': Operation not permitted.

I'm no expert in nfs and its export-options but to make the story short I stumbled over a stackoverflow-entry that suggested to change the postgres-docker-image's uid/gid to the one that has write access of the NFS-folder.

Ok,...you need to create a new docker image for this, but finally. Thx to 'Eddie Parker' my Dockerfile ended up like this. Where my user has the uid 1000 and is in group 100:

Dockerfile

FROM postgres:11.2
ENV TZ=America/Los_Angeles

# Make us the same gid/id as the nfs mount.
RUN sed -i 's/:999:/:1000:/g' /etc/group
RUN sed -i 's/:999:999:/:1000:100:/g' /etc/passwd

CMD [ "postgres", "-c", "max_connections=10000"]

Once you have this create a new image:

sudo docker build -t nfs/postgres:11.2 .

PS: I guess it would be fine to create a user with UID:999 gid:999 on the NFS-System which creates the data-directory.

Export this post as PDF document  Export this post to PDF document

Social Bookmarks :  Add this post to Slashdot    Add this post to Digg    Add this post to Reddit    Add this post to Delicious    Add this post to Stumble it    Add this post to Google    Add this post to Technorati    Add this post to Bloglines    Add this post to Facebook    Add this post to Furl    Add this post to Windows Live    Add this post to Yahoo!
<< Previous | Home | Next >>