LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-26-2016, 11:36 AM   #1
aristosv
Member
 
Registered: Dec 2014
Posts: 215

Rep: Reputation: 3
xinit fullscreen option


I am using this command to open google using midori on the raspberry pi.
Code:
sudo xinit /usr/bin/midori -e Fullscreen -a http://www.google.com/ -- -nocursor -dpms -s off -s noblank
The problem is that this command opens a small window on the upper left corner, instead of going fullscreen.

I've tried this with matchbox-window-manager and it works fine. But I'd prefer not to use a window manager if I can avoid it.

I've looked around and I can't find an option to tell xinit to go fullscreen.

Anyone did this?
 
Old 12-26-2016, 01:13 PM   #2
Yetoo
LQ Newbie
 
Registered: Dec 2015
Distribution: Fedora, Debian, Ubuntu, couldn't install gentoo
Posts: 20

Rep: Reputation: Disabled
Can you maximize the window?
 
Old 12-26-2016, 01:16 PM   #3
aristosv
Member
 
Registered: Dec 2014
Posts: 215

Original Poster
Rep: Reputation: 3
Whatever i do, i have to do it remotely through ssh. So if there is a way to maximize the window, it will have to ne done using a command. Not a mouse or keyboard.
 
Old 12-26-2016, 01:32 PM   #4
Yetoo
LQ Newbie
 
Registered: Dec 2015
Distribution: Fedora, Debian, Ubuntu, couldn't install gentoo
Posts: 20

Rep: Reputation: Disabled
Alright, I think I found a solution, but it involves knowing the PID of your process. Use the command:

awk '$3 == YOUR_PID {print $1}' <(wmctrl -lp) | xargs -i% sh -c "xwit -id % -pop -raise; wmctrl -i -r % -b add,maximized_vert,maximized_horz"

Where YOUR_PID is the PID of the window you want to maximum. There is a possible caveat though, this will maximize all windows in a certain process. For example if had 3 windows of nautilus, they would all maximize.
Source: http://askubuntu.com/questions/38498...n-pid-from-cli

EDIT 1: I just realized, from the post I linked to, that this requires xwit, but don't be alarmed if you can't find a package with xwit because it still works without it, atleast for me.

Last edited by Yetoo; 12-26-2016 at 01:36 PM.
 
Old 12-26-2016, 01:39 PM   #5
aristosv
Member
 
Registered: Dec 2014
Posts: 215

Original Poster
Rep: Reputation: 3
When I run the command I get a message saying "Cannot open display."
 
Old 12-26-2016, 01:46 PM   #6
Yetoo
LQ Newbie
 
Registered: Dec 2015
Distribution: Fedora, Debian, Ubuntu, couldn't install gentoo
Posts: 20

Rep: Reputation: Disabled
Were you getting errors that said xwit wasn't a found command?

EDIT 1: Also, this probably shouldn't be a problem, probably, but are you on Windows sshing to a raspberry pi through cygwin or are you on Linux? There may be a communication problem between the Windows version of X Server.

Last edited by Yetoo; 12-26-2016 at 01:49 PM.
 
Old 12-26-2016, 01:48 PM   #7
aristosv
Member
 
Registered: Dec 2014
Posts: 215

Original Poster
Rep: Reputation: 3
No. initially there was an error that wmctrl was missing but i installed it. No errors after that.
 
Old 12-26-2016, 01:51 PM   #8
Yetoo
LQ Newbie
 
Registered: Dec 2015
Distribution: Fedora, Debian, Ubuntu, couldn't install gentoo
Posts: 20

Rep: Reputation: Disabled
I want you try to uninstall xwit, if it's viable, and try the command again. It sound stupid even to me, but I feel like that this has a good chance of working.
 
Old 12-26-2016, 02:01 PM   #9
aristosv
Member
 
Registered: Dec 2014
Posts: 215

Original Poster
Rep: Reputation: 3
it seems that xwit is not installed

root@ClientX:~# apt-get remove xwit
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'xwit' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
 
Old 12-26-2016, 02:03 PM   #10
aristosv
Member
 
Registered: Dec 2014
Posts: 215

Original Poster
Rep: Reputation: 3
root@ClientX:~# awk '$3 == 484 {print $1}' <(wmctrl -lp) | xargs -i% sh -c "xwit -id % -pop -raise; wmctrl -i -r % -b add,maximized_vert,maximized_horz"
Cannot open display.
 
Old 12-26-2016, 02:16 PM   #11
Yetoo
LQ Newbie
 
Registered: Dec 2015
Distribution: Fedora, Debian, Ubuntu, couldn't install gentoo
Posts: 20

Rep: Reputation: Disabled
That's weird. What happens if you run xwit? If it can't find the command, then there's something going wrong before it even gets to that part of the command. If bash can find the command, then you need to do apt-get update then apt-cache search xwit to find the real name for the package to unintall. If apt-cache search can't find the package and bash can't find the command, then, I need you to refer to the edit I did on a previous post which I will quote here:

Also, this probably shouldn't be a problem, probably, but are you on Windows sshing to a raspberry pi through cygwin or are you on Linux? There may be a communication problem between the Windows version of X Server.

This problem is becoming ticky dicky and it's becoming far more complicated than I would like it.
 
Old 12-26-2016, 03:45 PM   #12
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873
sudo xinit? You're trying to run X and midori AS ROOT? I'd drop the sudo.

By default X starts with "-nolisten tcp" on many distros, which would hinder most networked based X niche cases.

Any reason you're not using startx which would launch xinit via the contents of .xinitrc? Or using something like Xephyr if X is already running?

Your initial command also seemed to be passing xset parameters. Note that for xset "s" does not use "-" before the "s". If X were already running:

$ xset -dpms s off s noblank s noexpose
 
Old 12-26-2016, 08:04 PM   #13
aristosv
Member
 
Registered: Dec 2014
Posts: 215

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by Yetoo View Post
That's weird. What happens if you run xwit? If it can't find the command, then there's something going wrong before it even gets to that part of the command. If bash can find the command, then you need to do apt-get update then apt-cache search xwit to find the real name for the package to unintall. If apt-cache search can't find the package and bash can't find the command, then, I need you to refer to the edit I did on a previous post which I will quote here:

Also, this probably shouldn't be a problem, probably, but are you on Windows sshing to a raspberry pi through cygwin or are you on Linux? There may be a communication problem between the Windows version of X Server.

This problem is becoming ticky dicky and it's becoming far more complicated than I would like it.
Code:
root@ClientX:~# xwit
-bash: xwit: command not found
So there's probably something wrong with the command before it gets to the xwit part.
Code:
root@ClientX:~# wmctrl -lp
Cannot open display.
 
Old 12-26-2016, 08:08 PM   #14
aristosv
Member
 
Registered: Dec 2014
Posts: 215

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by Shadow_7 View Post
sudo xinit? You're trying to run X and midori AS ROOT? I'd drop the sudo.
Right now I'm just trying to get things to work. After I've done that, I'll configure an unprivileged user to run xinit.

Quote:
Originally Posted by Shadow_7 View Post
Any reason you're not using startx which would launch xinit via the contents of .xinitrc? Or using something like Xephyr if X is already running?
I've just been using it like this with matchbox-window-manager and it's been working fine. So I had no reason to use startx.

Quote:
Originally Posted by Shadow_7 View Post
Your initial command also seemed to be passing xset parameters. Note that for xset "s" does not use "-" before the "s". If X were already running:
Thanks for the tip.
Any ideas on how to maximize the window?
 
Old 12-27-2016, 04:57 AM   #15
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873
wmctrl should be able to full screen it. Midori has " -e Fullscreen " according to the xfce faq. Probably case sensitive. I tend to avoid using that one due to zeitgeist. Plus it was never that stable to begin with. Lots of other webkit browsers out there. Midori is probably the only one that looks and behaves like a traditional browser. Although uzbl, dwb, and others are probably more performant IMO.

$ wmctrl -lpG

$ wmctrl -r :SELECT: -b toggle,fullscreen

The -r :SELECT: basically does it to what you click next. I tend to be too lazy to figure out window IDs and names are fidgety if you have multiple things with the same title.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Games fullscreen is distorted, but video fullscreen is fine - older laptop xmrkite Linux - Software 7 07-20-2009 11:40 AM
unrecognized option /etc/X11/xinit/xserverrc walterbyrd Debian 1 05-28-2008 09:02 AM
Kdrive and xinit slothpuck Linux - Software 0 01-24-2005 01:50 PM
xinit command ftgow Linux - Software 2 06-10-2004 05:01 PM
question about XINIT evaross1 Linux - Software 3 05-12-2004 03:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration